Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in compilation/installation #63

Open
cantiello opened this issue Mar 30, 2023 · 2 comments
Open

Error in compilation/installation #63

cantiello opened this issue Mar 30, 2023 · 2 comments

Comments

@cantiello
Copy link

Hi,
I am trying to install Montage on my MacBookPro (OSX 13.2, Ventura).
After downloading Montage_v6.0.tar.gz, and typing "make" in the "Montage" folder, the process breaks -after about one minute of installation- with the following being the latest lines of the installation output:

gcc -g -I. -I../lib/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=c99 -c debugCheck.c
gcc -g -I. -I../lib/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=c99 -c checkHdr.c
gcc -g -I. -I../lib/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=c99 -c checkWCS.c
gcc -o mConvert mConvert.o debugCheck.o checkHdr.o
checkWCS.o -L../lib -lwcs -lcfitsio -lcoord -lmtbl -lsvc -lwww -lboundaries -lpixbounds -ltwoplane -lm
ld: library not found for -lcfitsio
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [mConvert] Error 1
cp mConvert mFlattenExec mHdrCheck mHdrtbl mTblSort mTileHdr mTileImage ../bin
cp: mConvert: No such file or directory
cp: mFlattenExec: No such file or directory
cp: mHdrCheck: No such file or directory
cp: mHdrtbl: No such file or directory
cp: mTblSort: No such file or directory
cp: mTileHdr: No such file or directory
cp: mTileImage: No such file or directory
make[1]: *** [install] Error 1
make: *** [all] Error 2

Any suggestion on what could the problem be?

@JohnGood
Copy link
Contributor

Michele -

I have to partly infer what is going on (since I am using Monterey, not Ventura) but here goes. This includes a suggestion you can try if you like and I'd be glad to hear if it works for you.

Compilers have gradually been getting more stringent with regards to standards. CFITSIO was using implicit function declarations that were then disallowed by the C99 standard. The copy of CFITSIO we are using dates after C99 but while most compilers still allowed implicit declarations. With newer versions of compilers that has caught up with us.

There are two solutions. One is to update to a newer version of CFITSIO. This would fix this problem, I assume, but the newer versions have folded in dependence on other libraries (like curl and zcompress) and we would need to test that change against all the platforms where people use Montage. This is the better solution but not a quick fix.

Luckily, CFITSIO already a way to address the problem, dealing with the two use patterns with an optional macro argument. Before running the top level Montage "make", edit

 lib/src/Makefile

and change

(cd cfitsio-3.25; ./configure; make; cp libcfitsio.a ../..; cp *.h ../../include)

to

(cd cfitsio-3.25; ./configure; make CFLAGS=-Dunix; cp libcfitsio.a ../..; cp *.h ../../include)

This is a temporary solution; we should either update to a newer CFITSIO and deal with the testing (and possibly configuration) consequences or add the above to our tarball (once we confirm that there are no platforms we support that need the older syntax).

@cantiello
Copy link
Author

cantiello commented Apr 3, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants