ports/145769: final link of mail/fetchmail fails libhx509.so undefined reference to MD2_Init etc

Andrew Reilly areilly at bigpond.net.au
Fri Jun 25 13:20:04 UTC 2010


The following reply was made to PR ports/145769; it has been noted by GNATS.

From: Andrew Reilly <areilly at bigpond.net.au>
To: Matthias Andree <matthias.andree at gmx.de>
Cc: "Stefan Walter" <stefan at freebsd.org>,
 "Edwin Groothuis" <edwin at freebsd.org>,
 GNATS <FreeBSD-gnats-submit at freebsd.org>
Subject: Re: ports/145769: final link of mail/fetchmail fails libhx509.so undefined reference to MD2_Init etc
Date: Fri, 25 Jun 2010 23:19:20 +1000

 Hi Matthias,
 
 On 25/06/2010, at 21:26 , Matthias Andree wrote:
 
 > Andrew Reilly wrote on 2010-06-25:
 >=20
 >> Who knows how dynamic linking works?  I don't but I've tracked down =
 the fact that the symbols missing from libhx509.so (MD2_Init etc) *are* =
 defined by /lib/libcrypto.so, but libhx509.so doesn't show that =
 dependency when you run ldd on it.  I'm afraid that I don't know how to =
 change that situation, but I believe that it would make a difference to =
 those builds.
 >=20
 > Either it's an ELF field that gets listed as "NEEDED" with readelf -d =
 libhx509.so,
 > or it's the <dlfcn.h> stuff with dlopen(3), dlclose(3), dlerror(3) and =
 dlsym(3).
 
 So how does one add more NEEDED fields, when the library is being built? =
  The only NEEDED field when running readelf -d libhx509.so on my system =
 is libc.so.7.
 
 Looking for the MD2 entries in question:
 
 duncan [206]$ objdump -R libhx509.so | grep MD2
 000000000013e9c8 R_X86_64_JUMP_SLOT  MD2_Init
 000000000013ef18 R_X86_64_JUMP_SLOT  MD2_Final
 000000000013f420 R_X86_64_JUMP_SLOT  MD2_Update
 duncan [207]$ nm libhx509.a | grep MD2
                 U MD2_Final
                 U MD2_Init
                 U MD2_Update
 
 and lo:
 duncan [211]$ nm /usr/lib/libcrypto.a | grep MD2
 0000000000000000 T MD2
                 U MD2_Final
                 U MD2_Init
                 U MD2_Update
                 U MD2_Final
                 U MD2_Init
                 U MD2_Update
 0000000000000170 T MD2_Final
 00000000000002e0 T MD2_Init
 00000000000001f0 T MD2_Update
 0000000000000000 T MD2_options
 0000000000000000 R MD2_version
 
 There they are.  One assumes that they're also in libcrypto.so.6, so =
 shouldn't libhx509.so have a NEEDED entry that points to it?
 
 Cheers,
 
 --=20
 Andrew
 



More information about the freebsd-ports-bugs mailing list