You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered the following issue while installing POT on MacOSX Mojave, with
python 3.6
python setup.py build running build running build_py running build_ext building 'ot.lp.emd_wrap' extension /usr/bin/gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/include -arch x86_64 -I/anaconda3/include -arch x86_64 -Iot/lp -I/anaconda3/lib/python3.6/site-packages/numpy/core/include -I/Users/nico/code/POT/ot/lp -I/anaconda3/include/python3.6m -c ot/lp/emd_wrap.cpp -o build/temp.macosx-10.7-x86_64-3.6/ot/lp/emd_wrap.o warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found] In file included from ot/lp/emd_wrap.cpp:648: In file included from /anaconda3/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4: In file included from /anaconda3/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:18: In file included from /anaconda3/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1823: /anaconda3/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings] #warning "Using deprecated NumPy API, disable it by " \ ^ In file included from ot/lp/emd_wrap.cpp:650: ot/lp/EMD.h:19:10: fatal error: 'iostream' file not found #include <iostream> ^~~~~~~~~~ 2 warnings and 1 error generated. error: command '/usr/bin/gcc' failed with exit status 1
I finally solved it by adding in setup.py the following extra argument for the compiler
extra_compile_args=["-stdlib=libc++"]
However before pushing a PR, it is not clear to me if adding this option will break compatibility with other OS. Meanwhile, it is a simple workaround for this problem.
Still fails for me when installing from master branch.
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
hi @rishab-sharma and @joshua-gould , could you please tell which version of OSX Mojave you are running ? Also, is command line tools properly installed from Xcode ? If so, what version of gcc do you have on your computer ? Thx
Activity
rflamary commentedon Oct 19, 2018
Hello @ncourty
You should definitely do a PR with the change. The tests on travis will tell us if it breaks anything.
If it does we can maybe test the MacosX version in setup.py and handle the parameter automatically.
ncourty commentedon Oct 19, 2018
Travis test is failing on the branch. It seems it is really an OSX Mojave dependant argument, linked to the clang compiler that ships with XCode 10.
rishab-sharma commentedon Jul 7, 2019
I still seem to have this issue on Mojave python 3.6
rflamary commentedon Jul 8, 2019
Hello @rishab-sharma
Could you try with the master in the git? We still did not make a proper release since the PR.
joshua-gould commentedon Jul 9, 2019
Still fails for me when installing from master branch.
ncourty commentedon Jul 9, 2019
hi @rishab-sharma and @joshua-gould , could you please tell which version of OSX Mojave you are running ? Also, is command line tools properly installed from Xcode ? If so, what version of gcc do you have on your computer ? Thx
joshua-gould commentedon Jul 10, 2019
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Mojave 10.14.5
XCode Version 10.2.1 (10E1001)