megbedell / wobble

precise data-driven RV fitting, now with tellurics!
https://wobble.readthedocs.io
MIT License
39 stars 16 forks source link

Install Issues on macOS 10.14 (Mojave) #57

Closed bjfultn closed 5 years ago

bjfultn commented 5 years ago

I had some trouble building the C extensions on my laptop running macOS 10.14.3 and Xcode 10. Here is the error I saw:

poma:wobble bfulton$ python setup.py develop
/Users/bfulton/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
running develop
running egg_info
writing wobble.egg-info/PKG-INFO
writing dependency_links to wobble.egg-info/dependency_links.txt
writing top-level names to wobble.egg-info/top_level.txt
reading manifest file 'wobble.egg-info/SOURCES.txt'
writing manifest file 'wobble.egg-info/SOURCES.txt'
running build_ext
building 'wobble.interp.interp_op' extension
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/bfulton/anaconda3/include -arch x86_64 -I/Users/bfulton/anaconda3/include -arch x86_64 -Iwobble/interp -I/Users/bfulton/anaconda3/include/python3.6m -c wobble/interp/interp_op.cc -o build/temp.macosx-10.7-x86_64-3.6/wobble/interp/interp_op.o -I/Users/bfulton/anaconda3/lib/python3.6/site-packages/tensorflow/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 -mmacosx-version-min=10.9
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/bfulton/anaconda3/include -arch x86_64 -I/Users/bfulton/anaconda3/include -arch x86_64 -Iwobble/interp -I/Users/bfulton/anaconda3/include/python3.6m -c wobble/interp/interp_rev_op.cc -o build/temp.macosx-10.7-x86_64-3.6/wobble/interp/interp_rev_op.o -I/Users/bfulton/anaconda3/lib/python3.6/site-packages/tensorflow/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 -mmacosx-version-min=10.9
g++ -bundle -undefined dynamic_lookup -L/Users/bfulton/anaconda3/lib -arch x86_64 -L/Users/bfulton/anaconda3/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-3.6/wobble/interp/interp_op.o build/temp.macosx-10.7-x86_64-3.6/wobble/interp/interp_rev_op.o -L/Users/bfulton/anaconda3/lib -o build/lib.macosx-10.7-x86_64-3.6/wobble/interp/interp_op.cpython-36m-darwin.so -L/Users/bfulton/anaconda3/lib/python3.6/site-packages/tensorflow -ltensorflow_framework
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
ld: library not found for -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'g++' failed with exit status 1
bjfultn commented 5 years ago

I found a solution here: https://blog.driftingruby.com/updated-to-mojave/

In summary, you need to install the SDK headers for 10.14 separately:

open /Library/Developer/CommandLineTools/Packages/

Run the package macOS_SDK_headers_for_macOS_10.14.pkg

Try to build again: cd wobble; python setup.py install

bjfultn commented 5 years ago

Added a doc page in PR #58 to help users who run into this issue.