From owner-freebsd-gecko@FreeBSD.ORG Sat Sep 8 00:00:17 2012 Return-Path: Delivered-To: gecko@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9D83106566B for ; Sat, 8 Sep 2012 00:00:17 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9DB508FC08 for ; Sat, 8 Sep 2012 00:00:17 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q8800HFX088627 for ; Sat, 8 Sep 2012 00:00:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q8800HLk088614; Sat, 8 Sep 2012 00:00:17 GMT (envelope-from gnats) Date: Sat, 8 Sep 2012 00:00:17 GMT Message-Id: <201209080000.q8800HLk088614@freefall.freebsd.org> To: gecko@FreeBSD.org From: Yamaya Takashi Cc: Subject: Re: ports/171343: [patch] build www/firefox and mail/thunderbird with clang X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Yamaya Takashi List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Sep 2012 00:00:17 -0000 The following reply was made to PR ports/171343; it has been noted by GNATS. From: Yamaya Takashi To: Jan Beich , bug-followup@FreeBSD.org Cc: Florian Smeets 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 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)