NetBSD Problem Report #47233

From www@NetBSD.org  Thu Nov 22 03:26:52 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 BA4EA63DCB2
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 22 Nov 2012 03:26:51 +0000 (UTC)
Message-Id: <20121122032650.274A163DCB2@www.NetBSD.org>
Date: Thu, 22 Nov 2012 03:26:50 +0000 (UTC)
From: davshao@gmail.com
Reply-To: davshao@gmail.com
To: gnats-bugs@NetBSD.org
Subject: xulrunner DragonFly x86_64 call of overloaded 'FromTicks(long long int)' is ambiguous
X-Send-Pr-Version: www-1.0

>Number:         47233
>Category:       pkg
>Synopsis:       xulrunner DragonFly x86_64 call of overloaded 'FromTicks(long long int)' is ambiguous
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ryoon
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 22 03:30:00 +0000 2012
>Last-Modified:  Thu Dec 06 03:45:04 +0000 2012
>Originator:     David Shao
>Release:        DragonFly 3.3-DEVELOPMENT x86_64
>Organization:
>Environment:
DragonFly 3.3-DEVELOPMENT x86_64
>Description:
For DragonFly 3.3-DEVELOPMENT x86_64, using current pkgsrc master

commit ef0db6940115a90d3f7a10097e7cce8865771711
Author: pkgsrc fixup <pkgsrc@dragonflybsd.org>
Date:   Wed Nov 21 12:28:22 2012 -0800

# pkg_rolling-replace -uv
produces an error building devel/xulrunner 17.0:

WARNING: [subst.mk:pkgconfig] Ignoring non-existent file "./xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in".
WARNING: [subst.mk:pkgconfig] Ignoring non-existent file "./xulrunner/installer/mozilla-gtkmozembed.pc.in".
INFO: [subst.mk:pkgconfig] Nothing changed in ./xulrunner/installer/mozilla-plugin.pc.in.
...
checking for 64-bit OS... yes
checking for Python version >= 2.5 but not 3.x... yes
checking for custom <stdint.h> implementation... none specified
defined(@array) is deprecated at ./config/milestone.pl line 58.
        (Maybe you should just omit the defined()?)
defined(@array) is deprecated at ./config/milestone.pl line 58.
        (Maybe you should just omit the defined()?)
...
checking for int64... no
checking for uint... yes
checking for uint_t... no
...
configure: warning: Cannot build gnomevfs without required libraries. Removing gnomevfs from MOZ_EXTENSIONS.
...
checking for stdint.h... yes
checking for inttypes.h... yes
checking for sys/int_types.h... no
...
configuring in js/src
running /bin/sh ./configure  --enable-application=xulrunner --enable-libxul --disable-tests --disable-pedantic --enable-crypto --enable-optimize=-O2 --with-pthreads --disable-javaxpcom --enable-default-toolkit=cairo-gtk2 --enable-svg --enable-mathml --enable-system-cairo --enable-system-pixman --with-system-libvpx --enable-system-hunspell --enable-system-ffi --with-system-nss --with-system-nspr --with-system-jpeg --with-system-zlib --with-system-bz2 --with-system-libevent=/usr/pkg --enable-system-sqlite --disable-crashreporter --disable-libnotify --disable-necko-wifi --enable-chrome-format=flat --disable-gnomevfs --disable-dbus --disable-gnomeui --disable-libnotify --disable-jemalloc --disable-debug --disable-debug-symbols --enable-install-strip --with-libintl-prefix=/usr/pkg --prefix=/usr/pkg --build=x86_64-pc-dragonfly --host=x86_64-pc-dragonfly --mandir=/usr/pkg/man --enable-threadsafe --enable-ctypes --disable-shared-js --with-dist-dir=../../dist --prefix=/usr/pkgsrc/deve
 l/xulrunner/work/mozilla-esr17/dist --cache-file=../.././config.cache --srcdir=.
loading cache ../.././config.cache
checking host system type... x86_64-pc-dragonfly
checking target system type... x86_64-pc-dragonfly
checking build system type... x86_64-pc-dragonfly
...
c++ -o FileUtils.o -c -I../../dist/stl_wrappers -I../../dist/system_wrappers -include ../../config/gcc_hidden.h -DMOZ_GLUE_IN_PROGRAM -DTARGET_XPCOM_ABI=\"x86_64-gcc3\" -I../../xpcom/glue/../build  -I../../xpcom/glue -I. -I../../dist/include  -I/usr/pkg/include/nspr -I/usr/pkg/include/nss/nss -I/usr/pkg/include/nss -I/usr/pkg/include/nspr        -fPIC -I/usr/include -I/usr/pkg/include -I/usr/pkg/include/gettext -I/usr/pkg/include/nspr -I/usr/pkg/include/freetype2 -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Wno-ctor-dtor-privacy -Wno-overlength-strings -Wno-invalid-offsetof -Wno-variadic-macros -Wcast-align -g -I/usr/include -I/usr/pkg/include -I/usr/pkg/include/gettext -I/usr/pkg/include/nspr -I/usr/pkg/include/freetype2 -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -O2 -fomit-frame-pointer  -I/usr/include -I/usr/pkg/include -I/u
 sr/pkg/include/gettext -I/usr/pkg/include/nspr -I/usr/pkg/include/freetype2 -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MF .deps/FileUtils.o.pp /usr/pkgsrc/devel/xulrunner/work/mozilla-esr17/xpcom/glue/FileUtils.cpp
