🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.linux.help
Article #2

Re: libc.so.4 (under linux) and LEDA

#2
From: Thomas Malik
Date: Tue, 15 Aug 1995 15:16
47 lines
3056 bytes
In article <HEALYP.95Aug4114504@deontas.cs.ul.ie>, healyp@ul.ie ( Paddy Healy ) writes:
|> 
|> I'm having problems compiling LEDA-R-3.2.1 under linux with the debugging flag
|> (-g) on.  When I try to link the LEDA libraries to my object file I get an
|> error from gld saying that it needs libc.so.4.
...
|> Recently I saw the tail end of a discussion of this library problem on c.o.l.h
|> but I missed what the recommendations are for fixing this problem.  As you
|> might guess I'm using Slackware 2.3.
|> 

Don't use -g in the linking stage.

|> Can anyone help me as I'd really like to be able to compile the LEDA libraries
|> with debugging turned on.

 Paddy, what you see is the problem, that the flag '-g' (include debugging info)
forces the compiler driver (gcc) to pass the flag '-static' to the linker and
links with libg.a (debugging version of libc.a) instead of the standard C
library. This means, to link anything with '-g' you must have at least libg.a.

 Further, linking static means that you are required to have static versions of
all libraries you link with, note that they are interdependent.  If you would
like to, for example, to statically link your program with your X - Windows
libraries and you have only the libX11.sa & libX11.so.<version> on your system,
but not libX11.a, you simply cannot do this, because (most) shared libraries
require that you also include the shared C library.  This is also the case if you
had a static/debugging libc.a/libg.a on your system.

Conclusion is: simply don't use -g while linking; it's useless anyways, since it
is only good for debugging the C - library (you don't want to do this, do you ?)
since no additional information is stored in the binary - debugging info is
generated in the compilation phase, not in the link phase.

BTW. i am happily using LEDA on my linux box - great package! (besides
configuration stuff ...)

===============================================================================
  					       |
  _/_/_/_/_/_/_/_/_/_/_/      _/       _/_/    |      
          _/                 _/_/    _/ _/     |  Thomas Malik     
         _/                 _/  _/ _/  _/      |  malik@serv-400.dfki.uni-kl.de    
        _/                 _/    _/   _/       |  malik@sun.rhrk.uni-kl.de
       _/                 _/         _/        |  Berliner Str. 5-11
      _/                 _/         _/         |  6750 Kaiserlautern     
     _/                 _/         _/          |  (0631) 79868 
    _/  _/             _/         _/  _/       |       
Technical Details
Message-ID: <40qdo3$pnc@serv-200.dfki.uni-kl.de>
Path: arc1-ca.pugleaf.net!dfki.uni-kl.de!malik
References: <HEALYP.95Aug4114504@deontas.cs.ul.ie>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!dfki.uni-kl.de!malik
From: malik@alvserv-2.dfki.uni-kl.de (Thomas Malik)
Newsgroups: comp.os.linux.help,comp.os.linux,comp.lang.c++.leda
Subject: Re: libc.so.4 (under linux) and LEDA
Date: 15 Aug 1995 15:16:19 GMT
Organization: DFKI Kaiserslautern
Sender: malik@dfki.uni-kl.de (Thomas Malik)
Distribution: world
Message-ID: <40qdo3$pnc@serv-200.dfki.uni-kl.de>
References: <HEALYP.95Aug4114504@deontas.cs.ul.ie>
NNTP-Posting-Host: serv-400.dfki.uni-kl.de