On Monday 19 March 2012 17:23:11 David C. Rankin wrote: > 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': > ^^^^ I guess this argument is related to TQt3, not to dbus-tqt. > <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. Nope. I think DBUS_TQT_LIBRARY_DIRS is not passed to linker. Try to add this to src/CMakeLists.txt: link_directories( ${TQT_LIBRARY_DIRS} ${DBUS_TQT_LIBRARY_DIRS} ) -- Serghei