In file included from ../../dist/include/mozilla/FunctionTimer.h:11,
                 from /usr/pkgsrc/devel/xulrunner/work/mozilla-esr17/xpcom/glue/FileUtils.cpp:20:
../../dist/include/mozilla/TimeStamp.h: In static member function 'static mozilla::TimeDuration mozilla::TimeDuration::FromTicks(double)':
../../dist/include/mozilla/TimeStamp.h:133: error: call of overloaded 'FromTicks(long long int)' is ambiguous
../../dist/include/mozilla/TimeStamp.h:123: note: candidates are: static mozilla::TimeDuration mozilla::TimeDuration::FromTicks(int64_t)
../../dist/include/mozilla/TimeStamp.h:129: note:                 static mozilla::TimeDuration mozilla::TimeDuration::FromTicks(double)
../../dist/include/mozilla/TimeStamp.h:137: error: call of overloaded 'FromTicks(long long int)' is ambiguous
../../dist/include/mozilla/TimeStamp.h:123: note: candidates are: static mozilla::TimeDuration mozilla::TimeDuration::FromTicks(int64_t)
../../dist/include/mozilla/TimeStamp.h:129: note:                 static mozilla::TimeDuration mozilla::TimeDuration::FromTicks(double)
gmake[4]: *** [FileUtils.o] Error 1
gmake[4]: Leaving directory `/usr/pkgsrc/devel/xulrunner/work/mozilla-esr17/xpcom/glue'
gmake[3]: *** [libs] Error 2
gmake[3]: Leaving directory `/usr/pkgsrc/devel/xulrunner/work/mozilla-esr17/xpcom'
gmake[2]: *** [libs_tier_platform] Error 2
gmake[2]: Leaving directory `/usr/pkgsrc/devel/xulrunner/work/mozilla-esr17'
gmake[1]: *** [tier_platform] Error 2
gmake[1]: Leaving directory `/usr/pkgsrc/devel/xulrunner/work/mozilla-esr17'
gmake: *** [all] Error 2
*** Error code 2


>How-To-Repeat:

>Fix:
For DragonFly 3.3-DEVELOPMENT x86_64, using current pkgsrc master

commit ef0db6940115a90d3f7a10097e7cce8865771711
Author: pkgsrc fixup <pkgsrc@dragonflybsd.org>
Date:   Wed Nov 21 12:28:22 2012 -0800

# pkg_rolling-replace -uv
produces an error building devel/xulrunner 17.0:

>Release-Note:

>Audit-Trail:
From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org, davshao@gmail.com
Cc: 
Subject: Re: pkg/47233: xulrunner DragonFly x86_64 call of overloaded
 'FromTicks(long long int)' is ambiguous
Date: Thu, 22 Nov 2012 20:58:37 +0900 (JST)

 Hi,

 >>Fix:
 > For DragonFly 3.3-DEVELOPMENT x86_64, using current pkgsrc master
 > 
 > commit ef0db6940115a90d3f7a10097e7cce8865771711
 > Author: pkgsrc fixup <pkgsrc@dragonflybsd.org>
 > Date:   Wed Nov 21 12:28:22 2012 -0800
 > 
 > # pkg_rolling-replace -uv
 > produces an error building devel/xulrunner 17.0:

 I am not familiar with DragonFly's git repository.
 If the git repository has fix, please post URL or patch itself.


From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: John Marino <netbsd@marino.st>
Subject: Re: pkg/47233: xulrunner DragonFly x86_64 call of overloaded
 'FromTicks(long long int)' is ambiguous
