[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-sdk-devel
Subject:    Re: kdesdk cmake-bustage, kde4_add_plugin
From:       "Friedrich W. H. Kossebau" <kossebau () kde ! org>
Date:       2012-06-10 18:10:35
Message-ID: 1476056.lrZtoDQNuV () klux ! site
[Download RAW message or body]

Hi Rex,

Am Sonntag, 10. Juni 2012, 13:00:37 schrieb Rex Dieter:
> 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++
>   -DMAKE_FILEVIEWSVNPLUGIN_LIB -D_BSD_SOURCE -D_XOPEN_SOURCE=500
> -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT
> -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=48
> -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS
> -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
> -DQT_NO_DEBUG -fPIC ...   -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -o
> CMakeFiles/fileviewsvnplugin.dir/fileviewsvnplugin_automoc.o -c
> /home/rdieter1/pkgs.fedoraproject.org/kdesdk/foo/kdesdk-4.8.4/build/dolphin-
> plugins/svn/fileviewsvnplugin_automoc.cpp
> 
> and in 4.8.90 this get's compiled with:
> 
> cd .../kdesdk-4.8.90/build/dolphin-plugins/svn && /usr/lib64/ccache/c++
>   -DMAKE_FILEVIEWSVNPLUGIN_LIB -DQT_NO_STL -DQT_NO_CAST_TO_ASCII
> -D_REENTRANT -DKDE_DEPRECATED_WARNINGS
> -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=48 -DQT_USE_FAST_CONCATENATION
> -DQT_USE_FAST_OPERATOR_PLUS -O2 -g -DQT_NO_DEBUG ...
> -D_LARGEFILE64_SOURCE -o
> CMakeFiles/fileviewsvnplugin.dir/fileviewsvnplugin_automoc.o -c
> /home/rdieter1/pkgs.fedoraproject.org/kdesdk/foo/kdesdk-4.8.90/build/dolphin
> -plugins/svn/fileviewsvnplugin_automoc.cpp
> 
> 
> many differences (mostly flags being removed), but most noticeable
> causing the immediate issue was -fPIC
> 
> any advice, clues, suggestions?

Can you try if the attached patch helps at least for the dolphin-plugins? Have 
not investigated, but could be the effective difference.
When doing my development builds I could not yet see your problem though, need 
to check.

kdesdk is currently trying to get in shape for the migration to git and for 
that has already done some changes to the buildsystem trying to make all 
submodules build stand-alone.

Cheers
Friedrich
["dolphin-plugins.patch" (dolphin-plugins.patch)]

Index: kdesdk/dolphin-plugins/CMakeLists.txt
===================================================================
--- kdesdk/dolphin-plugins/CMakeLists.txt	(Revision 1299631)
+++ kdesdk/dolphin-plugins/CMakeLists.txt	(Arbeitskopie)
@@ -4,6 +4,8 @@
 include(KDE4Defaults)
 include(MacroLibrary)
 
+set(CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS} -DQT_STRICT_ITERATORS)
+
 add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
 add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
 include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES} ${KDEPIMLIBS_INCLUDE_DIR})


_______________________________________________
kde-sdk-devel mailing list
kde-sdk-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-sdk-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic