Closed Bug 350995 Opened 19 years ago Closed 14 years ago

Building firefox 2 beta 2 fails with link error "option -dn and -h are incompatible" on Solaris 8 (gtk2, gcc 3.4.6)

Categories

(Firefox Build System :: General, defect)

Sun
Solaris
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: stevee, Unassigned)

Details

(Whiteboard: reviewed)

User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.8.0.5) Gecko/20060731 Firefox/1.5.0.5 Build Identifier: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.8.0.5) Gecko/20060731 Firefox/1.5.0.5 When building firefox 2 beta 2 on Solaris 8, using gcc 3.4.6 and the Solaris linker I get this error in xpcom/stub: c++ -I/gorbag/exta/cad/externals/SOLARIS/gnome2/include -I/gorbag/exta/cad/externals/SOLARIS/gnome2/include/glib-2.0 -O2 -Wno-unknown-pragmas -mcpu=ultrasparc -I/gorbag/exta/cad/externals/SOLARIS/gnome2/include/glib-2.0 -I/gorbag/exta/cad/externals/SOLARIS/include -I/usr/openwin/include -fno-rtti -fno-exceptions -Wno-long-long -pedantic -I/gorbag/exta/cad/externals/SOLARIS/gnome2/include -I/gorbag/exta/cad/externals/SOLARIS/gnome2/include/glib-2.0 -O2 -fomit-frame-pointer -fno-exceptions -Wno-unknown-pragmas -mcpu=ultrasparc -I/gorbag/exta/cad/externals/SOLARIS/gnome2/include/glib-2.0 -I/gorbag/exta/cad/externals/SOLARIS/include -fshort-wchar -pthreads -DNDEBUG -DTRIMMED -O -fPIC -G -Wl,-h,libxpcom.so -o libxpcom.so nsXPComStub.o -L/gorbag/exta/cad/externals/SOLARIS/gnome2/lib -L/gorbag/exta/cad/externals/SOLARIS/lib -liconv -L../../dist/bin -L../../dist/lib -Wl,-rpath-link,../../dist/bin -lxpcom_core -L../../dist/lib -lplds4 -lplc4 -lnspr4 -L/gorbag/exta/cad/externals/SOLARIS/gnome2/lib -L/gorbag/exta/cad/externals/SOLARIS/lib -ldl -lrt -lsocket -ldl -lm -lnsl ld: fatal: option -dn and -h are incompatible ld: fatal: option -dn and -P are incompatible ld: fatal: option -dn and -G are incompatible ld: fatal: Flags processing errors Reproducible: Always My .mozconfig file contains: ac_add_options --disable-debug ac_add_options --enable-optimize ac_add_options --disable-tests ac_add_options --enable-official-branding ac_add_options --enable-svg ac_add_options --enable-xft
Summary: Building firefox 2 beta 2 fails with link error "option -dn and -h are incompatible" on Solaris → Building firefox 2 beta 2 fails with link error "option -dn and -h are incompatible" on Solaris 8 (gtk2, gcc 3.4.6)
I get a similar error when building SeaMonkey 1.1 on Solaris 8 with gcc 3.4.6. c++ -I/usr/openwin/include -fno-rtti -fno-exceptions -Wno-long-long -pedantic -fshort-wchar -pthreads -DNDEBUG -DTRIMMED -O -fPIC -G -Wl,-h,libxpcom.so -o libxpcom.so nsXPComStub.o -L../../dist/bin -L../../dist/lib -Wl,-rpath-link,../../dist/bin -lxpcom_core -L../../dist/lib -lplds4 -lplc4 -lnspr4 -ldl -lrt -lsocket -ldl -lm ld: fatal: option -dn and -h are incompatible ld: fatal: option -dn and -P are incompatible ld: fatal: option -dn and -G are incompatible ld: fatal: Flags processing errors collect2: ld returned 1 exit status gmake[4]: *** [libxpcom.so] Error 1
I have a workaround for the problem. The auto generated file config/autoconf.mk contains the line: MOZ_FIX_LINK_PATHS=-Wl,-rpath-link,$(DIST)/bin which is the location of the problem. Changing this to: MOZ_FIX_LINK_PATHS= allows the link to happen. An alternative is to edit config/autoconf.mk.in before starting the build so that the line: MOZ_FIX_LINK_PATHS=@MOZ_FIX_LINK_PATHS@ becomes: MOZ_FIX_LINK_PATHS= This all suggests that it is the generation of @MOZ_FIX_LINK_PATHS@ which is incorrect when building with this environment.
I've tried both workarounds that apparently worked for you, but my SeaMonkey build then fails almost immediately with another error: /local/seamonkey_1.1/mozilla/obj-sparc-sun-solaris2.8/dist/bin/nsinstall -R -m 444 ./liblber50.a /local/seamonkey_1.1/mozilla/obj-sparc-sun-solaris2.8/dist/lib /local/seamonkey_1.1/mozilla/obj-sparc-sun-solaris2.8/dist/bin/nsinstall: cannot access ./liblber50.a: No such file or directory gmake[6]: *** [export] Error 1 gmake[6]: Leaving directory `/local/seamonkey_1.1/mozilla/obj-sparc-sun-solaris2.8/directory/c-sdk/ldap/libraries/liblber' gmake[5]: *** [export] Error 2 gmake[5]: Leaving directory `/local/seamonkey_1.1/mozilla/obj-sparc-sun-solaris2.8/directory/c-sdk/ldap/libraries' gmake[4]: *** [export] Error 2 gmake[4]: Leaving directory `/local/seamonkey_1.1/mozilla/obj-sparc-sun-solaris2.8/directory/c-sdk/ldap' gmake[3]: *** [export] Error 2 gmake[3]: Leaving directory `/local/seamonkey_1.1/mozilla/obj-sparc-sun-solaris2.8/directory/c-sdk' gmake[2]: *** [ldap] Error 2 gmake[2]: Leaving directory `/local/seamonkey_1.1/mozilla/obj-sparc-sun-solaris2.8' gmake[1]: *** [default] Error 2 gmake[1]: Leaving directory `/local/seamonkey_1.1/mozilla/obj-sparc-sun-solaris2.8' gmake: *** [build] Error 2
Whiteboard: reviewed
Firefox 2 was many moons ago. RESOLVED INCOMPLETE
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INCOMPLETE
Component: Build Config → General
Product: Firefox → Firefox Build System
You need to log in before you can comment on or make changes to this bug.