Date: Thu, 22 Nov 2012 07:25:38 -0800

 When I give a pkgsrc current master reference for DragonFly, I do it
 to mainly give the date and time such as:

 Date:   Wed Nov 21 18:27:24 2012 -0800

 which refers to the time at which DragonFly's git repository for
 pkgsrc is synched with pkgsrc cvs.

 Latest xulrunner and firefox appear to build correctly on NetBSD amd64.

 However on DragonFly x86_64, the build fails with error:

 c++ -o FileUtils.o -c -I../../dist/stl_wrappers -I../../dist/system_wrappers
 -include ../../config/gcc_hidden.h -DMOZ_GLUE_IN_PROGRAM
 -DTARGET_XPCOM_ABI=\"x86_64-gcc3\" -I../../xpcom/glue/../build
 -I../../xpcom/glue -I. -I../../dist/include  -I/usr/pkg/include/nspr
 -I/usr/pkg/include/nss/nss -I/usr/pkg/include/nss -I/usr/pkg/include/nspr
  -fPIC -I/usr/include -I/usr/pkg/include -I/usr/pkg/include/gettext
 -I/usr/pkg/include/nspr -I/usr/pkg/include/freetype2 -Wall -Wpointer-arith
 -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body
 -Wno-ctor-dtor-privacy -Wno-overlength-strings -Wno-invalid-offsetof
 -Wno-variadic-macros -Wcast-align -g -I/usr/include -I/usr/pkg/include
 -I/usr/pkg/include/gettext -I/usr/pkg/include/nspr -I/usr/pkg/include/freetype2
 -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections
 -fdata-sections -fno-exceptions -fshort-wchar -pthread -pipe  -DNDEBUG
 -DTRIMMED -O2 -fomit-frame-pointer  -I/usr/include -I/usr/pkg/include -I/u
  sr/pkg/include/gettext -I/usr/pkg/include/nspr -I/usr/pkg/include/freetype2
 -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MF .deps/FileUtils.o.pp
 /usr/pkgsrc/devel/xulrunner/work/mozilla-esr17/xpcom/glue/FileUtils.cpp
 In file included from ../../dist/include/mozilla/FunctionTimer.h:11,
                  from
 /usr/pkgsrc/devel/xulrunner/work/mozilla-esr17/xpcom/glue/FileUtils.cpp:20:
 ../../dist/include/mozilla/TimeStamp.h: In static member function 'static
 mozilla::TimeDuration mozilla::TimeDuration::FromTicks(double)':
 ../../dist/include/mozilla/TimeStamp.h:133: error: call of overloaded
 'FromTicks(long long int)' is ambiguous
 ../../dist/include/mozilla/TimeStamp.h:123: note: candidates are: static
 mozilla::TimeDuration mozilla::TimeDuration::FromTicks(int64_t)
 ../../dist/include/mozilla/TimeStamp.h:129: note:                 static
 mozilla::TimeDuration mozilla::TimeDuration::FromTicks(double)
 ../../dist/include/mozilla/TimeStamp.h:137: error: call of overloaded
 'FromTicks(long long int)' is ambiguous
 ../../dist/include/mozilla/TimeStamp.h:123: note: candidates are: static
 mozilla::TimeDuration mozilla::TimeDuration::FromTicks(int64_t)
 ../../dist/include/mozilla/TimeStamp.h:129: note:                 static
 mozilla::TimeDuration mozilla::TimeDuration::FromTicks(double)
 gmake[4]: *** [FileUtils.o] Error 1
 gmake[4]: Leaving directory
 `/usr/pkgsrc/devel/xulrunner/work/mozilla-esr17/xpcom/glue'
 gmake[3]: *** [libs] Error 2
 gmake[3]: Leaving directory
 `/usr/pkgsrc/devel/xulrunner/work/mozilla-esr17/xpcom'
 gmake[2]: *** [libs_tier_platform] Error 2
 gmake[2]: Leaving directory `/usr/pkgsrc/devel/xulrunner/work/mozilla-esr17'
 gmake[1]: *** [tier_platform] Error 2
 gmake[1]: Leaving directory `/usr/pkgsrc/devel/xulrunner/work/mozilla-esr17'
 gmake: *** [all] Error 2
 *** Error code 2

 On DragonFly i386, the xulrunner build fails with:

 ../../dist/bin/libxul.so: undefined reference to '(anonymous namespace)::errno'
 gmake[4]:*** [plugin-container] Error 1
 gmake[4]:Leaving directory
 '/usr/pkgsrc/devel/xulrunner/work/mozilla-esr17/ipc/app'
 gmake[3]: ***[tools] Error 2

From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: John Marino <netbsd@marino.st>, John Marino <marino@netbsd.org>
Subject: Re: pkg/47233: xulrunner DragonFly x86_64 call of overloaded
 'FromTicks(long long int)' is ambiguous
