Install ROOT with Macpot and avoid --enable-cxx11 flag

Hi all,

recently I have had a problem building Delphes in which it gave me an error saying

>> Compiling external/tcl/panic.c error: invalid argument '-std=c++11' not allowed with 'C/ObjC' make: *** [tmp/external/tcl/panic.o] Error 1

After discussing with the Delphes people we found that the issue is the fact that the flag -std=c++11 was being used when calling root-config --cflags. This is because Macports version of root is installed with the --enable-cxx11 flag and in some cases, for example for Delphes, it creates compilation issues.

I would like to ask if there is an easy whay to avoid that flag when installing ROOT with Macports. I have looked at the por tvariants but I don’t see any cxx11 or somehing similar.

Thanks a lot in advance,

I was one of the instigators that got --enable-cxx11 added to the MacPorts-provided ROOT if the system supports it. They do not have a mechanism for the user to control this flag, it is chosen based on whether your system compiler is clang or the older Apple-modded gcc, and whether your system uses libstdcxx or libc++ (which is basically saying OSX <= 10.8 does NOT have --enable-cxx11 while >= 10.9 DOES have it, unless you do some non-trivial modifications).

To control the flag yourself you’ll have to compile yourself using the usual ./configure && make procedure.



Ok, I see. I have always installed ROOT from source but in Mac I have been having some issues which are fixed when installing ROOT from Macports. I will try to compile them from source, it is always the easiest way to fix some issue like this.

Thanks a lot,