trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: March 2012

Re: [trinity-devel] SOLVED Re: [trinity-devel] kpowersave - /usr/bin/ld: cannot find -ldbus-tqt-1

From: "David C. Rankin" <drankinatty@...>
Date: Mon, 19 Mar 2012 10:23:11 -0500
On 03/19/2012 08:53 AM, Serghei Amelian wrote:
>> How can we/what it the proper way to build library search paths into the
>> > tde build systems so that this information is automatically passed to make
>> > during the build? Can we do something in cmake to make sure the default
>> > $TDEDIR/lib and $TDEDIR/lib/trinity/lib are always passed as flags? This
>> > would take care of over half the spurious build failures I see.
> The correct way is to fix .pc file, not to mess cmake scripts :)

Serghei,

  That is the problem here -- the .pc files ARE correct:

[23:44 nirvana:/mnt/nv1/home/chroot/david/opt/trinity/lib/pkgconfig] # cat
dbus-tqt.pc
prefix=/opt/trinity
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include

Name: dbus-tqt-1
Description: D-BUS TQt bindings
Version: 0.7
Requires: dbus-1
Libs: -L${libdir}  -ldbus-tqt-1 -ldbus-1 -lpthread -lrt
Cflags: -I${includedir} -I${includedir}/dbus-1.0

  So according to the .pc file, the cmake setup should include the correct
string allowing make to find -ldbus-tqt-1. That Libs: string, as returned by the
.pc file should be:

-L${libdir} -....

  Which is '-L${prefix}/lib -....'  Or with the correct substitutions is:

-L/opt/trinity/lib -ldbus-tqt-1 -ldbus-1 -lpthread -lrt
       ^^^^^^^

  However, the cmake setup does not include the correct -L${libdir}, instead it
provides:

'-L/opt/tqt3/lib':
        ^^^^

<snip>
CMakeFiles/tdeinit_kpowersave-shared.dir/suspenddialog.cpp.o
CMakeFiles/tdeinit_kpowersave-shared.dir/suspend_Dialog.cpp.o -L/opt/tqt3/lib
-ldbus-tqt-1 -ldbus-1 -lpthread -lrt /opt/trinity/lib/libkio.so.4.2.0 -lhal
-lXext -lXtst -lXss /opt/trinity/lib/libtdeui.so.4.2.0 -lfreetype -lfontconfig
/opt/trinity/lib/libtdesu.so.4.2.0 -lutil
<snip>

  So somewhere in cmake it is pulling the wrong ${prefix}. I think this has to
be fixed in cmake because the .pc file IS correct. Where exactly is this done in
cmake? I think it is checking the wrong .pc file or something like that.

-- 
David C. Rankin, J.D.,P.E.