Caltech-IPAC / Montage

Image Mosaics for Astronomers
Other
113 stars 48 forks source link

Failure to compile on MacOS Ventura 13.5.2 #69

Closed darioflute closed 1 year ago

darioflute commented 1 year ago

Hi, I tried to compile the "macos_build" branch of the github repository. My MacBook PRO is very recent. It has a chip Apple M2 Max and MacOS Ventura 13.5.2 is the operative system. The compilation goes through until reaching the following error:

clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: [mConvert] Error 1 make: [all] Error 2

I attached the complete log for your reference. Thanks for your help in advance, Dario log.txt

darioflute commented 1 year ago

I was finally able to compile the program. I report my solution here for the benefit of future users.

The main problem was that the compression library was not called. So I did the following changes. In the Montage directory I did:

perl -p -i -e "s/ -lm$/ -lm -lz/" /Makefile perl -p -i -e "s/ -lm$/ -lm -lz/" /Makefile.Darwin

to add the -lz to the libraries. Then, I installed in lib/src the latest cfitsio (ciftsio-4.3.0 and compile it inside the directory). I updated the MontageLib/Makefile with the latest ciftsio. Then I remove the line: ../lib/src/cfitsio-3.25/drvrgsiftp.o since this file does not exist.

After all these changes, I was able to compile. I am now able to reproduce the tutorial.