kdesdk cmake-bustage, kde4_add_plugin

Rex Dieter rdieter at math.unl.edu
Sun Jun 10 18:00:37 UTC 2012

On 06/10/2012 12:41 PM, Rex Dieter wrote:
> Seems some odd cmake borkage is going on trying to build kdesdk-4.8.90
> (4.8.80 suffered the same, but I hadn't noticed then), in that any
> modules using kde4_add_plugin seem to not get compiled with -fPIC
> properly, and fail linking, for example,
> dolphin-plugins:
> /usr/bin/ld:
> CMakeFiles/fileviewsvnplugin.dir/fileviewsvnplugin_automoc.o: relocation
> R_X86_64_32 against `_ZN17FileViewSvnPlugin16staticMetaObjectE' can not
> be used when making a shared object; recompile with -fPIC
> blindly replacing kdesdk toplevel CMakeLists.txt with that from 4.8.4 makes things happy again.

So, more data:

... = a bunch of -I... includes not relevant,

4.8.4 gets compiled as:

cd .../kdesdk-4.8.4/build/dolphin-plugins/svn && /usr/lib64/ccache/c++ 
-Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align 
-Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security 
-fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common 
-Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden 
-Werror=return-type -fvisibility-inlines-hidden -O2 -g -DNDEBUG 
CMakeFiles/fileviewsvnplugin.dir/fileviewsvnplugin_automoc.o -c 

and in 4.8.90 this get's compiled with:

cd .../kdesdk-4.8.90/build/dolphin-plugins/svn && /usr/lib64/ccache/c++ 
CMakeFiles/fileviewsvnplugin.dir/fileviewsvnplugin_automoc.o -c 

many differences (mostly flags being removed), but most noticeable 
causing the immediate issue was -fPIC

any advice, clues, suggestions?

Fedora 17 (and f18/rawhide) here, using cmake-2.8.8-4.fc17

-- rex

More information about the release-team mailing list