On Wed, 18 Mar 2009, Richard Guenther wrote:
On Wed, 18 Mar 2009, Wolfgang Rosenauer wrote:
Hi,
I'm running into the following issue:
/usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../x86_64-suse-linux/bin/ld: ../../staticlib/components/libgklayout.a(nsLayoutModule.o): relocation R_X86_64_PC32 against `NS_NewCanvasRenderingContext2D(nsIDOMCanvasRenderingContext2D**)' can not be used when making a shared object; recompile with -fPIC /usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../x86_64-suse-linux/bin/ld: final link failed: Bad value
As you can see that is gcc 4.2 actually from openSUSE 10.3.
I'm working on packaging Firefox 3.1/3.5 in the buildservice (mozilla:beta) and actually it's _only_ failing on 10.3-x86_64 with that error and I've verified that nsLayoutModule.cpp is compiled using -fPIC.
Is there really something wrong with the code/compile or is it a gcc bug?
Are you sure it is built with -fPIC? If it uses libtool the copy for the static library (which you link against) will be built without -fPIC.
Oh, gcc 4.2. Well, there may be problems with the use of visibility
related to -fPIC - I don't remember exactly.
Richard.
--
Richard Guenther