[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[IMP-dev] Re: build error related to C++11 flag on Mac + conda



On 12/13/22 3:48 AM, Barak Raveh wrote:
> I have been trying to build IMP from source on Conda on my mac. It 
> mostly goes well except in one file it gets flustered by a for-range 
> loop (see *Build output *below). If I build using the same cmd-line just 
> with /--std=c++11/, or /std=c++14/, or /std=c++17/, it works just fine. 
> Moreover, cmake does detect that it should work with C++11 (see *CMake 
> output* below). Any ideas?

If you're in a conda environment, you should probably use the conda 
compilers so you're building IMP with the same compiler as its 
dependencies - looks like you're using the system-provided compiler 
here. This is done by "conda install gxx_linux-64" on Linux followed by 
"source ${CONDA_PREFIX}/etc/conda/activate.d/activate-gxx_linux-64.sh" 
(it'll be a little different on a Mac though).

Otherwise, I would just force a C++ standard by passing 
-DCMAKE_CXX_FLAGS="-std=c++17" or similar to your CMake invocation. 
Modern clang is supposed to compile for recent C++ (I think C++14) by 
default, but maybe it is getting confused by one of your other compile 
flags somewhere.

	Ben
-- 
                      https://salilab.org/~ben/
"It is a capital mistake to theorize before one has data."
	- Sir Arthur Conan Doyle