Hi,
I failed to build git/master.
I get the following error:
g++ -c -m64 -pipe -g -std=c++11 -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DDWGSUPPORT -DQC_APPDIR="librecad" -DLC_VERSION="2.2.0-alpha-179-g3d4adab1" -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtSvg -I/usr/include/qt4 -I/usr/include -I../../libraries/libdxfrw/src -I../../libraries/jwwlib/src -Icmd -Ilib/actions -Ilib/creation -Ilib/debug -Ilib/engine -Ilib/fileio -Ilib/filters -Ilib/generators -Ilib/gui -Ilib/information -Ilib/math -Ilib/modification -Ilib/printing -Iactions -Imain -Itest -Iplugins -Iui -Iui/forms -Iui/generic -I../res -I../../generated/librecad/moc -I../../generated/librecad/ui -o ../../generated/librecad/obj/rs_system.o lib/engine/rs_system.cpp
lib/engine/rs_system.cpp:38:26: fatal error: QStandardPaths: No such file or directory #include <qstandardpaths></qstandardpaths>
I run Debian/sid
QStandardPaths exists on the system, its path is:
/usr/include/x86_64-linux-gnu/qt5/QtCore/QStandardPaths
It is part of the package qtbase5-dev which version on my system is 5.7.1+dfsg-3+b1
I tried to replace the include statement with the full path: #include "/usr/include/x86_64-linux-gnu/qt5/QtCore/QStandardPaths"
Then I get this error:
g++ -c -m64 -pipe -g -std=c++11 -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DDWGSUPPORT -DQC_APPDIR="librecad" -DLC_VERSION="2.2.0-alpha-179-g3d4adab1" -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtSvg -I/usr/include/qt4 -I/usr/include -I../../libraries/libdxfrw/src -I../../libraries/jwwlib/src -Icmd -Ilib/actions -Ilib/creation -Ilib/debug -Ilib/engine -Ilib/fileio -Ilib/filters -Ilib/generators -Ilib/gui -Ilib/information -Ilib/math -Ilib/modification -Ilib/printing -Iactions -Imain -Itest -Iplugins -Iui -Iui/forms -Iui/generic -I../res -I../../generated/librecad/moc -I../../generated/librecad/ui -o ../../generated/librecad/obj/rs_system.o lib/engine/rs_system.cpp
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QStandardPaths:1:0,
from lib/engine/rs_system.cpp:38:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstandardpaths.h:94:24: error: missing binary operator before token "("
#if QT_DEPRECATED_SINCE(5, 2)
Regards
Jean-Luc
It seems, that you have both installed, Qt5 and Qt4. And Qt4 is your current used version. See the include path parameters in the error message:
Qt5 is required for master branch.
Do you have qtchooser installed? With qtchooser you can easily switch between Qt versions.
Hi,
Yes you are right.
I was wrongly setting QT_SELECT (export QT_SELECT = 5 with the white spaces around the = sign).
Then it goes a bit further but complains about :
g++ -c -m64 -pipe -g -g -O2 -fdebug-prefix-map=/usr/local/src/librecad/librecad-2.2.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DDWGSUPPORT -DQC_APPDIR="librecad" -DLC_VERSION="2.2.0-alpha-179-g3d4adab1" -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include -I../../libraries/libdxfrw/src -I../../libraries/jwwlib/src -Icmd -Ilib/actions -Ilib/creation -Ilib/debug -Ilib/engine -Ilib/fileio -Ilib/filters -Ilib/generators -Ilib/gui -Ilib/information -Ilib/math -Ilib/modification -Ilib/printing -Iactions -Imain -Itest -Iplugins -Iui -Iui/forms -Iui/generic -I../res -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtSvg -isystem /usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I../../generated/librecad/moc -I../../generated/librecad/ui -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o ../../generated/librecad/obj/rs_block.o lib/engine/rs_block.cpp
In file included from lib/actions/rs_snapper.cpp:28:0:
/usr/include/c++/6/cmath:45:23: fatal error: math.h: No such file or directory #include_next <math.h>
^</math.h>
(and the same for <stdlib.h></stdlib.h>
It seems that it is related to this bug on gcc when using -isystem flag (and this is the case for librecad):
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129
But the status of the bug is WONTFIX...
I've removed the -isystem flag and this way, it compiles fine.
My version of gcc is the following:
gcc version 6.3.0 20170425 (Debian 6.3.0-16)
Regards
Jean-Luc
That's correct Jean-Luc.
As we already track this GCC 6 issue on GitHub (issue #880) I'll close this ticket.
I have just now finished to setup an Arch Linux VM to track that issue down, as this affects our daily build ppa on Launchpad too.
Many thanks for your efforts.
Armin