[Users] ETK config-stage failure with Macports gcc -- C+11 range-based for statments?

Roland Haas rhaas at illinois.edu
Thu Nov 16 14:35:16 CST 2023


Hello Bernard,

Odd. You have the correct CXXFLAGS and the compiler seems new enough.

Could you attach the config.log file that the run produced (should be
mentioned near the end with full path).

Since this has been an issue in the past: there are no environment
variables CXX or CXXFLAGS defined in you shell (env | grep CXX finds
nothing)?

Yours,
Roland

> Hi. I tried making a new configuration on my Macbook (MacOS Ventura,
> 13.6.2) after a gap of several months, and it's now failing the "make
> sim-config" step with a complaint about the C++ compiler not being
> C++11-compliant -- end of the make config step screen output is below.
> 
> I'm using the latest available Macports-supplied GNU compilers
> (gcc-mp-13, g++-mp-13, etc.), with the following C & C++ options:
> 
> ---------- compiler flags -----------
> CPP = /opt/local/bin/cpp-mp-13
> CC  = /opt/local/bin/gcc-mp-13
> CXX = /opt/local/bin/g++-mp-13
> CPPFLAGS =
> CFLAGS   = -std=c99
> CXXFLAGS = -std=c++14
> C_LINE_DIRECTIVES = yes
> OPTIMISE           = yes
> CPP_OPTIMISE_FLAGS = # -DCARPET_OPTIMISE -DNDEBUG
> C_OPTIMISE_FLAGS   = -O2 -march=native
> CXX_OPTIMISE_FLAGS = -O2 -march=native
> OPENMP           = yes
> CPP_OPENMP_FLAGS = -fopenmp
> C_OPENMP_FLAGS   = -fopenmp
> CXX_OPENMP_FLAGS = -fopenmp
> WARN           = yes
> CPP_WARN_FLAGS = -Wall
> C_WARN_FLAGS   = -Wall
> CXX_WARN_FLAGS = -Wall
> ---------- end of compiler flags -----------
> 
> Can anyone suggest what's up? The error says that the C++ compiler is
> failing to do range-based for statements, but I can compile & run a simple
> program with a range-based for statement, so this seems unlikely.
> 
> I'm currently on ET_2023-05, but have this problem with ET_2022_11 as well,
> and with gcc-mp-12.
> 
> Thanks, Bernard
> 
> --------------- last bit of screen output ---------
> checking if compiler has broken omp collapse... no
> checking for getopt_long_only... yes
> checking for working const... yes
> checking for C inline... inline
> checking for C static inline... static inline
> checking for C restrict... restrict
> checking for C++ restrict... __restrict__
> checking for C++ copysign... std::copysign
> checking for C++ fpclassify... std::fpclassify
> checking for C++ isfinite... std::isfinite
> checking for C++ isinf... std::isinf
> checking for C++ isnan... std::isnan
> checking for C++ isnormal... std::isnormal
> checking for C++ signbit... std::signbit
> checking for C _Pragma... yes
> checking for C function __attribute__((__const__))... yes
> checking for C++ function __attribute__((__const__))... yes
> checking for C++ member function __attribute__((__const__))... yes
> checking for C function __attribute__((__pure__))... yes
> checking for C++ function __attribute__((__pure__))... yes
> checking for C++ member function __attribute__((__pure__))... yes
> checking for C data __attribute__((__common__))... yes
> checking for C+ data __attribute__((__common__))... yes
> checking for C function __attribute__((__noinline__))... yes
> checking for C++ function __attribute__((__noinline__))... yes
> checking for C++ member function __attribute__((__noinline__))... yes
> checking for C function __attribute__((__always_inline__))... yes
> checking for C++ function __attribute__((__always_inline__))... yes
> checking for C++ member function __attribute__((__always_inline__))... yes
> checking for C __attribute__((__unused__))... yes
> checking for C++ __attribute__((__unused__))... yes
> checking for C __attribute__((__aligned__(...)))... yes
> checking for C++ __attribute__((__aligned__(...)))... yes
> checking for C __attribute__((__cold__))... yes
> checking for C++ __attribute__((__cold__))... yes
> checking for C __attribute__((__hot__))... yes
> checking for C++ __attribute__((__hot__))... yes
> checking for C __attribute__((__format__(printf, 1, 2)))... yes
> checking for C++ __attribute__((__format__(printf, 1, 2)))... yes
> checking for C __attribute__((__noreturn__))... yes
> checking for C++ __attribute__((__noreturn__))... yes
> checking for C __attribute__((__nonnull__))... yes
> checking for C++ __attribute__((__nonnull__))... yes
> checking for C __attribute__((__returns_nonnull__))... yes
> checking for C++ __attribute__((__returns_nonnull__))... yes
> checking for C __builtin_expect... yes
> checking for C++ __builtin_expect... yes
> checking for C __builtin_trap... yes
> checking for C++ __builtin_trap... yes
> checking for C __builtin_unreachable... no
> checking for C++ __builtin_unreachable... no
> checking for C __builtin_assume_aligned... yes
> checking for C++ __builtin_assume_aligned... yes
> checking for C++ static_assert... yes
> checking for C++ auto specifier... yes
> checking for C++ lambda expressions... yes
> checking for C++ range-based for statements... no
> Cactus requires a C++11 compiler -- check your C++ compiler and C++
> compiler flags
> 
> Error reconfiguring sim-config
> make: *** [sim-config] Error 2
> 


Yours,
Roland

-- 
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from http://pgp.mit.edu .
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.einsteintoolkit.org/pipermail/users/attachments/20231116/4eb322b5/attachment-0001.sig>


More information about the Users mailing list