/dev/ammo42 wrote:
On Wed, 21 Dec 2011 22:51:28 -0600
Bruce Dubbs <bruce.dubbs(a)gmail.com> wrote:
> I've been struggling a bit with building kdeadmin-3.5.13.
> I have qt in /opt/qt and Trinity
> base in /opt/trinity. Configure fails to find tqt and then thinks
> it's version 4. It doesn't find qt and fails. This can be overcome
> with:
>
> CPPFLAGS='-I/opt/trinity/include/tqt' \
> ./configure --prefix=/opt/trinity ...
>
> The --with-qt-includes option does not solve the problem, but the
> CPPFLAGS can be either before or after ./configure.
>
> Environment variables are:
>
> PATH=/opt/trinity/bin:/usr/local/bin:/bin:/usr/bin:\
> /opt/texlive/2011/bin/x86_64-linux:\
> /opt/llvm/bin:/opt/qt/bin:/opt/xorg/bin:/sbin:/usr/sbin
>
> PKG_CONFIG_PATH=:/opt/trinity/lib/pkgconfig:\
> /usr/local/lib/pkgconfig:\
> /opt/qt/lib/pkgconfig:\
> /opt/xorg/lib/pkgconfig:\
> /opt/xorg/share/pkgconfig
>
> QTDIR=/opt/qt
>
> Then the make fails in several places. What I finally found that
> works is:
>
> make LDFLAGS='-lqt -lkdecore' \
> TQTDCOPIDL=dcopidl2cpp \
> TQTDCOPIDL2CPP=dcopidl2cpp
>
> This again tells me that configure didn't do it's job. In the
> Makefile, both TQTDCOPIDL and TQTDCOPIDL2CPP are blank. The
> LIB_KDECORE variable is set correctly but is not used.
> LIBTQT_LDFLAGS is set to -ltqt, but that doesn't do the job.
>
> There are two programs in /opt/trinity/bin: dcopidl2cpp-tqt and
> dcopidl-tqt, but they do not work with the input in the Makefile.
>
> I did not have any of these problems in KDE3. Is there something I'm
> missing here?
Yes, you forgot the --enable-closure option of
./configure that is
mentioned as "undocumented but necessary" at
http://www.trinitydesktop.org/wiki/bin/view/Developers/HowToBuild .
Without it kdeadmin-3.5.10 doesn't build on Trinity without the same
hacks as yours either.
When I do:
./configure --prefix=/opt/trinity --enable-closure
I get:
...
Detected TQt4...
...
configure: error: Qt (>= Qt 4.3 and < 5.0) (headers and libraries) not
found. Please check your installation!
--enable-closure adjusts KDE_USE_CLOSURE_TRUE, KDE_USE_CLOSURE_FALSE and
KDE_NO_UNDEFINED. The first two are not used in kdeadmin. The third
sets the linker to "-Wl,--no-undefined -Wl,--allow-shlib-undefined".
That fixes the need to use LDFLAGS, but it doesn't help detect
dcopidl2cpp and dcopidl2cpp.
So:
CPPFLAGS='-I/opt/trinity/include/tqt' \
./configure --prefix=/opt/trinity --enable-closure
make TQTDCOPIDL=dcopidl2cpp TQTDCOPIDL2CPP=dcopidl2cpp
now works. I suppose I could use:
export CPLUS_INCLUDE_PATH='/opt/trinity/include/tqt'
./configure --prefix=/opt/trinity --enable-closure
as an alternative to CPPFLAGS.
And yes, the instructions for 3.5.10 worked fine without hacks:
http://www.linuxfromscratch.org/blfs/view/svn/kde/kdeadmin.html
-- Bruce