Menu

#294 make error for install gnuplot 6.0.9 under macOS Sonoma 14.4.1: C++ version issue

None
open
nobody
None
None
2024-05-21
2024-05-13
No

"make" error when trying to install version 6.0.0 under macOS Sonoma 14.4.1:

config.log is attached. Below is portion of output to Terminal during "make".

Issue seemt to be the C++ compiler. I have the MacPorts gcc13 installed. Unfortunately, the MacPorts gcc11 reports as "known to fail" if I attempt to install it.

In file included from /opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:105:
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qcompilerdetection.h:604:6: error: Qt requires a C++11 compiler and yours does not seem to be that.

error Qt requires a C++11 compiler and yours does not seem to be that.

 ^

In file included from qtterminal/qt_term.cpp:51:
In file included from /opt/local/libexec/qt5/lib/QtCore.framework/Headers/QtCore:4:
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:398:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
enum class Deprecated_t {};
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:399:1: error: unknown type name 'constexpr'
constexpr Q_DECL_UNUSED Deprecated_t Deprecated = {};
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:399:37: error: expected ';' after top level declarator
constexpr Q_DECL_UNUSED Deprecated_t Deprecated = {};
^
;
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:530:41: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
template <class t=""> struct AlignOf<t &&=""> : AlignOf<t> {};
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:581:19: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using qsizetype = QIntegerForSizeof<std::size_t>::Signed;
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:671:1: error: unknown type name 'constexpr'
constexpr inline const T &qMin(const T &a, const T &b) { return (a < b) ? a : b; }
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:671:24: warning: variable templates are a C++14 extension [-Wc++14-extensions]
constexpr inline const T &qMin(const T &a, const T &b) { return (a < b) ? a : b; }
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:671:11: warning: inline variables are a C++17 extension [-Wc++17-extensions]
constexpr inline const T &qMin(const T &a, const T &b) { return (a < b) ? a : b; }
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:671:25: error: expected ';' at end of declaration
constexpr inline const T &qMin(const T &a, const T &b) { return (a < b) ? a : b; }
^
;
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:671:38: error: unknown type name 'T'
constexpr inline const T &qMin(const T &a, const T &b) { return (a < b) ? a : b; }
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:671:50: error: unknown type name 'T'
constexpr inline const T &qMin(const T &a, const T &b) { return (a < b) ? a : b; }
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:671:27: error: a type specifier is required for all declarations
constexpr inline const T &qMin(const T &a, const T &b) { return (a < b) ? a : b; }
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:673:1: error: unknown type name 'constexpr'
constexpr inline const T &qMax(const T &a, const T &b) { return (a < b) ? b : a; }
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:673:24: warning: variable templates are a C++14 extension [-Wc++14-extensions]
constexpr inline const T &qMax(const T &a, const T &b) { return (a < b) ? b : a; }
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:673:11: warning: inline variables are a C++17 extension [-Wc++17-extensions]
constexpr inline const T &qMax(const T &a, const T &b) { return (a < b) ? b : a; }
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:673:25: error: expected ';' at end of declaration
constexpr inline const T &qMax(const T &a, const T &b) { return (a < b) ? b : a; }
^
;
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:673:38: error: unknown type name 'T'
constexpr inline const T &qMax(const T &a, const T &b) { return (a < b) ? b : a; }
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:673:50: error: unknown type name 'T'
constexpr inline const T &qMax(const T &a, const T &b) { return (a < b) ? b : a; }
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:673:27: error: a type specifier is required for all declarations
constexpr inline const T &qMax(const T &a, const T &b) { return (a < b) ? b : a; }
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:675:1: error: unknown type name 'constexpr'
constexpr inline const T &qBound(const T &min, const T &val, const T &max)
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:675:24: warning: variable templates are a C++14 extension [-Wc++14-extensions]
constexpr inline const T &qBound(const T &min, const T &val, const T &max)
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:675:11: warning: inline variables are a C++17 extension [-Wc++17-extensions]
constexpr inline const T &qBound(const T &min, const T &val, const T &max)
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:675:25: error: expected ';' at end of declaration
constexpr inline const T &qBound(const T &min, const T &val, const T &max)
^
;
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:675:40: error: unknown type name 'T'
constexpr inline const T &qBound(const T &min, const T &val, const T &max)
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:675:54: error: unknown type name 'T'
constexpr inline const T &qBound(const T &min, const T &val, const T &max)
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:675:68: error: unknown type name 'T'
constexpr inline const T &qBound(const T &min, const T &val, const T &max)
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:675:27: error: a type specifier is required for all declarations
constexpr inline const T &qBound(const T &min, const T &val, const T &max)
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:746:5: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
Q_DISABLE_COPY(QMacAutoReleasePool)
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:443:28: note: expanded from macro 'Q_DISABLE_COPY'
Class(const Class &) = delete;\
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:746:5: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:444:39: note: expanded from macro 'Q_DISABLE_COPY'
Class &operator=(const Class &) = delete;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
11 warnings and 20 errors generated.
make[4]: *** [qtterminal/qt_term.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2</std::size_t></t></t></class>

1 Attachments

Discussion

  • Ethan Merritt

    Ethan Merritt - 2024-05-13

    It appears from the log you attach that your /usr/bin/gcc is really pointing to a clang compiler, not to gcc13.

    configure:4119: checking for gcc
    configure:4140: found /usr/bin/gcc
    configure:4151: result: gcc
    configure:4504: checking for C compiler version
    configure:4513: gcc --version >&5
    Apple clang version 15.0.0 (clang-1500.3.9.4)

    I don't know whether that is normal on a Mac or not, but perhaps it would solve your problem to predefine both CC and CXX environmental variables to point to the actual gcc compiler rather than to clang.

    Alternatively your clang compiler may work if you add the compilatation flag -std=c++17. I have had to do that for some clang versions in the past. I have used

    setenv CXXFLAGS "-std=c++17 -Wall -fPIC"

     
  • Ethan Merritt

    Ethan Merritt - 2024-05-21

    Ticket moved from /p/gnuplot/bugs/2708/

    Can't be converted:

    • _milestone:
    • _priority:
     

Log in to post a comment.