Solving the qt4 FreeBSD install problem

Posted by Benjamin Close on March 4, 2009 under FreeBSD | Read the First Comment

Recently I’ve been trying to instal Trolltech’s Qt 4 toolkit on my FreeBSD 7.0 server.  FreeBSD supports qt4 via ports (qt4-gui, qt4-moc, qmake4, etc), hence I’ve been using the ports system to try and install it. However it kept failing with the error:

===>  Configuring for qt4-rcc-4.4.3
/bin/cp /data/usr/ports/devel/qt4-rcc/../../devel/qt4/files/configure /data/usr/ports/devel/qt4-rcc/work/qt-x11-opensource-src-4.4.3/src/tools/rcc/../../../
/usr/bin/sed -i.bak -e 's|target.path.*|target.path=/usr/local/bin|g'  /data/usr/ports/devel/qt4-rcc/work/qt-x11-opensource-src-4.4.3/src/tools/rcc/rcc.pro
/bin/mkdir -p /data/usr/ports/devel/qt4-rcc/work/qt-x11-opensource-src-4.4.3/src/tools/rcc/../../../mkspecs
/bin/ln -sf /usr/local/bin/qmake-qt4 /data/usr/ports/devel/qt4-rcc/work/qt-x11-opensource-src-4.4.3/src/tools/rcc/../../../bin/qmake

This is the Qt/X11 Open Source Edition.

   The specified system/compiler is not supported:

      /data/usr/ports/devel/qt4-rcc/work/qt-x11-opensource-src-4.4.3/mkspecs/freebsd-g++

   Please see the README file for a complete list.

===>  Script "configure" failed unexpectedly.
Please report the problem to [email protected] [maintainer] and attach the
"/data/usr/ports/devel/qt4-rcc/work/qt-x11-opensource-src-4.4.3/src/tools/rcc/../../..//config.log"
including the output of the failure of your make command. Also, it might be
a good idea to provide an overview of all packages installed on your system
(e.g. an `ls /var/db/pkg`).
*** Error code 1

After some brief Google searching, I found the issue. It turns out that a long time ago I had been using qt4 with another project I had been working on. With this project I’d defined:

setenv QMAKESPEC freebsd-g++
setenv QTDIR /usr/X11R6/

This was causing the build system to break. The post at:  http://mail.kde.org/pipermail/kde-freebsd/2008-August/003360.html gave the hint about this.

Once I undefined QMAKESPEC everything worked as expected!



Donations keep this site alive

Add A Comment

*