Linking error on x86_64

Simon Hausmann hausmann at
Mon Jul 17 21:01:36 BST 2006

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/
> /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. You have to remove the use of 
static/convenience libraries in kdevelop to solve this. CMake's include 
statement is helpful for that if you want to keep some level of modularity.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the kde-core-devel mailing list