19 messages in net.sourceforge.lists.courier-users[courier-users] Re: Courier on MacOS ...
FromSent OnAttachments
Daniel E. WhiteApr 29, 2002 5:30 pm 
Aly DharshiApr 29, 2002 6:38 pm 
Daniel E. WhiteApr 29, 2002 6:49 pm 
Aly DharshiApr 29, 2002 7:04 pm 
Daniel E. WhiteApr 29, 2002 7:20 pm 
Aly DharshiApr 29, 2002 7:23 pm 
Daniel E. WhiteApr 30, 2002 3:31 am 
Sam VarshavchikApr 30, 2002 6:22 am 
Gordon MessmerApr 30, 2002 7:42 am 
Daniel E. WhiteApr 30, 2002 4:12 pm 
Daniel E. WhiteMay 1, 2002 5:49 pm 
Nathan J. MehlMay 8, 2002 3:19 pm 
Daniel E. WhiteMay 8, 2002 6:15 pm 
Sam VarshavchikMay 8, 2002 6:45 pm 
Daniel E. WhiteMay 8, 2002 7:13 pm 
Sam VarshavchikMay 8, 2002 7:47 pm 
Daniel E. WhiteMay 8, 2002 7:49 pm 
Bill SchindlerMay 10, 2002 4:58 pm 
Sam VarshavchikMay 10, 2002 5:28 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[courier-users] Re: Courier on MacOS X and others -- Dangling GlobalsActions...
From:Daniel E. White (yg@comcast.net)
Date:May 8, 2002 7:49:41 pm
List:net.sourceforge.lists.courier-users

At 10:12 PM -0400 5/8/02, Daniel E. White wrote:

At 9:45 PM -0400 5/8/02, Sam Varshavchik wrote:

Daniel E. White writes:

This bug is about a global variable referenced in a library but never declared
in the main program. I can go into testlookup.c, in this example, and declare the variable
rfc1035_default_resolver and then the code compiles clean, but I have no idea if
it will run properly.

rfc1035_default_resolver is declared in rfc1035/rfc1035_res.c

Yes, I saw that.

Let us begin back in the compile of the rfc1035 subdir, I saw this:

ar cru librfc1035.a rfc1035.o rfc1035_res.o rfc1035an.o rfc1035dump.o rfc1035dum prrdata.o rfc1035fmttime.o rfc1035gettxt.o rfc1035ipv6to4.o rfc1035mkaddress.o r fc1035mksocket.o rfc1035mxlist.o rfc1035qa.o rfc1035qptr.o rfc1035reply.o rfc103 5resolve.o rfc1035sameip.o rfc1035search.o rfc1035sockaddrip.o rfc1035sockaddrpo rt.o rfc1035str.o rfc1035tcp.o rfc1035udp.o

OK ? There is rfc1035_res.o in that line, so it should be in the librfc1035.a
library, yes ?

Next comes: ranlib librfc1035.a cc -DHAVE_CONFIG_H -I. -I. -I. -traditional-cpp -Wall -I./.. -I.. -c
testlookup.c

And finally: cc -traditional-cpp -Wall -I./.. -I.. -o testlookup testlookup.o librfc1035.a
../soxwrap/libsoxwrap.a `cat ../soxwrap/soxlibs.dep` /usr/bin/ld: Undefined symbols: _rfc1035_default_resolver

So why am I getting an undefined symbol ? The symbol should be in rfc1035_res.o which should be in librfc1035.a

Or am I missing something ?

Here's one more thing I just stumbled upon:

If I add rfc1035_res.o to the command line to compile testlookup, it compiles
clean.

So is the loader dropping the symbol or what ?

--

------------------------------------------------------------------------ Dan White

------------------------------------------------------------------------ "Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us." Calvin (Bill Watterson)