Hey all - Has anyone run into a major compile stumbling block because of a poorly-compiled libx11.a? Even when building programs with then --enable-static flag in suse 10.1 64bit I get this error on almost everything. I've searched for weeks, but haven't been able to find a fix anywhere online, and I'm very reluctant to attempt to hand-complie Xorg. Here's the error: ve/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld : /usr/lib64/libX11.a(ChProp.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib64/libX11.a: could not read symbols: Bad value collect2: ld returned 1 exit status --- ANY help at all would be much appreciated. Thanks! -Dan Sawyer ArtisticWhispers Productions
Dan Sawyer wrote:
Here's the error: ve/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld
: /usr/lib64/libX11.a(ChProp.o): relocation R_X86_64_32 against `a local
symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib64/libX11.a: could not read symbols: Bad value collect2: ld returned 1 exit status Sorry for the obvious question, but did you try to recompile with -fPIC?
-- Joe Morris Registered Linux user 231871
Another thought: why are you trying to link against libX11.a and not libX11.so? On Thu, 19 Oct 2006, Joe Morris (NTM) wrote:
Dan Sawyer wrote:
Here's the error: ve/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld
: /usr/lib64/libX11.a(ChProp.o): relocation R_X86_64_32 against `a local
symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib64/libX11.a: could not read symbols: Bad value collect2: ld returned 1 exit status Sorry for the obvious question, but did you try to recompile with -fPIC?
-- Volkmar Glauche - Department of Neurology volkmar.glauche@uniklinik-freiburg.de Universitaetsklinikum Freiburg Phone 49(0)761-270-5331 Breisacher Str. 64 Fax 49(0)761-270-5416 79106 Freiburg http://fbi.uniklinik-freiburg.de/
On Wednesday 18 October 2006 17:15, Joe Morris (NTM) wrote:
Dan Sawyer wrote:
Here's the error: ve/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bi n/ld
: /usr/lib64/libX11.a(ChProp.o): relocation R_X86_64_32 against `a local
symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib64/libX11.a: could not read symbols: Bad value collect2: ld returned 1 exit status
Sorry for the obvious question, but did you try to recompile with -fPIC?
In order to do that, I'd have to compile all of Xorg from source, and I have no idea how to even begin a job that complex. If I'm mistaken, though, please tell me! -Dan
On Sunday 22 October 2006 02:11, Dan Sawyer wrote:
On Wednesday 18 October 2006 17:15, Joe Morris (NTM) wrote:
Dan Sawyer wrote:
Here's the error: ve/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bi n/ld
: /usr/lib64/libX11.a(ChProp.o): relocation R_X86_64_32 against `a local
symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib64/libX11.a: could not read symbols: Bad value collect2: ld returned 1 exit status
Sorry for the obvious question, but did you try to recompile with -fPIC?
In order to do that, I'd have to compile all of Xorg from source, and I have no idea how to even begin a job that complex. If I'm mistaken, though, please tell me!
The distribution ships with both a dynamic libX11.so. and a static libX11.a. You're linking your shared library against the wrong one which causes this error message (.a cannot be linked in when generating an shared library) -Andi
The distribution ships with both a dynamic libX11.so. and a static libX11.a. You're linking your shared library against the wrong one which causes this error message (.a cannot be linked in when generating an shared library)
Okay. This is happening when invoking autoconfig through configure or scons - how can I get them to automatically go for the dynamically linked libX11.so? -Dan
On Mon, Oct 30, 2006 at 05:03:51PM -0800, Dan Sawyer wrote:
Okay. This is happening when invoking autoconfig through configure or scons - how can I get them to automatically go for the dynamically linked libX11.so?
See if it has a shared or --shared option you can pass to configure. Sometimes people setup their configure so they default to not doing shared libraries and you have to pass the option. -- Mike Marion-Unix SysAdmin/Staff IT Engineer-http://www.qualcomm.com Groundskeeper Willie: "oooh.. Me mule wouldn't walk in the mud. So I had to put 17 bullets in 'em." ==> Simpsons
On Monday 30 October 2006 18:15, Mike Marion wrote:
On Mon, Oct 30, 2006 at 05:03:51PM -0800, Dan Sawyer wrote:
Okay. This is happening when invoking autoconfig through configure or scons - how can I get them to automatically go for the dynamically linked libX11.so?
See if it has a shared or --shared option you can pass to configure. Sometimes people setup their configure so they default to not doing shared libraries and you have to pass the option.
Ok, I'm trying to compile the gstreamer cvs and am running into the problem here, so it's a good specific instance. It defaults to shared libraries, and it also allows you to explicitly specify shared libraries. Alas, it is still failing on trying to link to libX11.a - here's the make output... echo "local: *; };" >> .libs/libgstximagesink.ver gcc -shared .libs/libgstximagesink_la-ximagesink.o .libs/libgstximagesink_la-ximage.o -Wl,--rpath -Wl,/home/thedude/downloads/gst-plugins-base/gst-libs/gst/interfaces/.libs -Wl,--rpath -Wl,/home/thedude/downloads/gst-plugins-base/gst-libs/gst/video/.libs ../../gst-libs/gst/interfaces/.libs/libgstinterfaces-0.10.so -L/usr/local/lib -L/opt/gnome/lib64 -L/usr/lib64 -L/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../lib64/ ../../gst-libs/gst/video/.libs/libgstvideo-0.10.so /usr/local/lib/libgstbase-0.10.so /usr/local/lib/libgstreamer-0.10.so /opt/gnome/lib64/libgobject-2.0.so /opt/gnome/lib64/libgmodule-2.0.so -ldl /opt/gnome/lib64/libgthread-2.0.so /usr/lib64/libxml2.so -lz -lm /opt/gnome/lib64/libglib-2.0.so -L/usr/X11R6/lib -lX11 -pthread -Wl,-soname -Wl,libgstximagesink.so -Wl,-version-script -Wl,.libs/libgstximagesink.ver -o .libs/libgstximagesink.so /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/libX11.a(ChProp.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib64/libX11.a: could not read symbols: Bad value collect2: ld returned 1 exit status Help....? -Lokmer
* Dan Sawyer (dsawyer@artisticwhispers.com) [20061031 22:51]:
/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/libX11.a(ChProp.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib64/libX11.a: could not read symbols: Bad value collect2: ld returned 1 exit status
Seems like it doesn't find libX11.so, so I guess that you haven't installed xorg-x11-devel.rpm (assuming 10.1-x86_64). Philipp
Dan Sawyer <dsawyer@artisticwhispers.com> writes:
Hey all -
Has anyone run into a major compile stumbling block because of a poorly-compiled libx11.a? Even when building programs with then --enable-static flag in suse 10.1 64bit I get this error on almost everything. I've searched for weeks, but haven't been able to find a fix anywhere online, and I'm very reluctant to attempt to hand-complie Xorg.
Here's the error: ve/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld
: /usr/lib64/libX11.a(ChProp.o): relocation R_X86_64_32 against `a local
symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib64/libX11.a: could not read symbols: Bad value collect2: ld returned 1 exit status
Why do you compile against the static libX11.a? What exactly are you doing? Is this a static program or do you create a shared library that should include the static libX11.a? Do you have a small example to reproduce? Otherwise please give the complete commandline that you use, Andreas -- Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj/ SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
participants (7)
-
Andi Kleen
-
Andreas Jaeger
-
Dan Sawyer
-
Joe Morris (NTM)
-
Mike Marion
-
Philipp Thomas
-
Volkmar Glauche