NetBSD Problem Report #47206

From www@NetBSD.org  Sat Nov 17 11:25:02 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 638E363E8FD
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 17 Nov 2012 11:25:02 +0000 (UTC)
Message-Id: <20121117112501.750C763E8FD@www.NetBSD.org>
Date: Sat, 17 Nov 2012 11:25:01 +0000 (UTC)
From: richard.palo@baou.fr
Reply-To: richard.palo@baou.fr
To: gnats-bugs@NetBSD.org
Subject: build problems with xulrunner 16.0.2: : 'malloc_usable_size' was not declared in this scope
X-Send-Pr-Version: www-1.0

>Number:         47206
>Category:       pkg
>Synopsis:       build problems with xulrunner 16.0.2: : 'malloc_usable_size' was not declared in this scope
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 17 11:30:00 +0000 2012
>Last-Modified:  Sat Jun 01 22:20:01 +0000 2013
>Originator:     Richard PALO
>Release:        pkgsrc trunk
>Organization:
>Environment:
SunOS devzone 5.11 oi_151a7 i86pc i386 i86pc

>Description:
Hello,

I"m trying to build xulrunner (for thunderbird and firefox) from trunk.
Running on OpenIndiana 151a7 in a non-global zone initially bootstrapped with Jonathan Perkin's bootstrap-2012Q3-illumos.tar.gz.

NB: gcc47 has been updated to 4.7.2 which is supposed to help mozilla builds...

the builds seem to indicate namespace problem:

g++ -o mozalloc.o -c   -DMOZ_GLUE_IN_PROGRAM -I../../xpcom -I. -I. -I../../dist/include  -I/opt/pkg/include/nspr -I/opt/pkg/include/nss/nss -I/opt/pkg/include/nss -I/opt/pkg/include/nspr        -fPIC -I/usr/include -I/opt/pkg/include -I/opt/pkg/include/gettext -I/opt/pkg/include/nspr -I/opt/pkg/include/freetype2 -O -I/usr/include -I/opt/pkg/include -I/opt/pkg/include/gettext -I/opt/pkg/include/nspr -I/opt/pkg/include/freetype2 -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -std=gnu++0x -pthread -pipe  -DNDEBUG -DTRIMMED -O2 -fomit-frame-pointer  -I/usr/include -I/opt/pkg/include -I/opt/pkg/include/gettext -I/opt/pkg/include/nspr -I/opt/pkg/include/freetype2 -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MF .deps/mozalloc.o.pp /tmp/pkgsrc/devel/xulrunner/work/mozilla-release/memory/mozalloc/mozalloc.cpp
/tmp/pkgsrc/devel/xulrunner/work/mozilla-release/memory/mozalloc/mozalloc.cpp: In function 'ulong_t moz_malloc_usable_size(void*)':
/tmp/pkgsrc/devel/xulrunner/work/mozilla-release/memory/mozalloc/mozalloc.cpp:215:34: error: 'malloc_usable_size' was not declared in this scope
gmake[3]: *** [mozalloc.o] Error 1

has anybody else come across these and have any patches or other suggestions that may help?

I've tried the default, which is with mozilla-jemalloc, and also with mozilla-jemalloc disabled which gives a similar problem:

g++ -o mozalloc_abort.o -c   -DMOZ_GLUE_IN_PROGRAM -I../../xpcom -I. -I. -I../../dist/include  -I/opt/pkg/include/nspr -I/opt/pkg/include/nss/nss -I/opt/pkg/include/nss -I/opt/pkg/include/nspr        -fPIC -I/usr/include -I/opt/pkg/include -I/opt/pkg/include/gettext -I/opt/pkg/include/nspr -I/opt/pkg/include/freetype2 -O -I/usr/include -I/opt/pkg/include -I/opt/pkg/include/gettext -I/opt/pkg/include/nspr -I/opt/pkg/include/freetype2 -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -std=gnu++0x -pthread -pipe  -DNDEBUG -DTRIMMED -O2 -fomit-frame-pointer  -I/usr/include -I/opt/pkg/include -I/opt/pkg/include/gettext -I/opt/pkg/include/nspr -I/opt/pkg/include/freetype2 -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MF .deps/mozalloc_abort.o.pp /tmp/pkgsrc/devel/xulrunner/work/mozilla-release/memory/mozalloc/mozalloc_abort.cpp
/tmp/pkgsrc/devel/xulrunner/work/mozilla-release/memory/mozalloc/mozalloc_abort.cpp: In function 'void abort()':
/tmp/pkgsrc/devel/xulrunner/work/mozilla-release/memory/mozalloc/mozalloc_abort.cpp:30:16: error: 'void abort()' conflicts with previous using declaration 'void std::abort()'
gmake[3]: *** [mozalloc_abort.o] Error 1

