some changes for building dcop/

William A. Hoffman billlist at nycap.rr.com
Fri Feb 10 21:23:16 CET 2006


At 03:14 PM 2/10/2006, Marcus Camen wrote:
>Hi,
>
>On Wednesday 08 February 2006 21:39, Alexander Neundorf wrote:
>> I did the following changes to dcop, which may have potentially broken
>> the build on windows:
>>
>> 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.
>>

It is usually not a good idea to linke static libraries to shared ones.
Why was this changed to a static library?

>> I removed the -Dkdemain=main from dcop/, both from scons and from
>> cmake, and from the source files. It seemed to be completely useless.
>> If not, let me know.
>
>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
>
>http://public.kitware.com/KDE/Testing/Sites/home/Linux-c++/20060210-1927-Experimental/BuildError.html
>
>(gcc 4.0.2 / SUSE 10.0)
>
>I don't know how to classify this. But maybe you have an idea...

The problem here is that on 32 bit linux systems all code is compiled PIC, so
you can get away with linking a static lib to a shared one.   This will also show
up on suns where pic is not the default build type.   

-Bill



More information about the Kde-buildsystem mailing list