Date: Sat, 24 Nov 2012 19:57:25 -0800

 To elaborate on the error that manifests itself both on DragonFly
 x86_64 and i386, it appears to be  an interaction of errno with the
 unnamed anonymous namespace in C++.

 gmake[3]: Entering directory
 `/usr/pkgsrc/devel/xulrunner/work/mozilla-esr17/toolkit/library'
 rm -f libxul.so
 /usr/pkgsrc/devel/xulrunner/work/mozilla-esr17/_virtualenv/bin/python
 ../../config/pythonpath.py -I../../config
 ../../config/expandlibs_exec.py --depend .deps/libxul.so.pp --target
 libxul.so --uselist --  c++ -I/usr/include -I/usr/pkg/include
 -I/usr/pkg/include/gettext -I/usr/pkg/include/nspr
 -I/usr/pkg/include/freetype2 -Wall -Wpointer-arith
 -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body
 -Wno-ctor-dtor-privacy -Wno-overlength-strings -Wno-invalid-offsetof
 -Wno-variadic-macros -Wcast-align -g -I/usr/include -I/usr/pkg/include
 -I/usr/pkg/include/gettext -I/usr/pkg/include/nspr
 -I/usr/pkg/include/freetype2 -fno-exceptions -fno-strict-aliasing
 -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions
 -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -O2
 -fomit-frame-pointer -fPIC -shared -Wl,-z,defs -Wl,-h,libxul.so -o
 libxul.so  nsStaticXULComponents.o nsUnicharUtils.o nsBidiUtils.o
 nsSpecialCasingData.o nsUnicodeProperties.o nsRDFResource.o
 -lpthread -Wl,-rpath,/usr/pkg/lib/xulrunner -Wl,-rpath,/usr/pkg/lib
 -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib
 -L/usr/pkg/lib/nspr -Wl,-R/usr/pkg/lib/nspr -L/usr/pkg/lib/nss
 -Wl,-R/usr/pkg/lib/nss -Wl,-z,noexecstack
 -Wl,-rpath-link,/usr/pkgsrc/devel/xulrunner/work/mozilla-esr17/dist/bin
 -Wl,-rpath-link,/usr/pkg/lib
 ../../toolkit/components/osfile/libosfile_s.a
 ../../toolkit/xre/libxulapp_s.a  ../../staticlib/components/libnecko.a
 ../../staticlib/components/libuconv.a
 ../../staticlib/components/libi18n.a
 ../../staticlib/components/libchardet.a
 ../../staticlib/components/libjar50.a
 ../../staticlib/components/libstartupcache.a
 ../../staticlib/components/libpref.a
 ../../staticlib/components/libhtmlpars.a
 ../../staticlib/components/libidentity.a
 ../../staticlib/components/libimglib2.a
 ../../staticlib/components/libgkgfx.a
 ../../staticlib/components/libgklayout.a
 ../../staticlib/components/libdocshell.a
 ../../staticlib/components/libembedcomponents.a
 ../../staticlib/components/libwebbrwsr.a
 ../../staticlib/components/libnsappshell.a
 ../../staticlib/components/libtxmgr.a
 ../../staticlib/components/libcommandlines.a
 ../../staticlib/components/libtoolkitcomps.a
 ../../staticlib/components/libpipboot.a
 ../../staticlib/components/libpipnss.a
 ../../staticlib/components/libappcomps.a
 ../../staticlib/components/libjsreflect.a
 ../../staticlib/components/libcomposer.a
 ../../staticlib/components/libtelemetry.a
 ../../staticlib/components/libjsinspector.a
 ../../staticlib/components/libjsdebugger.a
 ../../staticlib/components/libstoragecomps.a
 ../../staticlib/components/librdf.a
 ../../staticlib/components/libwindowds.a
 ../../staticlib/components/libjsctypes.a
 ../../staticlib/components/libjsperf.a
 ../../staticlib/components/libgkplugin.a
 ../../staticlib/components/libunixproxy.a
 ../../staticlib/components/libjsd.a
 ../../staticlib/components/libautoconfig.a
 ../../staticlib/components/libauth.a
 ../../staticlib/components/libcookie.a
 ../../staticlib/components/libpermissions.a
 ../../staticlib/components/libuniversalchardet.a
 ../../staticlib/components/libfileview.a
 ../../staticlib/components/libplaces.a
 ../../staticlib/components/libtkautocomplete.a
 ../../staticlib/components/libsatchel.a
 ../../staticlib/components/libpippki.a
 ../../staticlib/components/libwidget_gtk2.a
 ../../staticlib/components/libimgicon.a
 ../../staticlib/components/libaccessibility.a
 ../../staticlib/components/libremoteservice.a
 ../../staticlib/components/libspellchecker.a
 ../../staticlib/components/libzipwriter.a
 ../../staticlib/components/libservices-crypto.a
 ../../staticlib/libjsipc_s.a ../../staticlib/libdomipc_s.a
 ../../staticlib/libdomplugins_s.a ../../staticlib/libmozipc_s.a
 ../../staticlib/libmozipdlgen_s.a ../../staticlib/libipcshell_s.a
 ../../staticlib/libgfxipc_s.a ../../staticlib/libhal_s.a
 ../../staticlib/libdombindings_s.a ../../staticlib/libxpcom_core.a
 ../../staticlib/libucvutil_s.a ../../staticlib/libchromium_s.a
 ../../staticlib/libsnappy_s.a ../../staticlib/libgtkxtbin.a
 ../../staticlib/libthebes.a ../../staticlib/libgl.a
 ../../staticlib/libycbcr.a  -L../../dist/bin -L../../dist/lib
 /usr/pkgsrc/devel/xulrunner/work/mozilla-esr17/dist/lib/libjs_static.a
 -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lffi   -Wl,-R/usr/pkg/lib/nss
 -Wl,-R/usr/pkg/lib/nspr -L/usr/pkg/lib/nss -L/usr/pkg/lib/nspr -lnss3
 -lsmime3 -lssl3 -lsoftokn3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread
 -lrt   -lcrmf -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lcairo
 -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lXrender -lcairo -lXext -lX11
 -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lsqlite3    -ljpeg -lz
 -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lhunspell-1.3   -L/usr/pkg/lib
 -levent -L/usr/pkg/lib -lvpx   -Wl,-R/usr/pkg/lib -L/usr/pkg/lib
 -lpixman-1   ../../dist/lib/libgkmedias.a   -L../../dist/bin
 -L../../dist/lib  -Wl,-R/usr/pkg/lib/nspr -L/usr/pkg/lib/nspr -lplds4
 -lplc4 -lnspr4 -pthread -ldl ../../dist/lib/libmozalloc.a  -lX11
 -lXext  -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lpangoft2-1.0 -lfreetype
 -lfontconfig -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0
 -lglib-2.0 -lintl   -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lfontconfig
 -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lgtk-x11-2.0 -latk-1.0 -lgio-2.0
 -lpangoft2-1.0 -lfreetype -lfontconfig -lgdk-x11-2.0 -lpangocairo-1.0
 -lgdk_pixbuf-2.0 -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0 -lintl
 -lXt -lgthread-2.0 -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lfreetype
 -Wl,--warn-unresolved-symbols -lplc4 -lplds4 -lnspr4 -lnssutil3  -lc
 -lkvm
 ../components/osfile/osfileutils.o: In function `error_not_supported':
 /usr/pkgsrc/devel/xulrunner/work/mozilla-esr17/toolkit/components/osfile/osfileutils.cpp:51:
 warning: undefined reference to `(anonymous namespace)::errno'
 ../components/osfile/osfileutils.o: In function `error_invalid_argument':
 /usr/pkgsrc/devel/xulrunner/work/mozilla-esr17/toolkit/components/osfile/osfileutils.cpp:60:
 warning: undefined reference to `(anonymous namespace)::errno'
 ../components/osfile/osfileutils.o: In function `error_no_memory':
 /usr/pkgsrc/devel/xulrunner/work/mozilla-esr17/toolkit/components/osfile/osfileutils.cpp:69:
 warning: undefined reference to `(anonymous namespace)::errno'
 ../components/osfile/osfileutils.o: In function `error_invalid_argument':
 /usr/pkgsrc/devel/xulrunner/work/mozilla-esr17/toolkit/components/osfile/osfileutils.cpp:60:
 warning: undefined reference to `(anonymous namespace)::errno'
 /usr/pkgsrc/devel/xulrunner/work/mozilla-esr17/toolkit/components/osfile/osfileutils.cpp:60:
 warning: undefined reference to `(anonymous namespace)::errno'
 ../components/osfile/osfileutils.o:/usr/pkgsrc/devel/xulrunner/work/mozilla-esr17/toolkit/components/osfile/osfileutils.cpp:51:
 warning: more undefined references to `(anonymous namespace)::errno'
 follow
 chmod +x libxul.so

From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: John Marino <netbsd@marino.st>, John Marino <marino@netbsd.org>
Subject: Re: pkg/47233: xulrunner DragonFly x86_64 call of overloaded
 'FromTicks(long long int)' is ambiguous
Date: Mon, 26 Nov 2012 21:51:46 -0800

 As I have reported on the DragonFly bug tracking system,
 http://bugs.dragonflybsd.org/issues/2463
 a minimal C++ test file cpperrno.cpp has been written that shows why
 pkgsrc current devel/xulrunner for firefox 17.0esr breaks only on
 DragonFly, not on other platforms such as NetBSD.  Executing
 $ c++ cpperrno.cpp
 $ ./a.out
 on platforms other than DragonFly produces output
 errno = 22
 while DragonFly produces an error:
 $ c++ cpperrno.cpp
 /tmp//ccTk4OGn.o: In function `(anonymous namespace)::__error()':
 cpperrno.cpp:(.text+0x10): undefined reference to `(anonymous namespace)::errno'

 A brief inspection of DragonFly's source code reveals in
 /usr/src/sys/sys/errno.h a declaration using the __thread storage
 class keyword for thread-local storage (TLS):

 #if !defined(_KERNEL) || defined(_KERNEL_VIRTUAL)
 extern __thread int errno;

 Obviously the immediate reaction would appear to be "Fix DragonFly."
 But the use of __thread is there for a reason, excising it would
 appear to have possibly hard to predict breakage for other userland
 programs on DragonFly, and a more elaborate mechanism for TLS would
 appear to require some time to implement.  In the interim, I would
 like to ask what are the limits for hackery that would simply allow
 devel/xulrunner to build again on DragonFly, hackery such as adding a
 fair number of  #ifdef's only for DragonFly?

 /* begin cpperrno.cpp */
 namespace {

 #pragma GCC visibility push(default)
 #include <errno.h>
 #pragma GCC visibility pop

 void innamespace() {
 	errno = EINVAL;
 }

 } /* end namespace */

 extern "C" {

 void seterrno() {
 	innamespace();
 }

 } /* end extern */

 #include <stdio.h>
 #include <errno.h>

 int main() {
 	seterrno();
 	printf("errno = %d\n", errno);
 	return errno;
 }
 /* end cpperrno.cpp */

From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/47233: xulrunner DragonFly x86_64 call of overloaded
 'FromTicks(long long int)' is ambiguous
Date: Tue, 27 Nov 2012 07:08:03 -0800

 As was pointed out in a followup to
 http://bugs.dragonflybsd.org/issues/2463
 the problem on DragonFly is not the use of __thread, it is omission of
 __BEGIN_DECLS and __END_DECLS around the relevant errno related parts
 of /usr/src/sys/sys/errno.h.

 The following patch allows successful building of Firefox 17.0esr on
 DragonFly x86_64.  It is not intended to be submitted as an official
 patch as the part defining out the use of errno only for DragonFly
 will hopefully be made redundant if / when the missing __BEGIN_DECLS
 and __END_DECLS are added.  The part using an explicit cast to int64_t
 for INT64_MIN and INT64_MAX may have to be submitted as an official
 patch that hopefully does no harm on platforms other than DragonFly.
 No reply so far has been made for whether it is a problem on x86_64 to
 define INT64_MIN and INT64_MAX as long long ints LL.
 http://bugs.dragonflybsd.org/issues/2461

 I note the patch only for those using DragonFly who wish to build and
 the latest xulrunner and firefox 17.0esr while more permanent fixes
 are hopefully made elsewhere.

 diff --git a/devel/xulrunner/distinfo b/devel/xulrunner/distinfo
 index dbb4e23..744e621 100644
 --- a/devel/xulrunner/distinfo
 +++ b/devel/xulrunner/distinfo
 @@ -91,6 +91,7 @@ SHA1 (patch-pd) = c6b261264770c8a5eda31690b37f7eb992333f2a
  SHA1 (patch-pg) = a89cb4b92f974d32d4a309a4628f32aff306de71
  SHA1 (patch-rc) = 13b0253d166cac6b4b1e7efaba006e37015cbbdb
  SHA1 (patch-storage_src_Makefile.in) = 3f9a4bc71a6b64df819bbce6dbae18705d2183ac
 +SHA1 (patch-toolkit_components_osfile_osfileutils.cpp) =
 68f51d761e096c7df7185207ad4ac57d4480d140
  SHA1 (patch-toolkit_library_Makefile.in) =
 4193e7bafdac62a84c5a5ce4a21f0c616ce51362
  SHA1 (patch-toolkit_toolkit-tiers.mk) =
 7c878d6d4a2ad3ddaa353d6f56d4954b7861d1ad
  SHA1 (patch-xa) = 5b66ed59bc9603a059e11695ae4c380093b36157
 @@ -107,5 +108,6 @@ SHA1 (patch-xm) = aab7aa76909b520b9c1fdc5a27c4ec440e060cce
  SHA1 (patch-xn) = 27ca333ce018a5f72278461a55d141c063ac98ca
  SHA1 (patch-xo) = 3d875dad673a47b2059b8eea9f41fe9e370295d5
  SHA1 (patch-xpcom_Makefile.in) = c44608dc176900c3ce49fb7059e42e404a7c6df3
 +SHA1 (patch-xpcom_ds_TimeStamp.h) = 450cca178f916082c75ef1b2deb23b0f3446ff02
  SHA1 (patch-xpcom_idl-parser_Makefile.in) =
 0382a7ab00c2e7245f5ddbbe5a50036a8ae418ef
  SHA1 (patch-xpcom_typelib_xpidl_Makefile.in) =
 4821d564e467494f65e70bb9ecec7cac2754ca0c
 diff --git a/devel/xulrunner/patches/patch-toolkit_components_osfile_osfileutils.cpp
 b/devel/xulrunner/patches/patch-toolkit_components_osfile_osfileutils.cpp
 new file mode 100644
 index 0000000..8a2266b
 --- /dev/null
 +++ b/devel/xulrunner/patches/patch-toolkit_components_osfile_osfileutils.cpp
 @@ -0,0 +1,34 @@
 +$NetBSD$
 +
 +--- toolkit/components/osfile/osfileutils.cpp.orig	2012-11-27
 05:54:16.000000000 +0000
 ++++ toolkit/components/osfile/osfileutils.cpp
 +@@ -48,7 +48,9 @@ void error_no_memory() {
 +  * the last operation failed because it is not supported.
 +  */
 + void error_not_supported() {
 ++#if !defined(__DragonFly__)
 +   errno = ENOTSUP;
 ++#endif
 + }
 +
 + /**
 +@@ -57,7 +59,9 @@ void error_not_supported() {
 +  * argument.
 +  */
 + void error_invalid_argument() {
 ++#if !defined(__DragonFly__)
 +   errno = EINVAL;
 ++#endif
 + }
 +
 + /**
 +@@ -66,7 +70,9 @@ void error_invalid_argument() {
 +  * memory.
 +  */
 + void error_no_memory() {
 ++#if !defined(__DragonFly__)
 +   errno = ENOMEM;
 ++#endif
 + }
 +
 + #endif // defined(XP_WIN)
 diff --git a/devel/xulrunner/patches/patch-xpcom_ds_TimeStamp.h
 b/devel/xulrunner/patches/patch-xpcom_ds_TimeStamp.h
 new file mode 100644
 index 0000000..80ebdfd
 --- /dev/null
 +++ b/devel/xulrunner/patches/patch-xpcom_ds_TimeStamp.h
 @@ -0,0 +1,18 @@
 +$NetBSD$
 +
 +--- xpcom/ds/TimeStamp.h.orig	2012-11-19 15:43:32.000000000 +0000
 ++++ xpcom/ds/TimeStamp.h
 +@@ -130,11 +130,11 @@ private:
 +     // NOTE: this MUST be a >= test, because int64_t(double(INT64_MAX))
 +     // overflows and gives LL_MININT.
 +     if (aTicks >= double(INT64_MAX))
 +-      return TimeDuration::FromTicks(INT64_MAX);
 ++      return TimeDuration::FromTicks(int64_t(INT64_MAX));
 +
 +     // This MUST be a <= test.
 +     if (aTicks <= double(INT64_MIN))
 +-      return TimeDuration::FromTicks(INT64_MIN);
 ++      return TimeDuration::FromTicks(int64_t(INT64_MIN));
 +
 +     return TimeDuration::FromTicks(int64_t(aTicks));
 +   }

From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/47233: xulrunner DragonFly x86_64 call of overloaded
 'FromTicks(long long int)' is ambiguous
Date: Thu, 29 Nov 2012 20:02:44 -0800

 Updating DragonFly master src through

 commit 46163a31d70f54ec0d6ca79f16c30b5a9dd1959d
 Date:   Thu Nov 29 21:57:05 2012 +0100

     int64_t is long on x86_64, and not always equivalent to long long.

 pulls in fixes for Bug #2461 and Bug #2463
 http://bugs.dragonflybsd.org/issues/2461
 http://bugs.dragonflybsd.org/issues/2463

 These fixes enable successful building of devel/xulrunner and
 www/firefox associated with Firefox 17.0esr on both DragonFly
 3.3-DEVELOPMENT x86 and i386.  Thanks to the DragonFly developers who
 developed the fixes that enable this pkgsrc bug report to be resolved.

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/47233: xulrunner DragonFly x86_64 call of overloaded
 'FromTicks(long long int)' is ambiguous
Date: Tue, 4 Dec 2012 06:25:27 +0000

 On Fri, Nov 30, 2012 at 04:05:03AM +0000, David Shao wrote:
  >  Updating DragonFly master src through
  >  
  >  commit 46163a31d70f54ec0d6ca79f16c30b5a9dd1959d
  >  Date:   Thu Nov 29 21:57:05 2012 +0100
  >  
  >      int64_t is long on x86_64, and not always equivalent to long long.
  >  
  >  pulls in fixes for Bug #2461 and Bug #2463
  >  http://bugs.dragonflybsd.org/issues/2461
  >  http://bugs.dragonflybsd.org/issues/2463
  >  
  >  These fixes enable successful building of devel/xulrunner and
  >  www/firefox associated with Firefox 17.0esr on both DragonFly
  >  3.3-DEVELOPMENT x86 and i386.  Thanks to the DragonFly developers who
  >  developed the fixes that enable this pkgsrc bug report to be resolved.

 Does this mean the errno patch is no longer needed (so this PR can be
 closed)?

 -- 
 David A. Holland
 dholland@netbsd.org

From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/47233: xulrunner DragonFly x86_64 call of overloaded
 'FromTicks(long long int)' is ambiguous
Date: Tue, 04 Dec 2012 23:03:22 +0900 (JST)

 Hi,

 From: David Holland <dholland-pbugs@NetBSD.org>, Date: Tue,  4 Dec 2012 06:30:08 +0000 (UTC)

 > The following reply was made to PR pkg/47233; it has been noted by GNATS.
 > 
 > From: David Holland <dholland-pbugs@netbsd.org>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: pkg/47233: xulrunner DragonFly x86_64 call of overloaded
 >  'FromTicks(long long int)' is ambiguous
 > Date: Tue, 4 Dec 2012 06:25:27 +0000
 > 
 >  On Fri, Nov 30, 2012 at 04:05:03AM +0000, David Shao wrote:
 >   >  Updating DragonFly master src through
 >   >  
 >   >  commit 46163a31d70f54ec0d6ca79f16c30b5a9dd1959d
 >   >  Date:   Thu Nov 29 21:57:05 2012 +0100
 >   >  
 >   >      int64_t is long on x86_64, and not always equivalent to long long.
 >   >  
 >   >  pulls in fixes for Bug #2461 and Bug #2463
 >   >  http://bugs.dragonflybsd.org/issues/2461
 >   >  http://bugs.dragonflybsd.org/issues/2463
 >   >  
 >   >  These fixes enable successful building of devel/xulrunner and
 >   >  www/firefox associated with Firefox 17.0esr on both DragonFly
 >   >  3.3-DEVELOPMENT x86 and i386.  Thanks to the DragonFly developers who
 >   >  developed the fixes that enable this pkgsrc bug report to be resolved.
 >  
 >  Does this mean the errno patch is no longer needed (so this PR can be
 >  closed)?

 No released version of DragonFly have these fixes in header files.

 The errno patches should be included into devel/xulrunner.
 I am working on it.

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Responsible-Changed-From-To: pkg-manager->ryoon
Responsible-Changed-By: ryoon@NetBSD.org
Responsible-Changed-When: Tue, 04 Dec 2012 20:26:59 +0000
Responsible-Changed-Why:
I will take this.


From: "Ryo ONODERA" <ryoon@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/47233 CVS commit: pkgsrc/devel/xulrunner
Date: Tue, 4 Dec 2012 20:28:45 +0000

 Module Name:	pkgsrc
 Committed By:	ryoon
 Date:		Tue Dec  4 20:28:45 UTC 2012

 Modified Files:
 	pkgsrc/devel/xulrunner: distinfo
 Added Files:
 	pkgsrc/devel/xulrunner/patches:
 	    patch-toolkit_components_osfile_osfileutils.cpp
 	    patch-xpcom_ds_TimeStamp.h

 Log Message:
 Fix PR pkg/47233

 * Fix build on DragonFly/i386 and amd64


 To generate a diff of this commit:
 cvs rdiff -u -r1.84 -r1.85 pkgsrc/devel/xulrunner/distinfo
 cvs rdiff -u -r0 -r1.1 \
     pkgsrc/devel/xulrunner/patches/patch-toolkit_components_osfile_osfileutils.cpp \
     pkgsrc/devel/xulrunner/patches/patch-xpcom_ds_TimeStamp.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: ryoon@NetBSD.org
Subject: Re: pkg/47233 (xulrunner DragonFly x86_64 call of overloaded
 'FromTicks(long long int)' is ambiguous)
Date: Tue, 4 Dec 2012 13:58:36 -0800

 Please revert the commit
 CVS commit: pkgsrc/devel/xulrunner
 Module Name:    pkgsrc
 Committed By:   ryoon
 Date:           Tue Dec  4 20:28:45 UTC 2012

 Modified Files:
         pkgsrc/devel/xulrunner: distinfo
 Added Files:
         pkgsrc/devel/xulrunner/patches:
             patch-toolkit_components_osfile_osfileutils.cpp
             patch-xpcom_ds_TimeStamp.h

 Both problems were caused on DragonFly BSD's end and were fixed:
 http://bugs.dragonflybsd.org/issues/2461
 http://bugs.dragonflybsd.org/issues/2463

From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: ryoon@netbsd.org
Subject: Re: pkg/47233 (xulrunner DragonFly x86_64 call of overloaded
 'FromTicks(long long int)' is ambiguous)
Date: Tue, 4 Dec 2012 21:37:03 -0800

 My understanding is that both fixes to DragonFly's header files were
 applied to the 3.2-RELEASE branch.

 http://lists.dragonflybsd.org/pipermail/commits/2012-November/032174.html
 "DragonFly_RELEASE_3_2 <sys/errno.h>: Try to fix errno's declaration a
 bit better for C++."

 http://lists.dragonflybsd.org/pipermail/commits/2012-November/032178.html
 "DragonFly_RELEASE_3_2 int64_t is long on x86_64, and not always
 equivalent to long long."

From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org, davshao@gmail.com
Cc: 
Subject: Re: pkg/47233 (xulrunner DragonFly x86_64 call of overloaded
 'FromTicks(long long int)' is ambiguous)
Date: Wed, 05 Dec 2012 16:30:33 +0900 (JST)

 Hi,

 From: David Shao <davshao@gmail.com>, Date: Wed,  5 Dec 2012 05:40:07 +0000 (UTC)

 > The following reply was made to PR pkg/47233; it has been noted by GNATS.
 > 
 > From: David Shao <davshao@gmail.com>
 > To: gnats-bugs@netbsd.org
 > Cc: ryoon@netbsd.org
 > Subject: Re: pkg/47233 (xulrunner DragonFly x86_64 call of overloaded
 >  'FromTicks(long long int)' is ambiguous)
 > Date: Tue, 4 Dec 2012 21:37:03 -0800
 > 
 >  My understanding is that both fixes to DragonFly's header files were
 >  applied to the 3.2-RELEASE branch.
 >  
 >  http://lists.dragonflybsd.org/pipermail/commits/2012-November/032174.html
 >  "DragonFly_RELEASE_3_2 <sys/errno.h>: Try to fix errno's declaration a
 >  bit better for C++."
 >  
 >  http://lists.dragonflybsd.org/pipermail/commits/2012-November/032178.html
 >  "DragonFly_RELEASE_3_2 int64_t is long on x86_64, and not always
 >  equivalent to long long."

 Do DragonFly people really want to drop support for 3.2.1 release?
 If so, I will revert them.

 Thank you.

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: ryoon@netbsd.org
Subject: Re: pkg/47233 (xulrunner DragonFly x86_64 call of overloaded
 'FromTicks(long long int)' is ambiguous)
Date: Wed, 5 Dec 2012 19:41:39 -0800

 I do not represent nor do I speak for the DragonFly project, and I
 hope I have never given the impression that I do so.  I can only
 report that the current pkgsrc master as of:

 commit 6b6b3ace7a33c61e7e1c7f0844d86843b7cf4092
 Author: pkgsrc fixup <pkgsrc@dragonflybsd.org>
 Date:   Wed Dec 5 18:27:56 2012 -0800

 both devel/xulrunner and www/firefox build and appear to function
 correctly on DragonFly 3.3-DEVELOPMENT x86_64.

 I was willing to have the bug closed before the latest patches, but as
 xulrunner and firefox still build correctly, I am equally willing to
 have the bug closed now.  My reticence was more that it does take a
 long time for firefox to be rebuilt on my much slower i386 machines,
 which are still building as I write, so I cannot completely rule out
 some problem.

>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.