[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

libxf86config.a can't be used by shared libraries



On Wednesday 02 February 2005 21:22, Simon Edwards wrote:
> It appears that libxf86config.a can't be used by shared libraries. It
> doesn't appear to have been compiled correctly using the -fPIC compile
> option.
>
> I'm currently developing a util in Python that uses has a C extension which
> uses libxf86config.a. In terms of libraries and linking, we are building a
> small *.so shared library that links with libxf86config.a. Linking is
> failing:
>
> -------------------------------------
> building 'ixf86config' extension
> gcc -pthread -shared build/temp.linux-x86_64-2.3/modules/xf86config_ext.o
> -L/usr/X11R6/lib -lX11 -lXxf86vm -lXext -lglib -lxf86config -o
> build/lib.linux-x86_64-2.3/ixf86config.so
> /usr/bin/ld: /usr/X11R6/lib/libxf86config.a(scan.o): relocation R_X86_64_32
> can not be used when making a shared object; recompile with -fPIC
> /usr/X11R6/lib/libxf86config.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> error: command 'gcc' failed with exit status 1
> -------------------------------------
>
> We've also tried linking against libxf86config_pic.a. The result was the
> same. In fact libxf86config_pic.a and libxf86config.a were identical files.
>
> Looking into libxf86config.a using objdump, I see that scan.o does indeed
> have a number of R_X86_64_32 relocations. What I also noticed is that the
> other objects in libxf86config.a *don't* have any R_X86_64_32 relocations
> at all. Did something go wrong when scan.o was compiled?

The packages involved are:

 xlibs                          4.3.0.dfsg.1-10 
 xlibs-data                     4.3.0.dfsg.1-10
 xlibs-dev                      4.3.0.dfsg.1-10
 xlibs-pic                      4.3.0.dfsg.1-10
 xlibs-static-dev               4.3.0.dfsg.1-10
 xlibs-static-pic               4.3.0.dfsg.1-10

They are all from the pure64 packages on a mirrorsite of 
debian-amd64.alioth.debian.org. I can confirm that the same builds fine with 
i386-sid. Please don't hesitate to contact me in case you need more details.

To reproduce it, download 
http://www.simonzone.com/software/guidance/guidance-0.2.0.tar.bz2 and try to 
build ixf86config (see above for gcc parameters).

Could someone have a look at it?

Thanks,

sebas
-- 
http://vizZzion.org
======================
Everyone complains of his memory, no one of his judgement.



Reply to: