PDA

View Full Version : Qt 4.1 install failing on Linux



Maxilys
9th January 2006, 11:46
By default, the ./configure from Qt 4.1 includes the mkspecs from Qt3 (/usr/lib/qt3/mkspecs/linux-g++/) and --of course-- it fails.

I definitively don't ask ./configure to use this path so I guess this is a setting on my system. But where?

wysota
9th January 2006, 13:06
Try clearing $QTDIR. Although it is very strange. When is this Qt3 spec directory used? After compiling Qt4 qmake or before?

AlexKiriukha
9th January 2006, 23:14
Very strange. I've intstalled Qt4.1.0 on Fedora Core 3 without any problems (but my $QTDIR points to /usr/lib/qt-3.3).
What exactly do you see/have?

Dusdan
10th January 2006, 00:34
Sounds strange to me too. did you run ./configure with no options?

Maxilys
10th January 2006, 05:16
@Wisota: Before everything. It starts on the first call to g++. There is this option -I/usr/lib/qt3/mkspecs/linux-g++/ that is inserted with every call but comes from I don't know where.

@Dusdan: Yes I run ./configure without option. I tried once ./configure -release (on a freshly decompressed archive) but it made no difference.

@AlexKiriukha: My QTDIR is "/usr/lib/qt3". Here's what I see just before the error:
------------

g++ -c -o qfsfileengine_unix.o -pipe -O2 -march=i586 -mtune=i686 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -DQMAKE_OPENSOURCE_EDITION -g -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -I/home/maxilys/qt-x11-opensource-src-4.1.0/src/corelib/arch/generic -I/home/maxilys/qt-x11-opensource-src-4.1.0/include -I/home/maxilys/qt-x11-opensource-src-4.1.0/include/QtCore -I/home/maxilys/qt-x11-opensource-src-4.1.0/include -I/home/maxilys/qt-x11-opensource-src-4.1.0/include/QtCore -I/home/maxilys/qt-x11-opensource-src-4.1.0/src/corelib/global -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_BUILD_QMAKE -DQT_NO_COMPRESS -I/usr/lib/qt3/mkspecs/linux-g++/ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT /home/maxilys/qt-x11-opensource-src-4.1.0/src/corelib/io/qfsfileengine_unix.cpp
/home/maxilys/qt-x11-opensource-src-4.1.0/src/corelib/io/qfsfileengine_unix.cpp: In member function ‘bool QFSFileEnginePrivate::doStat() const’:
/home/maxilys/qt-x11-opensource-src-4.1.0/src/corelib/io/qfsfileengine_unix.cpp:283: error: ‘QT_LSTAT’ was not declared in this scope
/home/maxilys/qt-x11-opensource-src-4.1.0/src/corelib/io/qfsfileengine_unix.cpp: In member function ‘virtual bool QFSFileEngine::setSize(qint64)’:
/home/maxilys/qt-x11-opensource-src-4.1.0/src/corelib/io/qfsfileengine_unix.cpp:540: error: ‘QT_FTRUNCATE’ was not declared in this scope
/home/maxilys/qt-x11-opensource-src-4.1.0/src/corelib/io/qfsfileengine_unix.cpp:542: error: ‘QT_TRUNCATE’ was not declared in this scope
gmake: *** [qfsfileengine_unix.o] Erreur 1

------------

AlexKiriukha
10th January 2006, 09:57
Ok, I see that line:
----------------------8<----------------------
g++ -c -o qfsfileengine_unix.o -pipe -DQMAKE_OPENSOURCE_EDITION -g -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -I/tmp/qt-x11-opensource-src-4.1.0/src/corelib/arch/generic -I/tmp/qt-x11-opensource-src-4.1.0/include -I/tmp/qt-x11-opensource-src-4.1.0/include/QtCore -I/tmp/qt-x11-opensource-src-4.1.0/include -I/tmp/qt-x11-opensource-src-4.1.0/include/QtCore -I/tmp/qt-x11-opensource-src-4.1.0/src/corelib/global -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_BUILD_QMAKE -DQT_NO_COMPRESS -I/tmp/qt-x11-opensource-src-4.1.0/mkspecs/linux-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT /tmp/qt-x11-opensource-src-4.1.0/src/corelib/io/qfsfileengine_unix.cpp
----------------------8<----------------------
gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)
I've just unpacked and run ./configure

wysota
10th January 2006, 11:32
Check all your environment variables to see if this include path is set somewhere. Maybe you have it enabled somewhere and it gets appended here. Especially check vars which are used by g++ during compilation.

axeljaeger
10th January 2006, 15:54
I think you have $QMAKESPEC set.

AlexKiriukha
10th January 2006, 16:13
I think you have $QMAKESPEC set.
I've just tried to set QMAKESPEC to linux-g++ (it didn't exist).
All is buiding fine (as it were). Seems that problem in another place.

axeljaeger
10th January 2006, 16:23
My idea was to unset QMAKESPEC because I had the same trouble on mac where QMAKESPEC was set. Setting QMAKESPEC to "" helped.

Maxilys
10th January 2006, 16:43
Thank you. QMAKESPEC was just the var I was looking for.

I reset it to an empty string before the ./configure and everything went fine. Qt 4.1 is currently building itself since already 10 minutes.

Wait and see...

dimitri
14th January 2006, 16:39
That's really strange. I'm unable to reproduce any problem by setting QTDIR and/or QMAKESPEC on a Fedora Core 4 workstation. Also I read though the configure script and I don't see how setting QMAKESPEC could impact it.