some changes for building dcop/

Brad King brad.king at kitware.com
Fri Feb 10 21:19:39 CET 2006


Marcus Camen wrote:
> On Wednesday 08 February 2006 21:39, Alexander Neundorf wrote:
>>kICE is now built as a static library and libDCOP and the two
>>testprograms link to it. For me this still builds, please check whether
>>this breaks something on windows.
> 
> Since this commit I get:
> 
> Linking CXX shared library ../lib/libDCOP.so
> cd /home/camen/src/kde/kdesvn/build/kdelibs/dcop && /home/camen/usr/bin/cmake -E remove -f ../lib/libDCOP.a ../lib/libDCOP.so.4.2.0 ../lib/libDCOP.so.4 ../lib/libDCOP.so
> cd /home/camen/src/kde/kdesvn/build/kdelibs/dcop && /usr/bin/c++  -fPIC -Wl,--fatal-warnings -avoid-version -Wl,--no-undefined -lc -shared -Wl,-soname,libDCOP.so.4 -o ../lib/libDCOP.so.4.2.0 "CMakeFiles/DCOP.dir/dcopstub.o" "CMakeFiles/DCOP.dir/dcopref.o" "CMakeFiles/DCOP.dir/dcopobject.o" "CMakeFiles/DCOP.dir/dcopclient.o"  -L/home/camen/src/kde/kdesvn/build/kdelibs/lib -L/home/camen/src/kde/kdesvn/qt-copy/lib -L/usr/local/lib -lQtCore_debug -lpthread -lkICE -Wl,-rpath,/home/camen/src/kde/kdesvn/build/kdelibs/lib:/home/camen/src/kde/kdesvn/qt-copy/lib:/usr/local/lib
> /usr/lib64/gcc/x86_64-suse-linux/4.0.2/../../../../x86_64-suse-linux/bin/ld: /home/camen/src/kde/kdesvn/build/kdelibs/lib/libkICE.a(connect.o): relocation R_X86_64_32 against `_kde_IceConnectionStrings' can not be used when making a shared object; recompile with -fPIC
> /home/camen/src/kde/kdesvn/build/kdelibs/lib/libkICE.a: could not read symbols: Bad value

This is because kICE is built as a static library and then linked 
(copied) into a shared library.  The object files in the static library 
do not contain relocatable symbols so it is not valid to include them in 
a shared library.  We should build kICE either as its own shared library 
to be linked with DCOP or build the kICE sources into DCOP as is done 
for the windows DLL.

-Brad


More information about the Kde-buildsystem mailing list