Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Sep 2012 00:00:17 GMT
From:      Yamaya Takashi <yamayan@kbh.biglobe.ne.jp>
To:        gecko@FreeBSD.org
Subject:   Re: ports/171343: [patch] build www/firefox and mail/thunderbird with clang
Message-ID:  <201209080000.q8800HLk088614@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/171343; it has been noted by GNATS.

From: Yamaya Takashi <yamayan@kbh.biglobe.ne.jp>
To: Jan Beich <jbeich@tormail.org>, bug-followup@FreeBSD.org
Cc: Florian Smeets <flo@smeets.im>
Subject: Re: ports/171343: [patch] build www/firefox and mail/thunderbird
 with clang
Date: Sat, 08 Sep 2012 08:57:59 +0900

 On 2012/09/05 23:30, Jan Beich wrote:
 > yamayan <yamayan@kbh.biglobe.ne.jp> writes:
 >
 >> +CXX_NAME!= ${CXX} --version | ${AWK} 'NR == 1 { gsub(/[()]/, "", $$2); print $$2 }'
 > It's probably less error prone to just check for a known string.
 >
 > https://github.com/libav/libav/blob/master/configure#L2268
 >
 >   $ /usr/local/bin/clang++ | awk 'NR == 1 { gsub(/[()]/, "", $2); print $2 }'
 >   version
 >   
 >   $ g++47 --version | awk 'NR == 1 { gsub(/[()]/, "", $2); print $2 }'
 >   FreeBSD
 >
 > Compiler detection needs to be in bsd.port.mk, similar to ports/162178.
 > Wait for CLANG_IS_CC to become default and put pressure on portmgr@.
 >
 > This affects all ports, not only gecko.
 >
 >> +.if ${CXX_NAME} == "clang"
 >> +.if empty(CXXFLAGS:M-stdlib=libc++)
 >> +CXXFLAGS+= -stdlib=libc++
 >> +.endif
 > Ditto for WITH_LIBCPLUSPLUS.
 >
 What do you mean?
 
 
 >> +CXXFLAGS+= -Wno-c++11-narrowing
 > Can you show where it occurs with firefox? Those in thunderbird/seamonkey
 > were fixed by jkim@ patch and later in upstream, too.
 >
 > https://bugzilla.mozilla.org/show_bug.cgi?id=747621
 different bug!!!
 
 error log:
 (snip)
 c++ -o jscntxt.o -c -fvisibility=hidden -DENABLE_YARR_JIT=1
 -DMOZ_GLUE_IN_PROGRAM -DEXPORT_JS_API -DJS_HAS_CTYPES
 -DDLL_PREFIX=\"lib\" -DDLL_SUFFIX=\".so\" -DNO_NSPR_10_SUPPORT
 -I/usr/local/lib/libffi-3.0.9/incl
 ude -I. -I./../../mfbt/double-conversion -I. -I. -I./../../dist/include
 -I./../../dist/include/nsprpub -I/usr/local/include/nspr -I.
 -I./assembler -I./yarr -fPIC -Qunused-arguments -isystem/usr/local/include
 -I/usr/local/include/nss -I/usr/local/include/nss/nss
 -I/usr/local/include -fno-rtti -Qunused-arguments -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 -Wno-c++0x-extensions -Wno-extended-offsetof
 -Wno-unknown-warning-option -Wno-return-type-c-linkage -O2 -pipe
 -Qunused-argument
 s -march=native -fno-strict-aliasing -std=c++11 -stdlib=libc++
 -ffunction-sections -fdata-sections -pipe -DNDEBUG -DTRIMMED -O2
 -fomit-frame-pointer -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1
 -DENABLE_JIT=1 -Qu
 nused-arguments -isystem/usr/local/include -I/usr/local/include/nss
 -I/usr/local/include/nss/nss -I/usr/local/include -DMOZILLA_CLIENT
 -include ./js-confdefs.h -MD -MF .deps/jscntxt.pp /usr/ports/www/
 firefox/work/mozilla-release/js/src/jscntxt.cpp
 In file included from
 /usr/ports/www/firefox/work/mozilla-release/js/src/jsarray.cpp:1:
 /usr/ports/www/firefox/work/mozilla-release/js/src/jsarray.cpp:2290:47:
 error: non-constant-expression cannot be narrowed from type 'int' to
 'size_t' (aka 'unsigned long') in initializer list [-Wc++11-narrowing]
 StringifiedElement el = { cursor, sb.length(), i };
 ^~~~~~
 /usr/ports/www/firefox/work/mozilla-release/js/src/jsarray.cpp:2290:47:
 note: override this message by inserting an explicit cast
 StringifiedElement el = { cursor, sb.length(), i };
 ^~~~~~
 (snip)
 
 >> +CXXFLAGS+= -Wno-reserved-user-defined-literal
 > Do you mean those occuring with DBUS and GSTREAMER? Fixing in their
 > respective ports would benefit all consumers, not only gecko.
 DBUS:yes
 GSTREAMER:unknown
 
 see ports/171414
 
 >> Index: www/firefox/files/patch-js-src-configure.in
 > It seems to be a libc++ bug and can be worked around with a shorter patch.
 >
 > http://llvm.org/bugs/show_bug.cgi?id=13688
 >
 No libc++ bug, but shorter patch works.
 
 For controlling visibility, use gcc_hidden.h or -fvisibility option.
 When no gcc bug, use gcc_hidden.h.
 When gcc bug, use -fvisibility option.
 Both clang and gcc support -fvisibility option and attribute visibility,
 so I think always use -fvisibility option when gcc bug or not.
 
 error log:
 (snip)
 In file included from
 /usr/ports/www/firefox/work/mozilla-release/js/src/jsapi.cpp:1:
 In file included from
 /usr/ports/www/firefox/work/mozilla-release/js/src/jsapi.cpp:45:
 ./jsproxy.h:17:22: error: visibility does not match previous declaration
 class __attribute__((visibility("default"))) BaseProxyHandler {
 ^
 ./config/gcc_hidden.h:6:13: note: previous attribute is here
 #pragma GCC visibility push(hidden)
 ^
 In file included from
 /usr/ports/www/firefox/work/mozilla-release/js/src/jsapi.cpp:1:
 In file included from
 /usr/ports/www/firefox/work/mozilla-release/js/src/jsapi.cpp:51:
 ./jswrapper.h:81:22: error: visibility does not match previous declaration
 class __attribute__((visibility("default"))) DirectWrapper : public
 AbstractWrapper
 ^
 ./config/gcc_hidden.h:6:13: note: previous attribute is here
 #pragma GCC visibility push(hidden)
 ^
 In file included from
 /usr/ports/www/firefox/work/mozilla-release/js/src/jsapi.cpp:1:
 In file included from
 /usr/ports/www/firefox/work/mozilla-release/js/src/jsapi.cpp:51:
 ./jswrapper.h:132:22: error: visibility does not match previous declaration
 class __attribute__((visibility("default"))) CrossCompartmentWrapper :
 public DirectWrapper
 ^
 ./config/gcc_hidden.h:6:13: note: previous attribute is here
 #pragma GCC visibility push(hidden)
 ^
 (snip)
 In file included from
 /usr/ports/www/firefox/work/mozilla-release/js/src/jsanalyze.cpp:1:
 In file included from
 /usr/ports/www/firefox/work/mozilla-release/js/src/jsanalyze.cpp:12:
 In file included from ./jsinferinlines.h:18:
 In file included from ./vm/Stack-inl.h:17:
 In file included from ./jsscriptinlines.h:22:
 In file included from ./jsscopeinlines.h:28:
 In file included from ./jsobjinlines.h:24:
 ./jsproxy.h:17:22: error: visibility does not match previous declaration
 class __attribute__((visibility("default"))) BaseProxyHandler {
 ^
 ./config/gcc_hidden.h:6:13: note: previous attribute is here
 #pragma GCC visibility push(hidden)
 ^
 In file included from
 /usr/ports/www/firefox/work/mozilla-release/js/src/jsanalyze.cpp:1:
 In file included from
 /usr/ports/www/firefox/work/mozilla-release/js/src/jsanalyze.cpp:12:
 In file included from ./jsinferinlines.h:18:
 In file included from ./vm/Stack-inl.h:17:
 In file included from ./jsscriptinlines.h:22:
 In file included from ./jsscopeinlines.h:28:
 In file included from ./jsobjinlines.h:29:
 ./jswrapper.h:81:22: error: visibility does not match previous declaration
 class __attribute__((visibility("default"))) DirectWrapper : public
 AbstractWrapper
 ^
 ./config/gcc_hidden.h:6:13: note: previous attribute is here
 #pragma GCC visibility push(hidden)
 ^
 (snip)
 
 
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209080000.q8800HLk088614>