[kde-freebsd] KDE: Problems compiling piklab on FreeBSD 6.2-RELEASE

Bruce M Simpson bms at incunabulum.net
Tue Nov 13 12:13:43 CET 2007


[Cc to FreeBSD KDE port maintainers as this is an issue affecting the 
base KDE install]

Nicolas Hadacek wrote:
> The first linking problem is causing all the other errors so I would
> concentrate on it. I don't understand why it happens though.
>   
It seems to be related to the -pthread option.  This seems to be a 
semi-known issue with using libtool on FreeBSD, and possibly also OpenBSD.

Solution:
 * FINALLY! What worked was removing -pthread from 
/usr/local/lib/libkdecore.la, in fact, any reference to the -pthread 
option from *.la files installed on the system.

For piklab this includes:
empiric:~/tmp/px/piklab-0.15.0 % find /usr/local/lib -name '*.la.orig'
/usr/local/lib/libkdecore.la.orig
/usr/local/lib/libfam.la.orig
/usr/local/lib/libkio.la.orig
/usr/local/lib/libDCOP.la.orig
/usr/local/lib/libktexteditor.la.orig
/usr/local/lib/libkhtml.la.orig

For the piklab binaries which failed to link, finding this information 
involved recursively walking the Libtool .la files referenced by each 
link target, and looking for the presence of the -pthread option, 
usually in the dependency_libs variable -- then removing it. The 
libraries affected by this are USUALLY imported using -l rather than a 
direct reference to the .la file.

[I found that the libtool hack from fruitsalad (link below) to spit out 
more useful debugging info does not always print the correct target name.]

This is not an OK solution for a FreeBSD port.. as it changes files 
installed by the FreeBSD KDE base packages. Perhaps ade@ can suggest a 
better solution? I imagine we may be able to solve this within piklab by 
regenerating the libtool in the package.


Workarounds which didn't work:
 * Importing the fix for the detection and use of the -pthread option 
into Piklab's libtool doesn't work.

 * If I try compiling piklab with the --disable-threading option, 
configure does not complete -- FreeBSD's KDE port installs qt-mt by 
default and the non-threaded libraries are not installed.
 
* I tried removing all reference to pthread from the libkdefx.la file 
installed on the system, with no effect -- this has been suggested as a 
workaround for other KDE ports:
 http://people.fruitsalad.org/lauri/krazykiwi/index.php?/archives/175-Libtool-nutso-insanity.html

 * I've even tried doing an inplace sed across all generated piklab 
Makefiles to remove pthread and this has also had no effect.


I think I share everyone's dislike for debugging autotools problems.

best,
BMS


More information about the kde-freebsd mailing list