|
From: Kevin K. <kk...@gm...> - 2020-09-04 17:17:41
|
When running "make" while trying to build gnuplot on RHEL7, I initially
received the following error:
In file included from /usr/include/c++/4.8.2/type_traits:35:0,
from /usr/include/qt5/QtCore/qglobal.h:45,
from /usr/include/qt5/QtCore/QtCore:4,
from qterminal/qt_term.cpp:51:
/usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #error This file
requires compiler and library support for the ISO C++ 2011 standard. This
support is currently experimental, and must be enabled with the -std=c++11
or -std=gnu++11 compiler options.
Based on the above message, "-std=c++11" needed to be added to the
QT_CFLAGS variable that is generated in the Makefile. Ultimately I did
this by looking at the default value for this variable in config.log, then
running the following in the shell:
setenv QT_CFLAGS '-std=c++11 <QT_CFLAGS>'
where <QT_CFLAGS> is the default value for QT_CFLAGS as listed in
config.log, then re-running configure. This generated a Makefile with
QT_CFLAGS set to its default value plus " -std=c++11", which then allowed
the "make" (and "make install") to complete successfully.
My question is:
Is there a simple one-liner way to specify that something should be
appended to the QT_CFLAGS variable when configure is run rather than
replacing it? If I had run the following in the shell:
setenv QT_CFLAGS -std=c++11
And then run configure, the resulting Makefile would only contain
"-std=c++11" as the value for QT_CFLAGS rather than that plus all of the
default library include paths, and "make" would have failed.
|