Caltech-IPAC/Montage

macosx 10.14 incompatibility (?)

Closed this issue · 1 comments

I just built and compiled Montage v6.0 from the git repository so that I could have MontagePy on my system. Trying to install MontagePy via pip resulted in an error stating is not a supported wheel on this platform including for the .whl from the website (which makes sense as the docs say it is for 10.7), and so I decided to try to build from source. Montage works (projection, imaging combining, etc), but when building MontagePy I received multiple warnings of the following type, thought the build was apparently successful

ld: warning: object file (lib/jdinput.o) was built for newer OSX version (10.14) than being linked (10.7)
ld: warning: object file (lib/mViewer_graphics.o) was built for newer OSX version (10.14) than being linked (10.7)
ld: warning: ld: warning: object file (lib/poly.o) was built for newer OSX version (10.14) than being linked (10.7)
object file (lib/getcolj.o) was built for newer OSX version (10.14) than being linked (10.7)
ld: warning: ld: warning: ld: warning: object file (lib/putcolj.o) was built for newer OSX version (10.14) than being linked (10.7)
...

And when I try to import it into python (version 3.7) I get

In [1]: from MontagePy.main import *
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-4ec245c8a016> in <module>
----> 1 from MontagePy.main import *

MontagePy/main.pyx in init MontagePy.main()

ImportError: dlopen(/Users/johnlewis/anaconda3/lib/python3.7/site-packages/MontagePy-1.0.1-py3.7-macosx-10.7-x86_64.egg/MontagePy/_wrappers.cpython-37m-darwin.so, 2): Symbol not found: _hb_buffer_add_utf8
  Referenced from: /Users/johnlewis/anaconda3/lib/python3.7/site-packages/MontagePy-1.0.1-py3.7-macosx-10.7-x86_64.egg/MontagePy/_wrappers.cpython-37m-darwin.so
  Expected in: flat namespace
 in /Users/johnlewis/anaconda3/lib/python3.7/site-packages/MontagePy-1.0.1-py3.7-macosx-10.7-x86_64.egg/MontagePy/_wrappers.cpython-37m-darwin.so

I install using the following commands

cd ~/Montage/python/MontagePy
./make_osx.sh
python setup_osx.py install

It is hard to tell, but it looks like _hb_buffer_add_utf8 is from the harfbuzz software, which is up to date on my computer (for both v 2.5.1 via brew, and 1.8.8 via anaconda python 3.7) and I have freetype v2.10.0. I will also not another use with an issue from stackoverflow

My current workaround is I just work via terminal or use montage_wrapper which works for me.

The process has been updated to include a Python 3.7 build of the binary extension. This will be uploaded to GitHub shortly but in the meantime it has already been uploaded to PyPI so you should be able to install from there.