Skip to content
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

faust should be able to pass compiler flags supplied by the user #1109

Open
yurivict opened this issue Jan 10, 2025 · 0 comments
Open

faust should be able to pass compiler flags supplied by the user #1109

yurivict opened this issue Jan 10, 2025 · 0 comments

Comments

@yurivict
Copy link
Contributor

yurivict commented Jan 10, 2025

I am getting this failure:

$ faust2jaqt example-freeverb_demo.dsp
In file included from example-freeverb_demo.cpp:5018:
In file included from /usr/local/include/qt6/QtCore/QtGlobal:1:
In file included from /usr/local/include/qt6/QtCore/qglobal.h:26:
In file included from /usr/local/include/qt6/QtCore/qtcoreexports.h:7:
/usr/local/include/qt6/QtCore/qcompilerdetection.h:1260:6: error: "Qt requires a C++17 compiler"
 1260 | #    error "Qt requires a C++17 compiler"
      |      ^

The default compiler isn't C++17 compatible by default. It needs special compiler flags for this.

The faust2jaqt executable should allow to pass compiler flags CXXFLAGS to the compiler.
Alternatively, or additionally, it should use the same compiler and compiler flags that were used during compilation.

Currently it isn't clear how to do that.


After some more analysis, I found that faust2jaqt wrote -std=c++11 into the Makefile:

####### Compiler, tools and options

CC            = clang
CXX           = clang++
DEFINES       = -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB
CFLAGS        = -pipe -O2 -w -fPIC -pthread $(DEFINES)
CXXFLAGS      = -std=c++11 -Ofast -march=native -Wno-unused-parameter -O2 -w -fPIC -pthread $(DEFINES)
INCPATH       = -I. -I../../../stage/usr/local/include -I. -I/usr/local/include/qt6 -I/usr/local/include/qt6/QtPrintSupport -I/usr/local/include/qt6/QtWidgets -I/usr/local/include/qt6/QtGui -I/usr/local/include/qt6/QtNetwork -I/usr/local/include/qt6/QtCore -I. -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/lib/qt6/mkspecs/freebsd-clang
QMAKE         = /usr/local/bin/qmake6

This Makefile can't succeed because Qt6 explicitly requires C++17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant