Closed lukasheuberger closed 3 years ago
Just to get some information about your system, are you using Homebrew or Macports at the moment?
I'm using homebrew and have boost (1.75.0), sundials (5.7.0), gtk+3 (3.24.28) and pygobject3 (3.40.1) installed.
Great, that sounds good. Could you try building the project manually instead of using pip (since pip hides the build errors)? First install scons and cython with brew and then run pip install setuptools_scm
(we use setuptools_scm
for versioning). Clone the repo somewhere, cd into the source directory (with the README), and then try running scons
and see if any error messages come up.
Just tried that and I always get the same error:
scons: Reading SConscript files ...
ModuleNotFoundError: No module named 'setuptools_scm':
File "/Users/lukasheuberger/code/phd/opendrop/SConstruct", line 2:
import setuptools_scm
even though I have setuptools (56.0.0) and setuptools-scm (6.0.1) installed in my environment.
I think scons might be using a different python version than the one that had pip install setuptools_scm
. Could you try uninstalling the brew installed scons and then run pip install scons
and try running scons again?
This worked now. And I get the following errors:
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
python3 -m cython -3 --cplus -o opendrop/features/.checkpoints/colorize.cpp opendrop/features/colorize.pyx
g++ -o opendrop/features/.checkpoints/colorize.os -c -O3 -fPIC -Iinclude -I/usr/local/Cellar/python@3.7/3.7.10_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m opendrop/features/.checkpoints/colorize.cpp
g++ -o opendrop/features/colorize.cpython-37m-darwin.so -dynamiclib opendrop/features/.checkpoints/colorize.os $( $)
Undefined symbols for architecture x86_64:
... (a ton of "_Py
statements
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
scons: *** [opendrop/features/colorize.cpython-37m-darwin.so] Error 1
scons: building terminated because of errors.
I'm not really sure to be honest, can you try running
g++ -o opendrop/features/colorize.cpython-37m-darwin.so -dynamiclib -c -O3 -fPIC -Iinclude -I/usr/local/Cellar/python@3.7/3.7.10_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m opendrop/features/.checkpoints/colorize.cpp -lpython3.7
and if that doesn't work, could you paste the full error?
This still does not work :( Here's the full error that I get when I run scons:
Thank you very much!
I think I ran into the same issue when building on Windows. Maybe something do with macOS and Windows linking libraries differently to Linux, I'm not really an expert on this so just guessing.
I've pushed some patches to add some extra compiler flags that I needed for compiling on Windows, hopefully it works in this situation as well.
Just do git pull
and then run scons
again.
this and setting the c++ version to 17 (CXXFLAGS='-std=c++17') in the root SConstruct has fixed it. thanks a lot!
Oh interesting, not too familiar with C++ so may have been using newer uncommon features. Thanks for working through the issues, I'll look at adding that '-std=c++17' flag by default.
Hello. I'm getting the following error when trying to install opendrop on python 3.7 on macOS 11.2.:
any help is highly appreciated!