-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not compiling on MacOS #57
Comments
The problem is that I do not have access to any Mac - however it used to work some time ago wit clang. If you are free to choose your Python version, let us forget about Python 2. Error messages for
|
include_dirs = [os.path.join(*'cmf/cmf_core_src/math/integrators/sundials_cvode/include'.split('/'))] | |
# Include numpy | |
include_dirs += [get_numpy_include()] |
POSIX specific settings (for Linux & Mac)
Lines 227 to 238 in f5bf6a4
compile_args = ['-Wno-comment', '-Wno-reorder', '-Wno-deprecated', '-Wno-unused', '-Wno-sign-compare', '-ggdb', | |
'-std=c++11'] | |
if sys.platform == 'darwin': | |
compile_args += ["-stdlib=libc++"] | |
link_args = ['-ggdb'] | |
libraries = [] | |
# Disable OpenMP on Mac see https://github.com/alejandrobll/py-sphviewer/issues/3 | |
if openmp and not sys.platform == 'darwin': | |
compile_args.append('-fopenmp') | |
link_args.append("-fopenmp") | |
libraries.append('gomp') |
Note the Mac specific setting here:
Lines 229 to 230 in f5bf6a4
if sys.platform == 'darwin': | |
compile_args += ["-stdlib=libc++"] |
Is this the problem? This might be specific for CLang (I don't know, it was a lot experimenting last time with a Mac).
All other flags are coming from the configuration of the compiler when Python was compiled. You might have better luck, if you do not use Mac OS' system Python but an extra version.
Thanks for your quick reply. Here is the error from calling pip install cmf (or calling python setup.py which results in the same):
|
I am not quite convinced if it has anything to do with the python version. I am using miniconda py3.6. |
Might be a missing include (not sure), which results in an error only in xcode library. Can you try to add to
If it works, I will update cmf fast. |
Perfect! Quite a bunch of warnings are coming up but it compiles. |
Dear Philipp,
thank you for this nice work. I tried to get CMF running on my machine but miserably failed to do so. Neither from source nor from pip, neither with Py3.6 nor with Py2.7 I can get gcc to compile. I actually guess it to be a compiler setting issue, but I do not see, where these are specified...
Could you point me to allow for optional compiler settings directing to a specific compiler (like gcc-8)?
Thank you.
Conrad
The text was updated successfully, but these errors were encountered: