Open hanqiu92 opened 4 years ago
I was able to build without an issue on my OS X box, which has an older version of clang. I'm hesitant to just blindly implement this solution. I have on my TODO list to try to get test builds working on multiple OS X versions through Travis. I'll try to verify that the build fails on a clean VM and identify a fix. I guess you Googled around and saw that this is a common complaint. It could be something mucked up on your system.
I tried to build CyLP from source on OSX with
pip install cylp
, but the complier complained withIt seems that it is the problem with the standard library on OSX. I have tried two methods:
CXX=g++-9 CC=gcc-9
flag beforepip install cylp
to force pip to use the GNU gcc. The code was compiled successfully, but when I used it there were segmentation faults.extra_compile_args += ['-stdlib=libc++']
extra_link_args += ['-stdlib=libc++']
And then the code could be complied and executed.I think the above solution is customized to my own case, and it seems better if one can provide a more systematic solution (w.r.t. different OSX versions).
The related information about the OSX and Xcode/CLT version I used are provided below:
Clang: 11.0 build 1100 macOS: 10.15.3-x86_64 CLT: 11.3.1.0.1.1576735732 Xcode: 11.3.1 CLT headers: 11.3.1.0.1.1576735732