Bug 158587

Summary: kcron build failes due to missing -fPIC
Product: [Applications] kcron Reporter: Naga <nagatoro>
Component: generalAssignee: Nicolas Ternisien <nicolas.ternisien>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Naga 2008-02-29 19:26:59 UTC
Version:           SVN: r780639 (using Devel)
Installed from:    Compiled sources
OS:                Linux

Compile ends with:
-----
make[2]: Leaving directory `/media/code/kde4/build/kdeadmin'
/usr/bin/cmake -E cmake_progress_report /home/naga/code/kde4/build/kdeadmin/CMakeFiles  22 23 24 25 26
[ 95%] Built target ksystemlog
/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.3/../../../../x86_64-pc-linux-gnu/bin/ld: /home/naga/code/kde4/build/kdeadmin/lib/libkcron_crontablib.a(cthost.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/home/naga/code/kde4/build/kdeadmin/lib/libkcron_crontablib.a: could not read symbols: Bad value
-----
If adding -fPIC to CXX_FLAGS in kcron/src/crontablib/CMakeLists.txt the compile finishes without errors, not sure if that is the correct solution.
Comment 1 Nicolas Ternisien 2008-03-03 01:26:15 UTC
I really don't know if this -fPIC option needs to be added to default KDE build or for KCron only. Does this problem also occurs if you try to build something else ?

Comment 2 Naga 2008-03-03 17:25:09 UTC
This is the only place I've gotten an error about it.
Comment 3 Nicolas Ternisien 2008-03-04 15:02:23 UTC
Fixed by Laurent Montel.