Closed Bug 1073975 Opened 10 years ago Closed 10 years ago

gtk3 build fails --with-system-nspr --with-system-nss: /usr/bin/ld: error: cannot find -lmozgtk_stub

Categories

(Firefox Build System :: General, defect)

33 Branch
All
FreeBSD
defect
Not set
normal

Tracking

(firefox33 affected, firefox34 fixed, firefox35 fixed, firefox-esr31 unaffected)

RESOLVED FIXED
Tracking Status
firefox33 --- affected
firefox34 --- fixed
firefox35 --- fixed
firefox-esr31 --- unaffected

People

(Reporter: jbeich, Unassigned)

References

Details

Attachments

(1 file)

Attached patch workaroundSplinter Review
It seems when building against internal NSS/NSPR the LDFLAGS for libxul.so contain -L$(DIST)/lib which provide the path for mozgtk_stub. So, when building against system versions the library searchpath isn't there and the following error occurs.

$ cat .mozconfig
ac_add_options --with-system-nspr
ac_add_options --with-system-nss
ac_add_options --with-system-icu

ac_add_options --enable-default-toolkit=cairo-gtk3

# shave build time
ac_add_options --disable-webrtc
ac_add_options --disable-tests
ac_add_options --enable-strip
ac_add_options --disable-debug-symbols

$ gmake -f client.mk build
...
gmake[2]: Entering directory 'toolkit/library/build'
libxul.so
rm -f libxul.so
_virtualenv/bin/python config/expandlibs_exec.py --depend .deps/libxul.so.pp --target libxul.so --uselist --  c++ -Qunused-arguments   -I/usr/local/include -Qunused-arguments -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Werror=int-to-pointer-cast -Wtype-limits -Wempty-body -Wsign-compare -Wno-invalid-offsetof -Wno-inline-new-delete -Wno-c++0x-extensions -Wno-extended-offsetof -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pipe  -DNDEBUG -DTRIMMED -O -fomit-frame-pointer -fPIC -shared -Wl,-h,libxul.so -o libxul.so     -pthread  -Wl,-z,noexecstack -Wl,-z,text -B build/unix/gold   -Wl,-rpath-link,dist/bin -Wl,-rpath-link,/usr/local/lib   ../../../toolkit/library/libxul.a dist/lib/libjs_static.a -licui18n -L/usr/local/lib -licuuc -licudata   -L/usr/local/lib/nss -lssl3 -lsmime3 -lnss3 -lnssutil3 -lcrmf -L/usr/local/lib -lcairo -pthread    -L/usr/local/lib -lcairo -pthread -lXext -lXrender -L/usr/local/lib -lX11     ../../../dist/lib/libmozsqlite3.a  modules/zlib/src/libmozz.a -L/usr/local/lib -lpixman-1   ../../../layout/media/libgkmedias.a -L/usr/local/lib -lasound    -L/usr/local/lib -lplds4 -lplc4 -lnspr4 -pthread ../../../dist/lib/libmozalloc.a -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -pthread -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -L/usr/local/lib -lglib-2.0 -lintl -lmozgtk_stub -L/usr/local/lib -lX11  -lXext  -lpangoft2-1.0 -lfontconfig -lfreetype -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lintl -L/usr/local/lib -lcairo -pthread   -lXt -lgthread-2.0 -L/usr/local/lib -lfreetype   -lfontconfig -L/usr/local/lib -lfreetype   ../../../toolkit/library/StaticXULComponentsEnd/libStaticXULComponentsEnd.a   -lutil
Executing: c++ -Qunused-arguments -I/usr/local/include -Qunused-arguments -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Werror=int-to-pointer-cast -Wtype-limits -Wempty-body -Wsign-compare -Wno-invalid-offsetof -Wno-inline-new-delete -Wno-c++0x-extensions -Wno-extended-offsetof -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pipe -DNDEBUG -DTRIMMED -O -fomit-frame-pointer -fPIC -shared -Wl,-h,libxul.so -o libxul.so -pthread -Wl,-z,noexecstack -Wl,-z,text -B ../../../build/unix/gold -Wl,-rpath-link,dist/bin -Wl,-rpath-link,/usr/local/lib toolkit/library/build/tmp3jPpTO.list ../../../xpcom/typelib/xpt/libxpt.a ../../../intl/unicharutil/util/internal/libintl_unicharutil_util_internal.a ../../../dist/lib/libjs_static.a -licui18n -L/usr/local/lib -licuuc -licudata -L/usr/local/lib/nss -lssl3 -lsmime3 -lnss3 -lnssutil3 -lcrmf -L/usr/local/lib -lcairo -pthread -L/usr/local/lib -lcairo -pthread -lXext -lXrender -L/usr/local/lib -lX11 ../../../dist/lib/libmozsqlite3.so -L/usr/local/lib -lpixman-1 -L/usr/local/lib -lasound -L/usr/local/lib -lplds4 -lplc4 -lnspr4 -pthread ../../../dist/lib/libmozalloc.so -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -pthread -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -L/usr/local/lib -lglib-2.0 -lintl -lmozgtk_stub -L/usr/local/lib -lX11 -lXext -lpangoft2-1.0 -lfontconfig -lfreetype -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lintl -L/usr/local/lib -lcairo -pthread -lXt -lgthread-2.0 -L/usr/local/lib -lfreetype -lfontconfig -L/usr/local/lib -lfreetype -lutil
toolkit/library/build/tmp3jPpTO.list:
[...]
../../../build/unix/gold/ld: error: cannot find -lmozgtk_stub
c++: error: linker command failed with exit code 1 (use -v to see invocation)
config/rules.mk:872: recipe for target 'libxul.so' failed
gmake[2]: *** [libxul.so] Error 1
I don't remember what bug fixed this, but it's fixed in 34. We're not going to backport a fix to 33. Gtk+3 builds are not in a state where they should be massively used anyways. If you want to test Gtk+3 builds, you should do that on mozilla-central.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: