*BSD News Article 16360


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!munnari.oz.au!constellation!osuunx.ucc.okstate.edu!moe.ksu.ksu.edu!crcnis1.unl.edu!wupost!uunet!email!mbirgmei
From: mbirgmei@email.tuwien.ac.at (Martin BIRGMEIER)
Subject: Re: Problem with ar, ranlib, ld ?
Message-ID: <1993May21.104749.23756@email.tuwien.ac.at>
Organization: Technical University of Vienna
References: <C7D80r.64u@cosy.sbg.ac.at>
Date: Fri, 21 May 1993 10:47:49 GMT
Lines: 27

In article <C7D80r.64u@cosy.sbg.ac.at> peter@wiesel (Peter Burgstaller) writes:
[...]
>I encountered the following error compiling multiverse:
>
>ld: bad magic number in ../../lib/libServer.a
>
>My question: how can that be. I just compiled the libServer library
>without ANY warning after that I ran 
>ar cru ../../libServer.a `lorder *.o | tsort`
>tsort: cycle in data
>tsort: clientManager.o.
>tsort: server.o.
>ranlib ../../libServer.a
[...]

To get rid of the magic number problem, install patch # 107 from
patchkit-0.2.3; regarding the cycles that tsort reports, this only
means that object files in the library have mutual dependecies; using
ranlib on such a library will guarantee that this is harmless, i.e.
the loader can still resolve all symbols on a single pass through
the library (in fact, it is sort of unnecessary to call tsort and
lorder on a library to be ranlib'd, except maybe for loading time
reduction).

Cheers,

Martin