pyxpcom linking fails with "unresolvable R_386_GOTOFF relocation"

RESOLVED FIXED in mozilla1.9beta3

Status

RESOLVED FIXED
12 years ago
9 months ago

People

(Reporter: vamposdecampos, Assigned: vamposdecampos)

Tracking

Trunk
mozilla1.9beta3
x86
Linux

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

12 years ago
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
(Assignee)

Comment 1

12 years ago
Created attachment 253081 [details] [diff] [review]
patch to change the order of linking options

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)

Updated

11 years ago
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
Last Resolved: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M11

Updated

9 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.