[Bug 153463] [PATCH] Make Kompare build/work in KDE 4.0 SVN (3.96.2)

Kevin Kofler kevin.kofler at chello.at
Tue Dec 11 09:48:54 CET 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=153463         




------- Additional Comments From kevin.kofler chello at  2007-12-11 09:48 -------
Created an attachment (id=22471)
 --> (http://bugs.kde.org/attachment.cgi?id=22471&action=view)
Fix Kompare build on non-x86

Arrrgh, now I try building that on non-x86 architectures in Fedora's Koji build
system (I'd have loved doing it sooner, but I couldn't build kdesdk because
subversion in Rawhide had broken dependencies) and it fails because it's trying
to link non-PIC .a files into shared libraries. (This is a problem even on
i386, by the way, because it creates text relocations and SELinux forbids these
by default.)

/usr/bin/ld:
/builddir/build/BUILD/kdesdk-3.97.0/x86_64-redhat-linux-gnu/lib/libdiff2.a(diffmodellist.o):
relocation R_X86_64_32S against `vtable for Diff2::DiffModelList' can not be
used when making a shared object; recompile with -fPIC
/builddir/build/BUILD/kdesdk-3.97.0/x86_64-redhat-linux-gnu/lib/libdiff2.a:
could not read symbols: Bad value
collect2: ld returned 1 exit status

I tried to make libdiff2 and libdialogpages shared libraries first, but this
needs export macros and so on, I'm not sure it's worth it for internal
convenience libraries like these. (I can attach my preliminary patch, but it
doesn't currently build.) So here's a patch which builds the libraries with
${CMAKE_SHARED_LIBRARY_C_FLAGS}, that's -fPIC or equivalent on targets which
support/require it and empty on others. With that patch, it builds on at least
i386, x86_64, ppc and ppc64 (the architectures Fedora is built for), see:
http://koji.fedoraproject.org/koji/buildinfo?buildID=27666

As my KDE SVN account is still pending creation, can someone please commit this
for me?


More information about the Kompare-devel mailing list