Thread: Re: URGENT: Undefined Symbols Using XCode 2.5 on Mac OS X 10.5
On Sun, December 23, 2007 10:41, Keary Suska wrote: > I ha a perfectly functioning libpq before I upgraded my computer but for > some reason I am now getting undefined symbol errors in libpq.a: > > AirBase:0: /Users/aksuska/Projects/FFSEmploy/AirBase > Project/AirBase/libpq.a(fe-secure.o) reference to undefined > _pthread_sigmask$UNIX2003 > AirBase:0: _close$UNIX2003 > AirBase:0: _fcntl$UNIX2003 [...] This sounds more like a generic linking problem specific to your system than a problem with postgres as such. Your best bet may be to ask on platform-specific forums. That said, can't you build postgres from source and use the libpq you get? Jeroen
on 12/23/07 6:16 AM, jtv@xs4all.nl purportedly said: >> I ha a perfectly functioning libpq before I upgraded my computer but for >> some reason I am now getting undefined symbol errors in libpq.a: >> >> AirBase:0: /Users/aksuska/Projects/FFSEmploy/AirBase >> Project/AirBase/libpq.a(fe-secure.o) reference to undefined >> _pthread_sigmask$UNIX2003 >> AirBase:0: _close$UNIX2003 >> AirBase:0: _fcntl$UNIX2003 > [...] > > This sounds more like a generic linking problem specific to your system > than a problem with postgres as such. Your best bet may be to ask on > platform-specific forums. > > That said, can't you build postgres from source and use the libpq you get? Originally I was using a MacPorts install, but I compiled from source and used that lipq.a, but without any difference in result. Best, Keary Suska Esoteritech, Inc. "Demystifying technology for your home or business"
On Dec 24, 2007, at 12:35 PM, Keary Suska wrote:
on 12/23/07 6:16 AM, jtv@xs4all.nl purportedly said:I ha a perfectly functioning libpq before I upgraded my computer but forsome reason I am now getting undefined symbol errors in libpq.a:AirBase:0: /Users/aksuska/Projects/FFSEmploy/AirBaseProject/AirBase/libpq.a(fe-secure.o) reference to undefined_pthread_sigmask$UNIX2003AirBase:0: _close$UNIX2003AirBase:0: _fcntl$UNIX2003[...]This sounds more like a generic linking problem specific to your systemthan a problem with postgres as such. Your best bet may be to ask onplatform-specific forums.That said, can't you build postgres from source and use the libpq you get?
Originally I was using a MacPorts install, but I compiled from source and
used that lipq.a, but without any difference in result.
To find out if the symbol is in the library use the following command "nm -A libpq.a | grep close". Of course you will need to the in the same dir as libpq or use an absolute reference. I get the following:
Macintosh:lib$ nm -A libpq.a | grep close
libpq.a:fe-auth.o: U _krb5_cc_close
libpq.a:fe-connect.o: U _close
libpq.a:fe-connect.o: 000004dc t _closePGconn
libpq.a:fe-connect.o: U _fclose
libpq.a:fe-connect.o: U _pqsecure_close
libpq.a:fe-misc.o: U _close
libpq.a:fe-misc.o: U _pqsecure_close
libpq.a:fe-print.o: U _pclose
libpq.a:fe-lobj.o: U _close
libpq.a:fe-lobj.o: 000009fa T _lo_close
libpq.a:fe-protocol3.o: U _close
libpq.a:fe-protocol3.o: U _pqsecure_close
libpq.a:fe-secure.o: 000000a1 t _close_SSL
libpq.a:fe-secure.o: U _fclose
libpq.a:fe-secure.o: 000000f6 T _pqsecure_close
Now here you will see there is no "_close" related to "fe-secure.o". Should you be using "_close_SSL" or "_fclose"? For my projects using xCode I link against libpq.dylib. Not sure if this makes any difference.
on 12/24/07 4:16 PM, neilt@neiltiffin.com purportedly said: > To find out if the symbol is in the library use the following command "nm -A > libpq.a | grep close". Of course you will need to the in the same dir as > libpq or use an absolute reference. I get the following: > > Macintosh:lib$ nm -A libpq.a | grep close > libpq.a:fe-auth.o: U _krb5_cc_close > libpq.a:fe-connect.o: U _close > libpq.a:fe-connect.o: 000004dc t _closePGconn > libpq.a:fe-connect.o: U _fclose > libpq.a:fe-connect.o: U _pqsecure_close > libpq.a:fe-misc.o: U _close > libpq.a:fe-misc.o: U _pqsecure_close > libpq.a:fe-print.o: U _pclose > libpq.a:fe-lobj.o: U _close > libpq.a:fe-lobj.o: 000009fa T _lo_close > libpq.a:fe-protocol3.o: U _close > libpq.a:fe-protocol3.o: U _pqsecure_close > libpq.a:fe-secure.o: 000000a1 t _close_SSL > libpq.a:fe-secure.o: U _fclose > libpq.a:fe-secure.o: 000000f6 T _pqsecure_close > > Now here you will see there is no "_close" related to "fe-secure.o". Should > you be using "_close_SSL" or "_fclose"? For my projects using xCode I link > against libpq.dylib. Not sure if this makes any difference. I figured out to use -isysroot and the CC variable to force compiling against the Mac OS X 104u. The compile doesn't complete successfully, but it does (apparently) build a fully functional libpq that I can use sans any linker errors. This will work for now. Thanks for your help, Keary Suska Esoteritech, Inc. "Demystifying technology for your home or business"