Undefined symbols referenced from fitsubs.o
Barton Pritzl wrote on May 21, 2009
I am trying to compile the stand-alone version of DAOPHOT II and associated programs from Dr. Peter Stetson on my MacBook Pro running OS X version 10.5.7 with an Intel processor. When I run 'make', I get the following errors (below is listed only a sample)
Undefined symbols:
"_ftcopy_", referenced from:
_crepic_ in fitsubs.o
"_ftppre_", referenced from:
_wrsect_ in fitsubs.o
_wraray_ in fitsubs.o
_wrrow_ in fitsubs.o
.
.
.
"_ftclos_", referenced from:
_clpic_ in fitsubs.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [daophot] Error 1
I thought this might be a problem with my copy of cfitsio. I downloaded a newer version, tested it, and everything came out okay. However, I did notice that towards the end of making cfitsio a note came up saying,
ranlib: file: libcfitsio.a (drvgsiftp.o) has no symbols.
I am not sure if that has anything to do with the problem I am having with DAOPHOT. Any suggestions for what might be wrong would be greatly appreciated.
Edit: I wanted to add that I am using gfortran to compile this programs.
Undefined symbols:
"_ftcopy_", referenced from:
_crepic_ in fitsubs.o
"_ftppre_", referenced from:
_wrsect_ in fitsubs.o
_wraray_ in fitsubs.o
_wrrow_ in fitsubs.o
.
.
.
"_ftclos_", referenced from:
_clpic_ in fitsubs.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [daophot] Error 1
I thought this might be a problem with my copy of cfitsio. I downloaded a newer version, tested it, and everything came out okay. However, I did notice that towards the end of making cfitsio a note came up saying,
ranlib: file: libcfitsio.a (drvgsiftp.o) has no symbols.
I am not sure if that has anything to do with the problem I am having with DAOPHOT. Any suggestions for what might be wrong would be greatly appreciated.
Edit: I wanted to add that I am using gfortran to compile this programs.
Barton Pritzl wrote on May 21, 2009
I believe I have narrowed down the problem to cfitsio. After running './configure' and 'make', I ran 'make testf77' and got a number of 'Undefined symbol(s)' errors such as,
"_ftgkns_", referened from:
_MAIN__ in ccpClqvZ.o
"_ftpkyf_", referenced from:
_Main__ in ccpClqvZ.o
Still unsure what the source of the error is.
"_ftgkns_", referened from:
_MAIN__ in ccpClqvZ.o
"_ftpkyf_", referenced from:
_Main__ in ccpClqvZ.o
Still unsure what the source of the error is.
Mike Fitzpatrick wrote on May 21, 2009
These are definitely routines in the FITSIO library, but I'm travelling at the moment and don't have easy access to a similar machine to reproduce the problem. You should be sure that when you got a newer version of the library you didn't just overlay your old version, meaning that problems compiling the old version might not have gone away if the .o file was already present. Also, there can be incompatabilities with GFortran so check the output to see if there were indeed problems compiling e.g. ftgkns.f. In the makefile you might also need to add a "-lgfortran" to the link line, especially if you see missing math functions.
Hope this helps,
-Mike
Hope this helps,
-Mike
Barton Pritzl wrote on May 21, 2009
Thank you for the reply. It turns out that it was some problem with the CFITSIO library. I tried installing a new version, but for some reason, it wasn't installing properly. So, I downloaded a working version from the Space Telescope Science Institute and everything worked fine after that. I don't know what was going wrong with my installation of CFITSIO, but now my other programs installed and are working fine.
dreamcatchering wrote on May 21, 2009
Hi, sorry to drag up an old thread but I'm having the exact same problem at the moment.
I get the same 'undefined symbols' list and ld: symbols(s) not found with Error1 when I try to compile on MacOSX 10.5.8. I tried reinstalling cfitsio but to no avail, and am wondering if I have installed it in the wrong location or perhaps am not linking something up.
To the original poster, did you ever figure out what was wrong? Or to others, any suggestions?
Thanks.
I get the same 'undefined symbols' list and ld: symbols(s) not found with Error1 when I try to compile on MacOSX 10.5.8. I tried reinstalling cfitsio but to no avail, and am wondering if I have installed it in the wrong location or perhaps am not linking something up.
To the original poster, did you ever figure out what was wrong? Or to others, any suggestions?
Thanks.
Michael Gregg wrote on May 21, 2009
Hello,
I too am having this problem on my Mac Pro running OS X 10.6. Any solutions yet? I would prefer to be able to compile my own version of cfitsio rather than download it (though I would settle for that!)
Thanks.
I too am having this problem on my Mac Pro running OS X 10.6. Any solutions yet? I would prefer to be able to compile my own version of cfitsio rather than download it (though I would settle for that!)
Thanks.
Mike Fitzpatrick wrote on May 21, 2009
Undefined references usually means there was an error in compiling some file, it can also happen when you 'configure' a library in a way which leaves some files off of the list of files to include. On the systems described I was able to get things to build with no problem using either gcc or gfortran.
If you post a spool file of the error message I might be able to comment, otherwise the best I can do is say there's a x86_64 macintel binary at
http://iraf.net/ftp/pub/fitz/libcfitsio.a
Hope this helps.
If you post a spool file of the error message I might be able to comment, otherwise the best I can do is say there's a x86_64 macintel binary at
http://iraf.net/ftp/pub/fitz/libcfitsio.a
Hope this helps.
Last post on May 21, 2009