Date: Thu, 28 Aug 2008 18:12:37 +0100 From: Anton Shterenlikht <mexas@bristol.ac.uk> To: Dieter <freebsd@sopwith.solgatos.com> Cc: freebsd-alpha@freebsd.org, freebsd-amd64@freebsd.org Subject: Re: firefox3 from ports? Message-ID: <20080828171237.GA71953@mech-cluster238.men.bris.ac.uk> In-Reply-To: <200808281641.QAA00630@sopwith.solgatos.com> References: <g96d5t$2ajo$1@lorvorc.mips.inka.de> <200808281641.QAA00630@sopwith.solgatos.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Aug 28, 2008 at 09:41:46AM +0100, Dieter wrote: > [ -alpha@ added ] >=20 > > > From what I gather the problems could show up on other > > > 64-bit platforms. >=20 > Alignment requirements vary with CPU arch, but is not a 32 vs 64 bit issu= e. >=20 > > > warning: cast from ... to ... increases > > > required alignment of target type > >=20 > > No such warnings on amd64. I think they only show up on architectures > > that require strict alignment, and amd64 doesn't. >=20 > > FWIW, building firefox on OpenBSD/alpha and /sparc64 produces lots > > of these warnings, but after all the pointer casting games are done, > > the actual accesses still come out properly aligned and firefox > > runs. >=20 > Very interesting. Are you saying that the compiler warnings are wrong? > Are you saying that a 2nd cast is done before the actual access which > undoes the increase in alignment? Do you know for certain that the code > in question is getting executed? Given the large amount of code in > firefox, and the large number of features, I can imagine that lots of > code only gets executed under rare occasions. >=20 > > > What is the easiest way to build this port with gcc42? >=20 > Try setting your PATH so that gcc42 is first. Verify by running > "gcc -v". I added this to /etc/make.conf: # Build ports/www/firefox3 with the latest gcc =2Eif ${.CURDIR:M*/www/firefox3*} USE_GCC=3D4.2+ =2Eendif this seems to work, however the error and the warnings are very similar if not identical. Then I disabled #CXXFLAGS +=3D $(WARNINGS_AS_ERRORS) in a Makefile in a particular directory which gave me the error. I did this reluctantly, following the advice from firefox developer: --- Comment #12 from Benjamin Smedberg [:bs] (bsmedberg) <benjamin@smedbergs.us> 2008-08-28 +06:45:09 PDT --- These are warnings. They are *probably* harmless. To turn off warnings-as-errors for this directory, do: make WARNINGS_AS_ERRORS=3D =66rom https://bugzilla.mozilla.org/show_bug.cgi?id=3D449373 after that the compilation went ahead with many many alignment warnings. >=20 > Are the alignment warnings the only remaining compiler warnings? there might have been other, but the alignment was a clear champion. Now I get error on linking: gmake[3]: Entering directory `/usr/ports/www/firefox3/work/mozilla/toolkit/= library' rm -f libxul.so g++42 -I/usr/local/include -I/usr/local/include -fno-rtti -fno-exceptions = -Wall -Wconversion -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-d= tor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-long-long -O -pipe -mcp= u=3Dev6 -mieee -O2 -fno-strict-aliasing -fno-strict-aliasing -fshort-wchar = -pipe -DNDEBUG -DTRIMMED -O -fPIC -shared -Wl,-z,defs -Wl,-h,libxul.so -o = libxul.so nsStaticXULComponents.o nsUnicharUtils.o nsCompressedCharMap.o n= sBidiUtils.o nsRDFResource.o -pthread -Wl,-rpath-link,../../dist/= bin -Wl,--whole-archive ../../embedding/browser/gtk/src/libgtkembedmoz.a .= =2E/../toolkit/xre/libxulapp_s.a ../../staticlib/components/libxpconnect.a= ../../staticlib/components/libnecko.a ../../staticlib/components/libuconv.= a ../../staticlib/components/libi18n.a ../../staticlib/components/libcharde= t.a ../../staticlib/components/libjar50.a ../../staticlib/components/libpre= f.a ../../staticlib/components/libcaps.a ../../staticlib/components/libhtml= pars.a ../../staticlib/components/libimglib2.a ../../staticlib/components/l= ibgklayout.a ../../staticlib/components/libdocshell.a ../../staticlib/compo= nents/libembedcomponents.a ../../staticlib/components/libwebbrwsr.a ../../s= taticlib/components/libnsappshell.a ../../staticlib/components/libtxmgr.a .= =2E/../staticlib/components/libchrome.a ../../staticlib/components/libcomma= ndlines.a ../../staticlib/components/libtoolkitcomps.a ../../staticlib/comp= onents/libpipboot.a ../../staticlib/components/libpipnss.a ../../staticlib/= components/libxmlextras.a ../../staticlib/components/libgkplugin.a ../../st= aticlib/components/libmozfind.a ../../staticlib/components/libappcomps.a ..= /../staticlib/components/libunixproxy.a ../../staticlib/components/libxpins= tall.a ../../staticlib/components/libjsd.a ../../staticlib/components/libau= toconfig.a ../../staticlib/components/libauth.a ../../staticlib/components/= libcookie.a ../../staticlib/components/libpermissions.a ../../staticlib/com= ponents/libuniversalchardet.a ../../staticlib/components/libcomposer.a ../.= =2E/staticlib/components/librdf.a ../../staticlib/components/libwindowds.a = =2E./../staticlib/components/libintlapp.a ../../staticlib/components/libfil= eview.a ../../staticlib/components/libstoragecomps.a ../../staticlib/compon= ents/libplaces.a ../../staticlib/components/libtkautocomplete.a ../../stati= clib/components/libsatchel.a ../../staticlib/components/libpippki.a ../../s= taticlib/components/libucvmath.a ../../staticlib/components/libwidget_gtk2.= a ../../staticlib/components/libsystem-pref.a ../../staticlib/components/li= bgkgfxthebes.a ../../staticlib/components/liboji.a ../../staticlib/componen= ts/libaccessibility.a ../../staticlib/components/libremoteservice.a ../../s= taticlib/components/libspellchecker.a ../../staticlib/components/libzipwrit= er.a ../../staticlib/libxpcom_core.a ../../staticlib/libucvutil_s.a ../../s= taticlib/libgkgfx.a ../../staticlib/libgfxshared_s.a ../../staticlib/libmoz= reg_s.a ../../staticlib/libmorkreader_s.a ../../staticlib/libgtkxtbin.a ../= =2E./staticlib/libgfxpsshar.a ../../staticlib/libthebes.a ../../staticlib/l= ibjsj.a -Wl,--no-whole-archive -L../../dist/lib -lsqlite3 -Wl,-Bsymbolic -= lc -L../../dist/bin -L../../dist/lib -L../../dist/bin -L../../dist/lib -L.= =2E/../jpeg -lmozjpeg -L../../modules/libimg/png -lmozpng -L../../dist/bin = -lmozlcms -L../../dist/bin -lmozjs -L../../dist/bin -L../../dist/lib -lcrmf= -lsmime3 -lssl3 -lnss3 -lnssutil3 -lsoftokn3 -L/usr/lib -lz -pthread -L/= usr/local/lib -lpangocairo-1.0 -lcairo -lpangoft2-1.0 -lpango-1.0 -lm -lfre= etype -lz -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -liconv -pt= hread -L/usr/local/lib -lcairo -lfreetype -lz -lfontconfig -L/usr/local/= lib -pthread -L/usr/local/lib -lXrender -lcairo -lX11 -L/usr/local/lib -l= plds4 -lplc4 -lnspr4 -pthread -L/usr/local/lib -lX11 -L/usr/local/lib -lXf= t -lXrender -lfontconfig -lfreetype -lz -lX11 -pthread -L/usr/local/lib -= lgtk-x11-2.0 -latk-1.0 -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lXe= xt -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lca= iro -lpangoft2-1.0 -lpango-1.0 -lm -lfreetype -lz -lfontconfig -lgmodule-2.= 0 -lX11 -lXfixes -lgobject-2.0 -lglib-2.0 -liconv -lXt -lgthread-2.0 -L/u= sr/local/lib -lfreetype -lz -lm -pthread -pthread -L/usr/local/lib -liconv = =20 =2E./../staticlib/components/libxpconnect.a(xpcwrappednative.o)(.text+0x303= c): In function `XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNa= tive::CallMode)': : undefined reference to `NS_InvokeByIndex_P' =2E./../staticlib/components/libxpconnect.a(xpcwrappednative.o)(.text+0x307= c): In function `XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNa= tive::CallMode)': : undefined reference to `NS_InvokeByIndex_P' =2E./../staticlib/components/libgklayout.a(txXPCOMExtensionFunction.o)(.tex= t+0xc1c): In function `txXPCOMExtensionFunctionCall::evaluate(txIEvalContex= t*, txAExprResult**)': : undefined reference to `NS_InvokeByIndex_P' =2E./../staticlib/components/libgklayout.a(nsXTFInterfaceAggregator.o)(.tex= t+0x2cc): In function `nsXTFInterfaceAggregator::CallMethod(unsigned short,= XPTMethodDescriptor const*, nsXPTCMiniVariant*)': : undefined reference to `NS_InvokeByIndex_P' =2E./../staticlib/components/libgklayout.a(nsXTFWeakTearoff.o)(.text+0x208)= : In function `nsXTFWeakTearoff::CallMethod(unsigned short, XPTMethodDescri= ptor const*, nsXPTCMiniVariant*)': : undefined reference to `NS_InvokeByIndex_P' =2E./../staticlib/libxpcom_core.a(nsProxyEvent.o)(.text+0x944): more undefi= ned references to `NS_InvokeByIndex_P' follow =2E./../staticlib/libxpcom_core.a(xptcinvoke_freebsd_alpha.o)(.text+0x44): = In function `XPTC_InvokeByIndex': : undefined reference to `$invoke_copy_to_stack..ng' =2E./../staticlib/libxpcom_core.a(xptcstubs_freebsd_alpha.o)(.text+0x40): I= n function `SharedStub': : undefined reference to `$PrepareAndDispatch..ng' collect2: ld returned 1 exit status gmake[3]: *** [libxul.so] Error 1 gmake[3]: Leaving directory `/usr/ports/www/firefox3/work/mozilla/toolkit/l= ibrary' The final 4 lines refer to 2 xptc* files, which I copied from FF2 distro and modified myself, so that probably means I have to review these 2 files. thanks --=20 Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 928 8233=20 Fax: +44 (0)117 929 4423
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080828171237.GA71953>