Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Nov 2002 23:02:24 -0500
From:      The Anarcat <anarcat@anarcat.ath.cx>
To:        libh@freebsd.org
Cc:        Alexander Langer <alex@big.endian.de>
Subject:   serious libh linking problems
Message-ID:  <20021113040224.GB9054@lenny.anarcat.ath.cx>

next in thread | raw e-mail | index | archive | help

--kORqDWCi7qDJ0mEj
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi all

I write this to you in an attempt to solve a recurring problem I'm
having with libh that is *really* hindering development, for me.  I'm
currently trying to rewrite our pkg_create sh script in C++ (from a sh
script). I just checked-in the source in libh/bin/pkg_create. You
haven't seen the mail because of DNS problems on rtp1.

Anyways, I'm having problem linking the final program. I've seen
similar problems when trying to switch to rhtvision and link other
programs against libh.

The source file is being properly compiled, g++ can find its headers,
etc, and I can generate the .o file. However, when trying to link, I
get:

g++31  -O -pipe  -I../../include -I/usr/local/include/tcl8.3    -c pkg_crea=
te.cc
g++31  -O -pipe  -I../../include -I/usr/local/include/tcl8.3     -L/usr/loc=
al/lib -L/usr/lib -o pkg_create pkg_create.o -ltcl83 -lh -lhtcl -lhdatabase=
 -lhfile -lhsysinstall
/usr/lib/libhsysinstall.so: undefined reference to `LanguageInterface::Lang=
uageInterface(bool)'
/usr/lib/libhsysinstall.so: undefined reference to `LanguageInterface::Obje=
ct type_info node'
/usr/lib/libhsysinstall.so: undefined reference to `LanguageInterface::lang=
uageUnref(LanguageInterface::Object const &) const'
/usr/lib/libhsysinstall.so: undefined reference to `LanguageInterface type_=
info function'
/usr/lib/libhsysinstall.so: undefined reference to `LanguageInterface::refe=
renced(LanguageInterface::Object const *) const'
/usr/lib/libhsysinstall.so: undefined reference to `LanguageInterface::lang=
uageRef(LanguageInterface::Object const &) const'
/usr/lib/libhsysinstall.so: undefined reference to `LanguageInterface::refe=
renced(LanguageInterface::Object const &) const'
/usr/lib/libhsysinstall.so: undefined reference to `LanguageInterface::Obje=
ct type_info function'
/usr/lib/libhsysinstall.so: undefined reference to `LanguageInterface::gc(v=
oid) const'
/usr/lib/libhsysinstall.so: undefined reference to `LanguageInterface::refe=
rencedObjects(void)'
/usr/lib/libhsysinstall.so: undefined reference to `LanguageInterface::refe=
renceObject(LanguageInterface::Object const *) const'
/usr/lib/libhsysinstall.so: undefined reference to `Shared::onHeap(void con=
st *)'
/usr/lib/libhsysinstall.so: undefined reference to `LanguageInterface::dere=
ferenceObject(LanguageInterface::Object const *) const'
/usr/lib/libhsysinstall.so: undefined reference to `LanguageInterface::obje=
ct2string(LanguageInterface::Object const *)'
/usr/lib/libhsysinstall.so: undefined reference to `Shared::isOnHeap(Shared=
 const *)'
/usr/lib/libhsysinstall.so: undefined reference to `LanguageInterface::~Lan=
guageInterface(void)'
/usr/lib/libhsysinstall.so: undefined reference to `LanguageInterface::lang=
uageRef(LanguageInterface::Object const *) const'
/usr/lib/libhsysinstall.so: undefined reference to `LanguageInterface::lang=
uageUnref(LanguageInterface::Object const *) const'
/usr/lib/libhsysinstall.so: undefined reference to `LanguageInterface type_=
info node'
collect2: ld returned 1 exit status
*** Error code 1

Stop in /usr/home/anarcat/cvs-work/libh/bin/pkg_create.

I have just installed that library (libhsysinstall). What I don't
understand is that I can't find that damn symbol anywhere:

anarcat@lenny[~/libh/compile/none]% for f in libh*      =20
do; nm -C $f 2>/dev/null | grep LanguageInterface::Language  && echo "$f"
done
         U LanguageInterface::LanguageInterface(bool)
libhsysinstall.a
         U LanguageInterface::LanguageInterface(bool)
libhsysinstall.so
         U LanguageInterface::LanguageInterface(bool)
libhsysinstall.so.0
00000000 W LanguageInterface::LanguageInterface(bool)
libhtcl.a
000519da W LanguageInterface::LanguageInterface(bool)
libhtcl.so
000519da W LanguageInterface::LanguageInterface(bool)
libhtcl.so.0
00000000 W LanguageInterface::LanguageInterface(bool)
libhtcldisk.a
00043798 W LanguageInterface::LanguageInterface(bool)
libhtcldisk.so
00043798 W LanguageInterface::LanguageInterface(bool)
libhtcldisk.so.0
00000000 W LanguageInterface::LanguageInterface(bool)
libhtclfile.a
00049a12 W LanguageInterface::LanguageInterface(bool)
libhtclfile.so
00049a12 W LanguageInterface::LanguageInterface(bool)
libhtclfile.so.0
00000000 W LanguageInterface::LanguageInterface(bool)
libhtclhui.a
0007969e W LanguageInterface::LanguageInterface(bool)
libhtclhui.so
0007969e W LanguageInterface::LanguageInterface(bool)
libhtclhui.so.0
00000000 W LanguageInterface::LanguageInterface(bool)
libhtclsysinstall.a
000a4e32 W LanguageInterface::LanguageInterface(bool)
libhtclsysinstall.so
000a4e32 W LanguageInterface::LanguageInterface(bool)
libhtclsysinstall.so.0

Some symbols are defined, however. For example, Shared::onHeap() is
defined in libh.so:

0003a746 T Shared::onHeap(void const*)
libh.so

The thing itself is kinda very important to libh. It is defined in
libh/include/LanguageInterface.hh:

class LanguageInterface
{
     friend class H;
     friend class HObjectsReferences;

  public:
     LanguageInterface( bool enableGC ) : mGC( enableGC ) {}
=2E..
}

Why it's not linking anywhere is beyond me.

Also, why tclh is linking at all is also a great mystery for me.

Please, any hint will help greatly. I'm completly confused and pretty
desperate to solve this problem.

If I can't get this program to link I don't see very well where we
should be going next. Is it really impossible/forbidden to link
against LibH?

A.

--=20
Advertisers, not governments, are the primary censors of media content=20
in the United States today.
                        - C. Edwin Baker
                        http://www.ad-mad.co.uk/quotes/freespeech.htm

--kORqDWCi7qDJ0mEj
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE90c7PttcWHAnWiGcRAvlmAJ9JlTHcZQagRUbTQqLdWyqBQwuoIgCfUSMu
Uc5b8rkUfG4cvNYBglhmb+k=
=XSmT
-----END PGP SIGNATURE-----

--kORqDWCi7qDJ0mEj--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-libh" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021113040224.GB9054>