precisions on the linking problem

The Anarcat <[email protected]> Tue, 19 Nov 2002 21:30:31 -0500
Newsgroups gmane.os.freebsd.devel.libh
Message-ID <[email protected]>
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.So Feature.cd.So PackageFile.So PackageFile.cd.So Database.So Database.cd.So Package.So Package.cd.So PackageStreamSubpackage.cd.So PackageStreamFile.So PackageStreamFile.cd.So PackageStreamStructure.cd.So PackageStreamStructure.So PackageCreator.So PackageCreator.cd.So PackageStream.So PackageStream.cd.So Callback.So Callback.cd.So FeaturesProvided.So FeaturesProvided.cd.So Exec.cd.So History.cd.So libhsysinstall_init.So /usr/home/anarcat/cvs-work/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.

-- 
From the age of uniformity, from the age of solitude, from the age of
Big Brother, from the age of doublethink - greetings!
signature.asc (application/pgp-signature, 187 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE92vPGttcWHAnWiGcRAkxAAJ4jdhxiHCrdOoyliV0nbDO7eEBfEACfdINA
UVp5xEFUS5hSzP8Cw2dI15g=
=PT2m
-----END PGP SIGNATURE-----