Linking error on x86_64

Alexander Neundorf neundorf at kde.org
Mon Jul 17 21:28:33 BST 2006


On Monday 17 July 2006 22:01, Simon Hausmann wrote:
> On Monday 17. July 2006 19:39, Andras Mantia wrote:
> > Hi,
> >
> >  Currently kdevelop fails to compile for me on x86_64. The error is:
> > Linking CXX shared module ../../../lib/kdevcmakeimporter.so
> > /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/
> >ld
> >
> > /data/home/andris/development/build/kde-trunk/kdevelop/lib/libCMakeLib.a(
> >cm CustomCommand.o): relocation R_X86_64_32 against `a local symbol' can
> > not be used when making a shared object; recompile with -fPIC
> > /data/home/andris/development/build/kde-trunk/kdevelop/lib/libCMakeLib.a:
> > could not read symbols: Bad value
> > collect2: ld returned 1 exit status
> >
> > Is this a visibility related bug of compiler I remember of (g++ (GCC)
> > 4.1.0 (SUSE Linux)), or related to static libraries linked with shared
> > ones?? In either way, what is the correct fix for such an error?
>
> This is because static libraries are not compiled with -fPIC with cmake. I
> tried to convince them to add -fPIC to the compilation flags just like we
> did in KDE3 (and qmake), but I failed. 

Feel free to add it (since it shouldn't break things), but keep in mind that 
alone adding this flag doesn't solve the problem completely, it just helps 
with GNU ld AFAIK.

Bye
Alex
-- 
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net




More information about the kde-core-devel mailing list