Port requiring c++14 features fails to build because these USES statements: > USES= compiler:c++14-lang gmake qmake > USE_QT5= core gui network add -std=c++11, not -std=c++14 to the command lines, as is expected. Compiler is clang36. Not sure if Qt has to do with this. This is a pretty bad problem because c++14 is a major feature that is supposed to be supported.
This works fine here with USE_CXXSTD=c++14 , do you have local patches? USES= compiler:c++14-lang gmake qmake USE_QT5= core gui network USE_CXXSTD= c++14 % make -VCXXFLAGS -O2 -pipe -fstack-protector -fno-strict-aliasing -std=c++14
No local patches, and the output of 'make -VCXXFLAGS' is the same. No mention of c++11 after 'make extract patch', but the actual command lines have -std=c++11: > /usr/local/bin/clang++36 -c -O2 -pipe -fno-omit-frame-pointer -fstack-protector -fno-strict-aliasing -fno-omit-frame-pointer -std=c++14 -DDILAY_VERSION=\"1.5.0\" -DGLM_FORCE_RADIANS -DNDEBUG -Wno-unused-parameter -Wno-unused-variable -Wno-maybe-uninitialized -fPIC -std=c++11 -Wall -W -pthread -D_THREAD_SAFE -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_OPENGLEXTENSIONS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_CORE_LIB -I. -Isrc -I/usr/local/include/qt5 -I/usr/local/include/qt5/QtOpenGL -I/usr/local/include/qt5/QtWidgets -I/usr/local/include/qt5/QtOpenGLExtensions -I/usr/local/include/qt5/QtGui -I/usr/local/include/qt5/QtXml -I/usr/local/include/qt5/QtCore -Imoc -I/usr/local/include -I/usr/local/include -I/usr/local/lib/qt5/mkspecs/freebsd-clang -o obj/src/affected-faces.o src/affected-faces.cpp
(In reply to yuri from comment #2) That could be caused by /usr/local/lib/qt5/mkspecs/common/clang.conf (included from /usr/local/lib/qt5/mkspecs/freebsd-clang/qmake.conf ), because it contains: QMAKE_CXXFLAGS_CXX11 = -std=c++11
Thanks Thierry, Removing this line helps. So this is really a bug in qt5-qmake-5.5.1
The workaround for this is: > QMAKE_ARGS+= QMAKE_CXXFLAGS_CXX11= But the problem needs to be fixed.
Assign to the maintainer of devel/qmake5.
Just to make it easier investigate this issue. Which port are you talking about?
Created attachment 171524 [details] example port reproducing issue It isn't yet released, attaching the shar. Please remove QMAKE_ARGS+= workaround line to observe the problem.
Created attachment 171535 [details] experimental patch to devel/qmake5 Could you add the attached [experimental] patch to your devel/qmake5 and try again with a rebuilt qmake5?
Yes, this patch fixes the problem.
Comment on attachment 171535 [details] experimental patch to devel/qmake5 I've just spoken to tcberner on IRC about this. Since our clang is recent enough, it should pass the original version check there, so the problem is elsewhere: Qt's configure script was using something like "clang -v 2>&1 | sed -E '/^clang version .../....'" to obtain clang's version number and, since our clang reports itself as "FreeBSD clang" instead of "clang" QT_CLANG_{MAJOR,MINOR}_VERSION" were never defined. I've just submitted https://codereview.qt-project.org/#/c/168916/ upstream to fix the issue and will backport it once it gets reviewed.
A commit references this bug: Author: rakuco Date: Wed Aug 24 08:12:35 UTC 2016 New revision: 420773 URL: https://svnweb.freebsd.org/changeset/ports/420773 Log: Import upstream patch to fix the detection of clang's version number. Our clang reports itself as "FreeBSD clang version x.y.z" instead of just "clang version x.y.z", which was preventing the sed pattern used in the configure script from matching and thus QT_CLANG_MAJOR_VERSION and QT_CLANG_MINOR_VERSION were never defined. One of the consequences is that tests for those values in mkspecs later always failed, which led to some features such as C++14 support being disabled. PR: 210327 MFH: 2016Q3 Changes: head/devel/qmake5/Makefile head/devel/qmake5/files/patch-configure
A commit references this bug: Author: rakuco Date: Thu Aug 25 07:41:00 UTC 2016 New revision: 420837 URL: https://svnweb.freebsd.org/changeset/ports/420837 Log: MFH: r420773 Import upstream patch to fix the detection of clang's version number. Our clang reports itself as "FreeBSD clang version x.y.z" instead of just "clang version x.y.z", which was preventing the sed pattern used in the configure script from matching and thus QT_CLANG_MAJOR_VERSION and QT_CLANG_MINOR_VERSION were never defined. One of the consequences is that tests for those values in mkspecs later always failed, which led to some features such as C++14 support being disabled. PR: 210327 Approved by: ports-secteam (junovitch) Changes: _U branches/2016Q3/ branches/2016Q3/devel/qmake5/Makefile branches/2016Q3/devel/qmake5/files/patch-configure