From owner-freebsd-libh Tue Nov 19 18:30:52 2002 Delivered-To: freebsd-libh@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B09E237B401 for ; Tue, 19 Nov 2002 18:30:49 -0800 (PST) Received: from aeimail.aei.ca (aeimail.aei.ca [206.123.6.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id D993243E6E for ; Tue, 19 Nov 2002 18:30:48 -0800 (PST) (envelope-from anarcat@anarcat.ath.cx) Received: from shall.anarcat.ath.cx (qw1k1dp4sggggyhi@dsl-129-56.aei.ca [66.36.129.56]) by aeimail.aei.ca (8.11.6/8.10.1) with ESMTP id gAK2UbD21084 for ; Tue, 19 Nov 2002 21:30:37 -0500 (EST) Received: from lenny.anarcat.ath.cx (lenny.anarcat.ath.cx [192.168.0.4]) by shall.anarcat.ath.cx (Postfix) with SMTP id 19C01DD for ; Tue, 19 Nov 2002 21:30:31 -0500 (EST) Received: by lenny.anarcat.ath.cx (sSMTP sendmail emulation); Tue, 19 Nov 2002 21:30:31 -0500 Date: Tue, 19 Nov 2002 21:30:31 -0500 From: The Anarcat To: libh@freebsd.org Subject: precisions on the linking problem Message-ID: <20021120023031.GA316@lenny.anarcat.ath.cx> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="opJtzjQTFsWo+cga" Content-Disposition: inline User-Agent: Mutt/1.5.1i Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --opJtzjQTFsWo+cga Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Ok.. I checked out things a bit more cold-headed tonight, and it seems that one missing function isn't defined anywhere (LanguageInterface::LanguageInterface). In contrast, Shared::onHeap() is defined in Pointer.o However, both show up in the link errors. I discovered that the linking command for libhsysinstall is somewhat wrong. Here it is in all its beauty^Whorror: gcc31 -shared -Wl,-x -o libhsysinstall.so.0 -Wl,-soname,libhsysinstall.so= .0 `lorder PackageDescription.cd.So PackageStreamReference.cd.So Feature.S= o Feature.cd.So PackageFile.So PackageFile.cd.So Database.So Database.cd.So= Package.So Package.cd.So PackageStreamSubpackage.cd.So PackageStreamFile.S= o PackageStreamFile.cd.So PackageStreamStructure.cd.So PackageStreamStructu= re.So PackageCreator.So PackageCreator.cd.So PackageStream.So PackageStream= .cd.So Callback.So Callback.cd.So FeaturesProvided.So FeaturesProvided.cd.S= o Exec.cd.So History.cd.So libhsysinstall_init.So /usr/home/anarcat/cvs-wor= k/libh/lib/sysinstall/../../lib/tcl/TclLanguageInterface.So | tsort -q` -L/= usr/local/lib -lstdc++ -lgcc -lm The first thing that is immediatly obvious to me is that Pointer.So is missing in there. I don't know why/how, but it is, and that is one major problem. Putting it back in manually immediatly has the effect of defining Shared::onHeap() properly in libhsysinstall.so.0: 000c77b2 T Shared::onHeap(void const*) 000c76c0 T Shared::isOnHeap(Shared const*) and in libhsysinstall.a: Pointer.o: U _GLOBAL_OFFSET_TABLE_ U _Unwind_Resume 000000f2 T Shared::onHeap(void const*) 00000000 T Shared::isOnHeap(Shared const*) And hurray! It links!!! Now as to why, I'll let you in a little secret. I just redid the experiment *without* modifying the command line, that is: 1- building the libs straight from make(1) 2- cp(1) the files over and it just works. Even though Shared::onHeap() and friends is *not* defined in the library: U Shared::onHeap(void const*) U Shared::isOnHeap(Shared const*) Go figure. It's probably Alex that had it right all along. My setup was borked. So many headaches for nothing. :( I'll just resume my work, thanks for the assistance! A. --=20 =46rom the age of uniformity, from the age of solitude, from the age of Big Brother, from the age of doublethink - greetings! --opJtzjQTFsWo+cga Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE92vPGttcWHAnWiGcRAkxAAJ4jdhxiHCrdOoyliV0nbDO7eEBfEACfdINA UVp5xEFUS5hSzP8Cw2dI15g= =PT2m -----END PGP SIGNATURE----- --opJtzjQTFsWo+cga-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message