From owner-freebsd-gecko@FreeBSD.ORG Sat Jan 29 20:38:21 2011 Return-Path: Delivered-To: freebsd-gecko@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EF171065674; Sat, 29 Jan 2011 20:38:21 +0000 (UTC) (envelope-from shuvaev@physik.uni-wuerzburg.de) Received: from mailrelay.rz.uni-wuerzburg.de (mailrelay.rz.uni-wuerzburg.de [132.187.3.28]) by mx1.freebsd.org (Postfix) with ESMTP id 418358FC1E; Sat, 29 Jan 2011 20:38:21 +0000 (UTC) Received: from virusscan.mail (localhost [127.0.0.1]) by mailrelay.mail (Postfix) with ESMTP id 0550A5AC36; Sat, 29 Jan 2011 21:20:14 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by virusscan.mail (Postfix) with ESMTP id 01BE85AC33; Sat, 29 Jan 2011 21:20:14 +0100 (CET) X-Virus-Scanned: by amavisd-new at uni-wuerzburg.de Received: from mail.physik.uni-wuerzburg.de (wthp192.physik.uni-wuerzburg.de [132.187.40.192]) by mailmaster.uni-wuerzburg.de (Postfix) with ESMTP id C8C035CD33; Sat, 29 Jan 2011 21:20:13 +0100 (CET) Received: from lexx.ifp.tuwien.ac.at ([128.131.127.223]) by mail.physik.uni-wuerzburg.de (Lotus Domino Release 8.5.2FP1) with ESMTP id 2011012921201315-21696 ; Sat, 29 Jan 2011 21:20:13 +0100 Date: Sat, 29 Jan 2011 21:20:12 +0100 From: Alexey Shuvaev To: Garrett Cooper , Anonymous , Alexander Kabaev Message-ID: <20110129202012.GA61135@lexx.ifp.tuwien.ac.at> MIME-Version: 1.0 In-Reply-To: <20110129133915.40a04c67@kan.dnsalias.net> <86aaikxoko.fsf@gmail.com> Organization: Universitaet Wuerzburg User-Agent: Mutt/1.5.21 (2010-09-15) X-MIMETrack: Itemize by SMTP Server on domino1/uni-wuerzburg(Release 8.5.2FP1|November 29, 2010) at 01/29/2011 09:20:13 PM, Serialize by Router on domino1/uni-wuerzburg(Release 8.5.2FP1|November 29, 2010) at 01/29/2011 09:20:13 PM, Serialize complete at 01/29/2011 09:20:13 PM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Cc: freebsd-gecko@FreeBSD.org, freebsd-ports@freebsd.org, freebsd-current@freebsd.org Subject: Re: [WORKAROUND] www/seamonkey2 on CURRENT X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jan 2011 20:38:21 -0000 On Fri, Jan 28, 2011 at 05:37:51PM -0800, Garrett Cooper wrote: > On Fri, Jan 28, 2011 at 3:58 PM, Alexey Shuvaev > wrote: > > Hello! > > > > It seems www/seamonkey2 is broken on CURRENT for at least 1 month now [1]. > > Examining build log and reproducing it locally, the problem is in the > > usage of libiconv in nsNativeCharsetUtils.cpp. The linker fails to > > produce libxpcom_core.so although -L/usr/local/lib and -liconv > > are specified [2]. Examining this further I found that nsNativeCharsetUtils.o > > produced with [3] fails to link with libiconv alone too [4] (note > > still unresolved libiconv references). > > I'm not a compiler/linker guru and do not understand what is happening > > here. As a workaroud I use the attached patch which disables the usage > > of libiconv in nsNativeCharsetUtils.cpp. > > ls /usr/local/lib/libiconv*so* ? > ~> ll /usr/local/lib/libiconv*so* lrwxr-xr-x 1 root wheel 13 Jan 27 13:14 /usr/local/lib/libiconv.so -> libiconv.so.3 -r--r--r-- 1 root wheel 1078567 Jan 27 13:14 /usr/local/lib/libiconv.so.3 I'm not so lame :) On Sat, Jan 29, 2011 at 01:39:15PM -0500, Alexander Kabaev wrote: > On Sat, 29 Jan 2011 13:21:44 -0500 > Alexander Kabaev wrote: > > > On Sat, 29 Jan 2011 13:02:24 -0500 (EST) > > Daniel Eischen wrote: > > > > > On Sat, 29 Jan 2011, Alexey Shuvaev wrote: > > > > > > > Hello! > > > > > > > > It seems www/seamonkey2 is broken on CURRENT for at least 1 month > > > > now [1]. Examining build log and reproducing it locally, the > > > > problem is in the usage of libiconv in nsNativeCharsetUtils.cpp. > > > > The linker fails to produce libxpcom_core.so although > > > > -L/usr/local/lib and -liconv are specified [2]. Examining this > > > > further I found that nsNativeCharsetUtils.o produced with [3] > > > > fails to link with libiconv alone too [4] (note still unresolved > > > > libiconv references). I'm not a compiler/linker guru and do not > > > > understand what is happening here. As a workaroud I use the > > > > attached patch which disables the usage of libiconv in > > > > nsNativeCharsetUtils.cpp. > > > > > > Yes, I had this problem also on -current. Does seamonkey build > > > on recent 8.x? > > > > > > libxpcomio_s.a is a static library that has unresolved references > > > to libiconv. I guess I'd expect those references to be resolved > > > with a later -L/usr/local/lib -liconv when building the shared > > > library (libxpcom_core.so), but they are not. > > > > > > > My wild guess: seamonkey tries to hide symbols that are coming from > > different .o file (this time one from libiconv.a) and that fails with > > our toolchain. > > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20218 > > -- > > Alexander Kabaev > > Follow-up to myself: Nope, the fix to said bug appears in our compiler. > Can you make amd64 version of nsNativeCharsetUtils. > -- > Alexander Kabaev > ??? (It is already on amd64) Well, I have fogotten to put my environment: ~> uname -a FreeBSD lexx.ifp.tuwien.ac.at 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r217884: Wed Jan 26 17:00:37 CET 2011 root@lexx.ifp.tuwien.ac.at:/usr/obj/usr/src/sys/GENERIC amd64 And here is the winner: On Sat, Jan 29, 2011 at 08:32:07AM +0300, Anonymous wrote: > Alexey Shuvaev writes: > > > Hello! > > > > It seems www/seamonkey2 is broken on CURRENT for at least 1 month now [1]. > > Examining build log and reproducing it locally, the problem is in the > > usage of libiconv in nsNativeCharsetUtils.cpp. The linker fails to > > produce libxpcom_core.so although -L/usr/local/lib and -liconv > > are specified [2]. Examining this further I found that nsNativeCharsetUtils.o > > produced with [3] fails to link with libiconv alone too [4] (note > > still unresolved libiconv references). > > I'm not a compiler/linker guru and do not understand what is happening > > here. As a workaroud I use the attached patch which disables the usage > > of libiconv in nsNativeCharsetUtils.cpp. > > > [...] > > /usr/bin/ld: aaa: hidden symbol `libiconv_open' isn't defined > > /head per r215840 has working -fvisibility=hidden, i.e. config/gcc_hidden.h. > Try following diff, it should enable patching iconv.h wrapper in bsd.gecko.mk > > @${ECHO_CMD} "#pragma GCC system_header" >> ${MOZSRC}/${subdir}/iconv.h > @${ECHO_CMD} "#pragma GCC visibility push(default)" >> ${MOZSRC}/${subdir}/iconv.h > @${ECHO_CMD} "#include \"${LOCALBASE}/include/iconv.h\"" >> ${MOZSRC}/${subdir}/iconv.h > @${ECHO_CMD} "#pragma GCC visibility pop" >> ${MOZSRC}/${subdir}/iconv.h > > %% > Index: www/seamonkey2/Makefile > =================================================================== > RCS file: /a/.cvsup/ports/www/seamonkey2/Makefile,v > retrieving revision 1.315 > diff -u -p -r1.315 Makefile > --- www/seamonkey2/Makefile 10 Dec 2010 13:31:12 -0000 1.315 > +++ www/seamonkey2/Makefile 29 Jan 2011 05:22:11 -0000 > @@ -28,11 +28,10 @@ ALL_TARGET= default > MAKE_JOBS_SAFE= yes > MOZ_PIS_SCRIPTS= moz_pis_S50cleanhome > MAKE_ENV= LD_LIBRARY_PATH=${WRKSRC}/dist/bin > -CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include/cairo" > +CONFIGURE_ENV= LOCALBASE=${LOCALBASE} CPPFLAGS="-I${LOCALBASE}/include/cairo" \ > + ac_cv_func__Unwind_Backtrace=no > USE_GCC= 4.2+ > > -CONFIGURE_ENV= LOCALBASE=${LOCALBASE} > - > MOZ_EXTENSIONS= default > MOZ_OPTIONS+= --with-default-mozilla-five-home=${PREFIX}/lib/${MOZILLA} \ > --enable-svg \ > @@ -121,11 +120,6 @@ post-patch: > ${WRKSRC}/mozilla/storage/build/Makefile.in > @${REINPLACE_CMD} -e '/accessibility.typeaheadfind.enablesound/s/true/false/' \ > ${WRKSRC}/mozilla/modules/libpref/src/init/all.js > - @${REINPLACE_CMD} -e 's||\"${LOCALBASE}/include/iconv.h\"|g' \ > - ${WRKSRC}/configure \ > - ${WRKSRC}/mozilla/configure \ > - ${WRKSRC}/mozilla/intl/uconv/native/nsNativeUConvService.cpp \ > - ${WRKSRC}/mozilla/xpcom/io/nsNativeCharsetUtils.cpp > @${REINPLACE_CMD} -e 's|libgnome-2.so.0|libgnome-2.so|' \ > ${WRKSRC}/mozilla/toolkit/xre/nsNativeAppSupportUnix.cpp \ > ${WRKSRC}/mozilla/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp > %% > This patch did it! I have successfully rebuilt www/seamonkey2 with the above patch applied to port's Makefile (and without my previous workaround). Everything works! As this hidden/visibility symbols are beyond my C/CPP foo, I am leaving the final decision for the experts :) Thanks, Alexey.