Submit a Story  :  IRAF Links  :  Past Polls  :  Calendar  :  Advanced Search  
     iraf.net
FAQ
 Forum FAQForum FAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Undefined symbols referenced from fitsubs.o

 
Post new topic   Reply to topic    iraf.net Forum Index -> Systems
View previous topic :: View next topic  
Author Message
bpritzl



Joined: 21 May 2009
Posts: 3

PostPosted: Thu May 21, 2009 1:23 pm    Post subject: Undefined symbols referenced from fitsubs.o Reply with quote

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.
Back to top
View user's profile Send private message
bpritzl



Joined: 21 May 2009
Posts: 3

PostPosted: Fri May 22, 2009 2:11 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3256
Location: Tucson

PostPosted: Fri May 29, 2009 7:53 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
bpritzl



Joined: 21 May 2009
Posts: 3

PostPosted: Mon Jun 01, 2009 1:33 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
dreamcatchering



Joined: 02 Feb 2010
Posts: 1

PostPosted: Tue Feb 02, 2010 3:36 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
mdg



Joined: 23 Oct 2007
Posts: 8
Location: U.C. Davis/LLNL

PostPosted: Tue Dec 14, 2010 1:03 am    Post subject: undefined symbols in cfitsio link to fitsubs.o in daophot Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3256
Location: Tucson

PostPosted: Tue Dec 14, 2010 5:42 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    iraf.net Forum Index -> Systems All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2009 phpBB Group
 Copyright © 2005-2011 iraf.net
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.12 seconds