full logs available if needed.

Thanks in advance


>How-To-Repeat:
richard@devzone:~/src/pkgsrc/devel/xulrunner$ bmake clean
richard@devzone:~/src/pkgsrc/devel/xulrunner$ bmake
or 
richard@devzone:~/src/pkgsrc/devel/xulrunner$ bmake PKG_OPTIONS.xulrunner=-mozilla-jemalloc
>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->tnn
Responsible-Changed-By: hauke@NetBSD.org
Responsible-Changed-When: Sun, 18 Nov 2012 19:47:10 +0000
Responsible-Changed-Why:
Over to maintainer.


From: RichardPALO <richard.palo@baou.fr>
To: <gnats-bugs@netbsd.org>
Cc: 
Subject: Re: pkg/47206 (build problems with xulrunner 16.0.2: :
 =?UTF-8?Q?=27malloc=5Fusable=5Fsize=27=20was=20not=20declared=20in=20this?=
 =?UTF-8?Q?=20scope=29?=
Date: Thu, 22 Nov 2012 18:45:08 +0100

 Le 18.11.2012 20:47, hauke@NetBSD.org a écrit :

 > Synopsis: build problems with xulrunner 16.0.2: : 
 > 'malloc_usable_size'
 > was not declared in this scope
 >
 > Responsible-Changed-From-To: pkg-manager->tnn
 > Responsible-Changed-By: hauke@NetBSD.org [1]
 > Responsible-Changed-When: Sun, 18 Nov 2012 19:47:10 +0000
 > Responsible-Changed-Why:
 > Over to maintainer.

 Hello, I just happened to notice the following in my log output:

 creating ./config.status
 creating config files and headers...
 invoking make to create js-config script
 find: bad option -path
 find: [-E] [-H | -L] path-list predicate-list
 rm -f js-config.tmp
 sed < js-config.in > js-config.tmp
 -e 's|@prefix@|/tmp/pkgsrc/devel/xulrunner/work/mozilla-esr17/dist|'
 -e 
 's|@exec_prefix@|/tmp/pkgsrc/devel/xulrunner/work/mozilla-esr17/dist|'
 -e
 's|@includedir@|/tmp/pkgsrc/devel/xulrunner/work/mozilla-esr17/dist/include|'

 -e 
 's|@libdir@|/tmp/pkgsrc/devel/xulrunner/work/mozilla-esr17/dist/lib|'
 -e 's|@MOZILLA_VERSION@||'
 -e 's|@LIBRARY_NAME@|mozjs|'
 -e 's|@NSPR_CFLAGS@|-I/opt/pkg/include/nspr|'
 -e 's|@JS_CONFIG_LIBS@|-Wl,-R/opt/pkg/lib -L/opt/pkg/lib -lffi
 -Wl,-R/opt/pkg/lib/nspr -L/opt/pkg/lib/nspr -lplds4 -lplc4 -lnspr4
 -L/opt/pkg/gcc47/

 I found the following extract in
 /tmp/pkgsrc/devel/xulrunner/work/mozilla-esr17/js/src/Makefile.in

 ...

 ## Prevent regressing in our deprecation of non-preferred memory
 management functions.
 # We use all the files in the distribution so that different
 configurations
 # don't give different results. We skip the contents of objdirs using
 |find|
 # (it can't be done with %-expansion, because the files we want to skip
 aren't
 # in the vpath).
 ALL_FILES=$(shell find $(srcdir) ( -name "*.cpp" -o -name "*.h" ) ! 
 -path
 "*/dist/*" ! -path "*/config/*")
 check-malloc-function-usage: $(filter-out %jsalloc.h %jscntxt.h 
 %jsutil.h,
 $(ALL_FILES))

   # js_malloc and friends are only used by other memory managers, and
 should
   # never be used elsewhere directly.
   $(srcdir)/config/check_source_count.py "bjs_mallocb" 0
   "in Makefile.in" "cx->malloc_ or rt->malloc_" $^
   $(srcdir)/config/check_source_count.py "bjs_callocb" 0
   "in Makefile.in" "cx->calloc_ or rt->calloc_" $^
   $(srcdir)/config/check_source_count.py "bjs_reallocb" 0
   "in Makefile.in" "cx->realloc_ or rt->realloc_" $^
   $(srcdir)/config/check_source_count.py "bjs_freeb" 0
   "in Makefile.in" "cx->free_" $^

   # We desire these numbers to go down, not up. See "User guide to 
 memory
   # management within SpiderMonkey" in jsutil.h.
   $(srcdir)/config/check_source_count.py OffTheBooks:: 71
   "in Makefile.in" "{cx,rt}->{new_,array_new,malloc_,calloc_,realloc_}" 
 $^
   # This should go to zero, if possible.
   $(srcdir)/config/check_source_count.py UnwantedForeground:: 31
   "in Makefile.in" "{cx,rt}->{free_,delete_,array_delete}" $^

 Indeed, in illumos, '/usr/bin/find' does not seem to like '-path'.

 Perhaps this statement needs to be reworked to use -prune somehow...





Responsible-Changed-From-To: tnn->pkg-manager
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Fri, 01 Feb 2013 22:55:16 +0000
Responsible-Changed-Why:
Back to role account.


From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/47206 (build problems with xulrunner 16.0.2: :
 'malloc_usable_size' was not declared in this scope)
Date: Sat, 1 Jun 2013 22:15:02 +0000

 not sent to gnats

    ------

 From: Richard PALO <richard.palo@baou.fr>
 To: pkgsrc-bugs@NetBSD.org
 Subject: Re: pkg/47206 (build problems with xulrunner 16.0.2: :
 	'malloc_usable_size' was not declared in this scope)
 Date: Fri, 23 Nov 2012 06:46:49 +0100

 Le 22/11/12 18:50, RichardPALO a ?crit :
 >   creating ./config.status
 >   creating config files and headers...
 >   invoking make to create js-config script
 >   find: bad option -path
 >   find: [-E] [-H | -L] path-list predicate-list
 > 

 Although this didn't fix the primary bug report with
 malloc_usable_size nor abort, the patch below seems to get over the
 find problem.

 Could a "find" expert validate/repair my feeble attempt to make
 portable the following:

 find $(srcdir) \( -name "*.cpp" -o -name "*.h" \) ! -path "*/dist/*" !
 -path "*/config/*")

 to:

 find $(srcdir) ! \( -type d -name "dist" -o -name "config" -prune \)
 -name "*.cpp" -o -name "*.h")


 Extract from attached log:

 creating ./config.status
 creating config files and headers...
 invoking make to create js-config script
 rm -f js-config.tmp
 sed < js-config.in > js-config.tmp \
 -e 's|@prefix@|/tmp/pkgsrc/devel/xulrunner/work/mozilla-esr17/dist|' \
 -e 's|@exec_prefix@|/tmp/pkgsrc/devel/xulrunner/work/mozilla-esr17/dist|' \
 -e 's|@includedir@|/tmp/pkgsrc/devel/xulrunner/work/mozilla-esr17/dist/include|'
 \
 -e 's|@libdir@|/tmp/pkgsrc/devel/xulrunner/work/mozilla-esr17/dist/lib|' \
 -e 's|@MOZILLA_VERSION@||' \
 -e 's|@LIBRARY_NAME@|mozjs|' \
 -e 's|@NSPR_CFLAGS@|-I/opt/pkg/include/nspr|' \
 -e 's|@JS_CONFIG_LIBS@|-Wl,-R/opt/pkg/lib -L/opt/pkg/lib -lffi
 -Wl,-R/opt/pkg/lib/nspr -L/opt/pkg/lib/nspr -lplds4 -lplc4 -lnspr4
 -L/opt/pkg/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.2
 -L/opt/pkg/gcc47/lib -L/opt/pkg/lib -lpthread -ldl -lposix4 -lsocket
 -lc -lsocket -lc  -lm -lz -lposix4 -ldl -lnsl -lsocket|' \
 -e 's|@MOZ_JS_LIBS@|-L/tmp/pkgsrc/devel/xulrunner/work/mozilla-esr17/dist/lib
 -lmozjs|' \
 && mv js-config.tmp js-config && chmod +x js-config


 The new patchfile patch-js_src_Makefile.in obsoletes patch-ml.

 richard@devzone:~/src/pkgsrc/devel/xulrunner$ cvs diff
 ? patches/patch-js_src_Makefile.in
 Index: distinfo
 ===================================================================
 RCS file: /cvsroot/pkgsrc/devel/xulrunner/distinfo,v
 retrieving revision 1.84
 diff -u -p -r1.84 distinfo
 --- distinfo    21 Nov 2012 15:26:49 -0000      1.84
 +++ distinfo    23 Nov 2012 05:31:21 -0000
 @@ -62,6 +62,7 @@ SHA1 (patch-ipc_chromium_src_chrome_comm
  SHA1 (patch-ipc_chromium_src_chrome_common_transport__dib.h) =
 15146bd327bb51b8de0783ff28b70201e3bfa532
  SHA1 (patch-ipc_glue_GeckoChildProcessHost.cpp) =
 be69744c199bae64c41455ff31efe2498b859414
  SHA1 (patch-ipc_glue_SharedMemorySysV.h) =
 c82d7fd5f1a099da175107401c725cfd5ea81845
 +SHA1 (patch-js_src_Makefile.in) = ca4752fbec941a3215e3285c0dda8de55e474c2e
  SHA1 (patch-js_src_config_system-headers) =
 86f1aa66f8a35d6967c2cd03d05b6dd57209a690
  SHA1 (patch-js_src_jscpucfg.h) = afce65ca5964fb732d96cf22902f89cd02aedf0d
  SHA1 (patch-js_src_jsgc.cpp) = 0e617094a4b7d87cdf801d9bc4ac1f52d909a12a
 @@ -79,7 +80,6 @@ SHA1 (patch-mh) = 8c56d7467e90944be18630
  SHA1 (patch-mi) = 56bf4b5900eef022e9959e9287dadd479a725ed6
  SHA1 (patch-mj) = a29a3b2189103526d0cc040459d6f0b11b77f837
  SHA1 (patch-mk) = d9f0663d3d2762963f4c018a028eb5346106edb8
 -SHA1 (patch-ml) = 71c4eb8822755dd17cd4add11687d8cf52a12f6f
  SHA1 (patch-mm) = 2ba1f9bd6836141d819abf046c4b0b3431d777f9
  SHA1 (patch-mn) = 621eeb1c76e52b61f8c8b11e6708131900fd5df7
  SHA1 (patch-mp) = 2dc3ae213ce41b5c68105b8d90ef1ce81f0029bc
 cvs diff: cannot find patches/patch-ml
 richard@devzone:~/src/pkgsrc/devel/xulrunner$ cat
 patches/patch-js_src_Makefile.in
 $NetBSD$

 --- js/src/Makefile.in.orig     2012-11-19 15:42:30.000000000 +0000
 +++ js/src/Makefile.in
 @@ -516,7 +516,7 @@ endif
  # don't give different results. We skip the contents of objdirs using
 |find|
  # (it can't be done with %-expansion, because the files we want to
 skip aren't
  # in the vpath).
 -ALL_FILES=$(shell find $(srcdir) \( -name "*.cpp" -o -name "*.h" \) !
 -path "*/dist/*" ! -path "*/config/*")
 +ALL_FILES=$(shell find $(srcdir) ! \( -type d -name "dist" -o -name
 "config" -prune \) -name "*.cpp" -o -name "*.h")
  check-malloc-function-usage: $(filter-out %jsalloc.h %jscntxt.h
 %jsutil.h, $(ALL_FILES))

         # js_malloc and friends are only used by other memory
 managers, and should
 @@ -670,6 +670,9 @@ endif # _MSC_VER
  ifeq ($(OS_ARCH),FreeBSD)
  EXTRA_LIBS     += -pthread
  endif
 +ifeq ($(OS_ARCH),DragonFly)
 +EXTRA_LIBS     += -pthread
 +endif
  ifeq ($(OS_ARCH),Linux)
  EXTRA_LIBS     += -ldl
  endif


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.