From owner-freebsd-stable@FreeBSD.ORG Tue Mar 4 18:23:18 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CEBF106566B; Tue, 4 Mar 2008 18:23:18 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id 2272D8FC22; Tue, 4 Mar 2008 18:23:17 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m24INGF0020544 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 5 Mar 2008 05:23:16 +1100 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.2/8.14.1) with ESMTP id m24INFbm063705; Wed, 5 Mar 2008 05:23:16 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.2/8.14.2/Submit) id m24INFGJ063704; Wed, 5 Mar 2008 05:23:15 +1100 (EST) (envelope-from peter) Date: Wed, 5 Mar 2008 05:23:15 +1100 From: Peter Jeremy To: Jeremy Chadwick Message-ID: <20080304182315.GF90593@server.vk2pj.dyndns.org> References: <3aaaa3a0803040405l74135ea9va2ebfbe6ee0b5fc1@mail.gmail.com> <20080304131802.GA89947@eos.sc1.parodius.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HnQK338I3UIa/qiP" Content-Disposition: inline In-Reply-To: <20080304131802.GA89947@eos.sc1.parodius.com> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.17 (2007-11-01) Cc: Chris , FreeBSD Stable Subject: Re: linked ssl libraries to binary X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 18:23:18 -0000 --HnQK338I3UIa/qiP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 04, 2008 at 05:18:02AM -0800, Jeremy Chadwick wrote: >On Tue, Mar 04, 2008 at 12:05:22PM +0000, Chris wrote: >This doesn't come as much of a surprise. The binary actually references >libraries by names such as libXXX.so, not libXXX.so.NUMBER. This is incorrect. The binaries directly reference libXXX.so.NUMBER as reported using the first column of ldd output. >> ldd on same binary on freebsd 7 >>=20 >> libssl.so.5 =3D> /usr/lib/libssl.so.5 (0x28101000) >> libcrypto.so.5 =3D> /lib/libcrypto.so.5 (0x28142000) >> libcrypt.so.3 =3D> /usr/local/lib/compat/libcrypt.so.3 (0x2829a0= 00) >> libboost_iostreams.so =3D> /usr/local/lib/libboost_iostreams.so = (0x282b2000) >> libstdc++.so.5 =3D> /usr/local/lib/compat/libstdc++.so.5 (0x282b= d000) >> libm.so.4 =3D> /usr/local/lib/compat/libm.so.4 (0x28388000) >> libpthread.so.2 =3D> /usr/local/lib/compat/libpthread.so.2 (0x28= 39e000) >> libc.so.6 =3D> /usr/local/lib/compat/libc.so.6 (0x283c3000) >> libc.so.7 =3D> /lib/libc.so.7 (0x284a9000) >> libbz2.so.3 =3D> /usr/lib/libbz2.so.3 (0x285a4000) >> libz.so.4 =3D> /lib/libz.so.4 (0x285b4000) >> libstdc++.so.6 =3D> /usr/lib/libstdc++.so.6 (0x285c6000) >> libm.so.5 =3D> /lib/libm.so.5 (0x286ba000) >> libgcc_s.so.1 =3D> /lib/libgcc_s.so.1 (0x286cf000) >> libthr.so.3 =3D> /lib/libthr.so.3 (0x286da000) Based on the above, the binary has direct references to (eg) libssl.so.5 (which is found in the base system on 7.x and therefore has embedded references to libc.so.7) and libcrypt.so.3 (which is a 6.x library and therefore has embedded references to libc.so.6). >two linked in-versions of libc, libm, libstdc++, and others. It's >possible this is "normal", but it seems like it would cause a crash. This is very much abnormal and having an executable pull in two versions of a system library virtually guarantees that it won't work. >I indirectly answered this in my 2nd paragraph. Welcome to the UNIX >equivalent of "DLL Hell" on Windows -- and why you should *always* >recompile programs when the major version of a shared library (.so) >changes. I cannot stress this enough. Agreed. --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --HnQK338I3UIa/qiP Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHzZOT/opHv/APuIcRAlI2AKC9rHY2q9Ljr5KBhTzrGyTApNwt6QCfce5c 2dcp3bNRWWQRwCA1FQCghR0= =9C1a -----END PGP SIGNATURE----- --HnQK338I3UIa/qiP--