From owner-freebsd-libh Tue Nov 12 20: 7:45 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 A83FF37B40F for ; Tue, 12 Nov 2002 20:07:32 -0800 (PST) Received: from jkh-gw.queasyweasel.com (adsl-64-173-3-158.dsl.sntc01.pacbell.net [64.173.3.158]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C4C943E3B for ; Tue, 12 Nov 2002 20:07:31 -0800 (PST) (envelope-from jkh@queasyweasel.com) Received: from queasyweasel.com (jkh@narcissus.freebsd.com [64.173.15.99]) by jkh-gw.queasyweasel.com (8.12.6/8.12.5) with ESMTP id gAD47ELb089577; Tue, 12 Nov 2002 20:07:14 -0800 (PST) (envelope-from jkh@queasyweasel.com) Date: Tue, 12 Nov 2002 20:07:23 -0800 Subject: Re: serious libh linking problems Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v548) Cc: libh@FreeBSD.ORG, Alexander Langer To: The Anarcat From: Jordan K Hubbard In-Reply-To: <20021113040224.GB9054@lenny.anarcat.ath.cx> Message-Id: <69CC05B0-F6BD-11D6-9957-000393BB9222@queasyweasel.com> Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.548) 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 Link order? What happens when you stick -lhsysinstall *earlier* in the link line, say before -lhtcl? On Tuesday, November 12, 2002, at 08:02 PM, The Anarcat wrote: > 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_create.cc > g++31 -O -pipe -I../../include -I/usr/local/include/tcl8.3 > -L/usr/local/lib -L/usr/lib -o pkg_create pkg_create.o -ltcl83 -lh > -lhtcl -lhdatabase -lhfile -lhsysinstall > /usr/lib/libhsysinstall.so: undefined reference to > `LanguageInterface::LanguageInterface(bool)' > /usr/lib/libhsysinstall.so: undefined reference to > `LanguageInterface::Object type_info node' > /usr/lib/libhsysinstall.so: undefined reference to > `LanguageInterface::languageUnref(LanguageInterface::Object const &) > const' > /usr/lib/libhsysinstall.so: undefined reference to `LanguageInterface > type_info function' > /usr/lib/libhsysinstall.so: undefined reference to > `LanguageInterface::referenced(LanguageInterface::Object const *) > const' > /usr/lib/libhsysinstall.so: undefined reference to > `LanguageInterface::languageRef(LanguageInterface::Object const &) > const' > /usr/lib/libhsysinstall.so: undefined reference to > `LanguageInterface::referenced(LanguageInterface::Object const &) > const' > /usr/lib/libhsysinstall.so: undefined reference to > `LanguageInterface::Object type_info function' > /usr/lib/libhsysinstall.so: undefined reference to > `LanguageInterface::gc(void) const' > /usr/lib/libhsysinstall.so: undefined reference to > `LanguageInterface::referencedObjects(void)' > /usr/lib/libhsysinstall.so: undefined reference to > `LanguageInterface::referenceObject(LanguageInterface::Object const *) > const' > /usr/lib/libhsysinstall.so: undefined reference to > `Shared::onHeap(void const *)' > /usr/lib/libhsysinstall.so: undefined reference to > `LanguageInterface::dereferenceObject(LanguageInterface::Object const > *) const' > /usr/lib/libhsysinstall.so: undefined reference to > `LanguageInterface::object2string(LanguageInterface::Object const *)' > /usr/lib/libhsysinstall.so: undefined reference to > `Shared::isOnHeap(Shared const *)' > /usr/lib/libhsysinstall.so: undefined reference to > `LanguageInterface::~LanguageInterface(void)' > /usr/lib/libhsysinstall.so: undefined reference to > `LanguageInterface::languageRef(LanguageInterface::Object const *) > const' > /usr/lib/libhsysinstall.so: undefined reference to > `LanguageInterface::languageUnref(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* > 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 ) {} > ... > } > > 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. > > -- > Advertisers, not governments, are the primary censors of media content > in the United States today. > - C. Edwin Baker > http://www.ad-mad.co.uk/quotes/freespeech.htm > -- Jordan K. Hubbard Engineering Manager, BSD technology group Apple Computer To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message