Configure problem problem v4.8.3; on Ubuntu (Mint Maya distribution)
-
Ran ./configure - no error.
When running make (either as std user or sudo) get the following error:
@g++ -m64 -pipe -O2 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_BUILD_XML_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_SSE4_1 -DQT_HAVE_SSE4_2 -DQT_HAVE_AVX -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/linux-g++-64 -I. -I../../include/QtCore -I../../include -I../../include/QtXml -I.rcc/release-shared -I.moc/release-shared -x c++-header -c ../corelib/global/qt_pch.h -o .pch/release-shared/QtXml.gch/c++
In file included from ../../include/QtCore/qglobal.h:1:0,
from ../corelib/global/qt_pch.h:52:
../../include/QtCore/../../src/corelib/global/qglobal.h:62:28: fatal error: ../../include/QtCore/QtCore/qconfig.h: Permission denied@The problem, I believe is trying to #include "include/QtCore/QtCore/qconfig.h" as -I../../include/QtCore is expanded on the call to g++; this can be fixed by changing:
@#include <QtConfig/qtconfig.h>@
to
@#include <qtconfig.h>@
at corelib/global/qt_pch.h:52, or by removing_ -I../../include/QtCore_ from the Makefile. The former may cause configuration issues and the latter is a pain - any ideas on how to correct either in the configure script? Anyone else run into this?
-
sorry version 4.8.3, not 2.8.3
-
Quick fix:
create a shell script (or run commands) to add -I../../include prior to the -I../../include/QtCore in all makefiles:
@!/bin/sh
grep -rlE "Makefile" . | xargs sed -i 's|-I/../../include/QtCore|-I/../../include -I/../../include/QtCore|g'
grep -rlE "Makefile" . | xargs sed -i 's|-I/../../../include/QtCore|-I/../../../include -I/../../../include/QtCore|g'
grep -rlE "Makefile" . | xargs sed -i 's|-I/../../../../include/QtCore|-I/../../../../include -I/../../../../include/QtCore|g'@and run from the root directory of the Qt source installation (right after configure).
This is an ugly patch - does anyone understand qmake better than I do (at all) to change the order of the include directories?