Closed Bug 691053 Opened 8 years ago Closed Last year

nsGNOMEShellService include declaration of class gfxUnknownSurface but it is not linker with implementation

Categories

(Firefox :: General, defect)

7 Branch
x86_64
Linux
defect
Not set

Tracking

()

RESOLVED INVALID

People

(Reporter: jh, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20100101 Firefox/7.0
Build ID: 2011092200

Steps to reproduce:

Built Mozilla trunk with GCC LTO


Actual results:

/usr/bin/python2.6 /abuild/jh/mozilla-central2/mozilla-central/config/pythonpath.py -I../../../config /abuild/jh/mozilla-central2/mozilla-central/config/expandlibs_exec.py --uselist --  /abuild/jh/trunk-install/bin/g++ -flto=24 -fuse-linker-plugin -fno-fat-lto-objects  -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -pedantic -Wno-long-long -fno-strict-aliasing -std=gnu++0x -pthread -pipe  -DNDEBUG -DTRIMMED -O3 -fomit-frame-pointer -fPIC -shared -Wl,-z,defs -Wl,-h,libbrowsercomps.so -o libbrowsercomps.so  nsModule.o    -lpthread   -Wl,-rpath-link,/abuild/jh/build-mozilla-new14-gnu-ld/dist/bin -Wl,-rpath-link,/usr/local/lib   ../feeds/src/libbrowser_feeds_s.a ../privatebrowsing/src/libprivatebrowsing_s.a ../about/libbrowserabout_s.a ../dirprovider/libbrowserdir_s.a  ../shell/src/libshellservice_s.a ../migration/src/libmigration_s.a /abuild/jh/build-mozilla-new14-gnu-ld/dist/lib/libunicharutil_external_s.a /abuild/jh/build-mozilla-new14-gnu-ld/dist/lib/libmozreg_s.a /abuild/jh/build-mozilla-new14-gnu-ld/dist/lib/libxpcomglue_s.a -L/abuild/jh/build-mozilla-new14-gnu-ld/dist/bin -lxpcom -lmozalloc -lxul  -L/abuild/jh/build-mozilla-new14-gnu-ld/dist/bin -L/abuild/jh/build-mozilla-new14-gnu-ld/dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl  -lgtk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lfreetype -lz -lfontconfig -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0     -Wl,--version-script -Wl,/abuild/jh/mozilla-central2/mozilla-central/build/unix/gnu-ld-scripts/components-version-script -Wl,-Bsymbolic -ldl
/tmp/ccIn3nN7.ltrans10.ltrans.o:(.data.rel.ro._ZTV17gfxUnknownSurface[_ZTV17gfxUnknownSurface]+0x18): undefined reference to `gfxASurface::BeginPrinting(nsAString const&, nsAString const&)'
collect2: error: ld returned 1 exit status


The problem is that due to problems with Linker plugin API we are not able to optimize out the unused virtual destructor of the class. For this reason the class stays in and prevents Mozilla from linking.
I am working on fix at binutils/GCC side (it is a missed optimization), but it is not valid in C++ to do so.


Expected results:

It should've linked
More detailed explanation why the symbol gets stuck in the library is here
http://sourceware.org/bugzilla/show_bug.cgi?id=13229
it is all bit fragile.

Honza
I don't think this is happening anymore
Status: UNCONFIRMED → RESOLVED
Closed: Last year
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.