-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FaustLive/faust2jaqt compilation problems with gcc 8.1+ and Qt 5.10+ #295
Comments
Here's my suggested fix for faust2jaqt: --- /usr/bin/faust2jaqt 2019-03-08 10:44:06.000000000 +0100
+++ faust2jaqt 2019-03-08 12:54:26.787644378 +0100
@@ -169,7 +169,7 @@
(
cd "$TMP"
$QMAKE -project "QT += widgets printsupport network" "CONFIG+=warn_off" "$CLANGOPT" "INCLUDEPATH+=$CUR" "INCLUDEPATH+=$FAUSTINC /opt/local/include" "QMAKE_CXXFLAGS=$CXXFLAGS -Wno-unused-parameter $FAUSTTOOLSFLAGS" "LIBS+=$ARCHLIB $SOUNDFILELIBS $OSCLIBS $HTTPLIBS" "HEADERS+=$FAUSTINC/faust/gui/QTUI.h" "RESOURCES+= $FAUSTINC/faust/gui/Styles/Grey.qrc" "$OSCDEFS" "$HTTPDEFS" "$QRDEFS" "$POLYDEFS" "$MIDIDEFS" "$SOUNDFILEDEFS"
- $QMAKE $SPEC
+ $QMAKE $SPEC QMAKE_CFLAGS_ISYSTEM=-I
make
) > /dev/null || exit This seems to work fine with both Qt4 and Qt 5.12, but I haven't tested it for any earlier version of Qt5 or any other gcc version than 8.2. Similarly, the following does the trick for FaustLive: diff --git a/Build/Makefile b/Build/Makefile
index c6ea50d..bb41095 100644
--- a/Build/Makefile
+++ b/Build/Makefile
@@ -52,10 +52,10 @@ windows:
@echo Proceed manually.
qmake:
- cd $(OUTDIR) && qmake .. $(SPEC)
+ cd $(OUTDIR) && qmake .. $(SPEC) QMAKE_CFLAGS_ISYSTEM=-I
$(OUTDIR)/Makefile : $(OUTDIR) FaustLive.pro
- cd $(OUTDIR) && qmake .. $(SPEC)
+ cd $(OUTDIR) && qmake .. $(SPEC) QMAKE_CFLAGS_ISYSTEM=-I
$(OUTDIR) :
mkdir $(OUTDIR) |
Should be fixed in a36d7df |
Looking good, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is a problem with compiling Faust dsps using faust2jaqt, as well as compiling FaustLive, when using the latest gcc and Qt versions. I'm currently running gcc 8.2 and Qt 5.12 on Arch, but it seems that the issue has been around for a while now, at least since gcc 8.1 and Qt 5.10.
Here's what I get when I compile any Faust dsp source (using the latest faust from git) with faust2jaqt:
Similarly, when compiling FaustLive (latest from git, running
make
in the Build directory):In either case, compiling against Qt4 works fine, and with Qt5 I can make the errors go away when adding the setting
QMAKE_CFLAGS_ISYSTEM=-I
to each qmake command (following the advice at machinekit/QtQuickVcp#278).This issue seems to be for real, and not just some local misconfiguration on my system. Just google for
cstdlib:75:15: fatal error: stdlib.h: No such file or directory
, it's all over the place, so many people using Arch and other systems with recent gcc and Qt versions are running into this. As the issue cited above indicates, developers are patching their sources to deal with it.The root cause seems to be that qmake now spits out
-isystem
options instead of-I
for their includes (anything onINCLUDEPATH
), for whatever reason. If an application usesINCLUDEPATH
and includes system directories in there (specifically/usr/include
), as faust2jaqt and FaustLive do, this wreaks havoc on gcc's system include paths so that g++ doesn't find stuff in/usr/include
any more if the g++ system headers use#include_next
to include the headers. So it's probably a bad interaction between Qt 5.10+ and either gcc itself or the g++ system headers. UsingQMAKE_CFLAGS_ISYSTEM=-I
with qmake works around the issue.The question is what to do about it. Maybe we're supposed to stop using
INCLUDEPATH
in the way we do? Can anyone with more insight on the latest Qt developments shed some light on this?If there's no immediate solution other than the suggested workaround, should we handle this upstream or should we rely on package maintainers to work around the issue? (That would be me and David in the case of Arch.) The thing is, if we just ignore this issue upstream, then it will come around to bite us on mainstream Linux distros rather sooner than later, so I think that we need to figure out what's really going on here and act on it in some way.
The text was updated successfully, but these errors were encountered: