coin-or / coin-or/CyLP

specify the stdlib flag for installation on latest OSX

Open
#85 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JetBrains MPS
Stars
192
Forks
70
PR merge metrics
No merged PRs in 30d

Description

I tried to build CyLP from source on OSX with `pip install cylp`, but the complier complained with
> fatal error: 'iostream' file not found

It seems that it is the problem with the standard library on OSX. I have tried two methods:
1. specify the `CXX=g++-9 CC=gcc-9` flag before `pip install cylp` to force pip to use the GNU gcc. The code was compiled successfully, but when I used it there were segmentation faults.
2. in the setup.py, I added the following flags for the default Clang gcc:
`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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.