Closed Bug 368476 Opened 16 years ago Closed 15 years ago

pyxpcom linking fails with "unresolvable R_386_GOTOFF relocation"

Categories

(Firefox Build System :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9beta3

People

(Reporter: vamposdecampos, Assigned: vamposdecampos)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.1) Gecko/20061208 Firefox/2.0.0.1
Build Identifier: 

Building any trunk application with --enable-extensions=python (on Linux, Ubuntu Edgy, gcc 4.1.2) fails like so:

c++  -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -pedantic -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -Os -DPYTHON_SO=\"libpython2.4.so\" -fPIC -shared -Wl,-z,defs -Wl,-h,libpyxpcom.so -o libpyxpcom.so  ErrorUtils.o PyGBase.o PyGModule.o PyGStub.o PyGInputStream.o PyGWeakReference.o PyIClassInfo.o PyIComponentManager.o PyIInputStream.o PyIEnumerator.o PyIID.o PyIInterfaceInfo.o PyIInterfaceInfoManager.o PyISimpleEnumerator.o PyISupports.o PyIVariant.o Pyxpt_info.o TypeObject.o VariantUtils.o dllmain.o    -lpthread    -L../../../../dist/bin -lxpcom -lxpcom_core  -L../../../../dist/bin -L../../../../dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl ../../../../dist/lib/libxpcomglue_s.a -L../../../../dist/bin -Wl,-rpath-link,../../../../dist/bin -lxpcom  -ldl -lm  -L/usr/lib -lpython2.4 -lutil  
/usr/bin/ld: VariantUtils.o(.text._ZN28nsCreateInstanceByContractIDC1EPKcP11nsISupportsPj[nsCreateInstanceByContractID::nsCreateInstanceByContractID(char const*, nsISupports*, unsigned int*)]+0x13): unresolvable R_386_GOTOFF relocation against symbol `vtable for nsCreateInstanceByContractID'
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make[3]: *** [libpyxpcom.so] Error 1
make[3]: Leaving directory `/mnt/stash/build/mozilla/minefield/extensions/python/xpcom/src'

I was able to fix this by changing the order of link options; will attach a patch.


Reproducible: Always
Works for me, not tested on other platforms.

Note that building still fails later on because of bug 355608
Comment on attachment 253081 [details] [diff] [review]
patch to change the order of linking options

looks like a makefile issue. the fix seems to work for other who tried this patch.
Attachment #253081 - Flags: review?(benjamin)
Attachment #253081 - Flags: review?(benjamin) → review+
NPOTB so looking for a checkin
Keywords: checkin-needed
Assignee: nobody → vamposdecampos
Status: UNCONFIRMED → NEW
Ever confirmed: true
Checking in extensions/python/dom/src/Makefile.in;
/cvsroot/mozilla/extensions/python/dom/src/Makefile.in,v  <--  Makefile.in
new revision: 1.5; previous revision: 1.4
done
Checking in extensions/python/xpcom/src/Makefile.in;
/cvsroot/mozilla/extensions/python/xpcom/src/Makefile.in,v  <--  Makefile.in
new revision: 1.13; previous revision: 1.12
done
Checking in extensions/python/xpcom/src/loader/Makefile.in;
/cvsroot/mozilla/extensions/python/xpcom/src/loader/Makefile.in,v  <--  Makefile.in
new revision: 1.12; previous revision: 1.11
done
Checking in extensions/python/xpcom/src/module/Makefile.in;
/cvsroot/mozilla/extensions/python/xpcom/src/module/Makefile.in,v  <--  Makefile.in
new revision: 1.6; previous revision: 1.5
done
Status: NEW → RESOLVED
Closed: 15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M11
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.