[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Jan 23 18:49:02 2001 
Subject:Re: How to fix libtermcap requirement?? (was Re: linux-installation) 
From:Hartmann Schaffer 
Volume-ID:1010123.05 

In article <94jro7$kfc$1@soapbox.cs.bham.ac.uk>, 
Aaron Sloman See text for reply address wrote:
>[To reply replace "Aaron.Sloman.XX" with "A.Sloman"]
>
>Peter Buchlovsky <ug64pxb@cs.bham.ac.uk> writes:
>
>> Date: 23 Jan 2001 00:09:39 +0000
>>
>> "Monika Sester" <monika.sester@ifk.uni-hannover.de> writes:
>>
>> > however, the system is missing a library.
>> >     libtermcap.so.2
>> >
>> > any hint where to find it ?
>>
>> I had the same problem on my debian system. It appears poplog was
>> linked against "libtermcap.so.2" instead of "libtermcap.so". The quick
>> fix that I applied was to symlink /usr/lib/libtermcap.so.2 to
>> /usr/lib/libtermcap.so
>
>Peter thanks for responding to Monika.
>
>I have copied this correspondence to the BUGREPORTS file in
>
>    http://www.cs.bham.ac.uk/research/poplog/bugfixes/
>
>I think several people have had this problem and had to fix it the same
>way.
>
>Does anyone know whereabouts in the system the reference to
>libtermcap occurs? If I can find it I can fix it and relink,
>presumably, so that others do not have the problem in future.
>
>I've used "grep libtermcap *" in all the directories I can think
>of without success.
>
>However, in $popsrc/termcap.p I found this:
>
>    exload termcap
>    #_IF DEF OSF1 or DEFV IRIX >= 6.0 or DEF AIX
>	    ['-lcurses']
>    #_ELSEIF DEFV IRIX >= 5.0
>	    ;;; names in the curses library clash with names defined in the
>	    ;;; graphics library libgl; since we don't use those names, linking
>	    ;;; statically will pull in just the names we want and minimise the
>	    ;;; problem
>	    ['-B static -lcurses -B dynamic']
>    #_ELSE
>	    ['-ltermcap']
>    #_ENDIF
>	    lconstant exload_dummy;		;;; anything will do
>    endexload;
>
>There is no mention of Linux in REF external, which explains how
>exload works.
>
>This section of REF external may give someone more familiar with
>unix/linux "ld" a clue:
>
>| ...  Unix Systems with Dynamic Linking
>| --------------------------------------
>| This currently includes  OSF1, AIX,  HP-UX (post version  8.0) and  Unix
>| systems based on System V Release  4 (SVR4), including Sun Solaris  2.X,
>| Silicon Graphics IRIX 5.X and ICL's implementation of SVR4.
>|
>| On these systems, exload uses the system call interface to the operating
>| system dynamic linker to  attach a shared object  to the Poplog  process
>| and make  the functions  and data  defined in  the shared  object/shared
>| library available to Poplog. The input file list determines which shared
>| objects will be  opened and  where they  are to  be found.  The list  is
>| processed by Poplog and may contain a subset of the options supported by
>| ld: namely, shared object  files, library specifications (-l  arguments)
>| and additional library search paths (-L arguments). A word argument (not
>| beginning with "-") is taken to be a shared object file name without  an
>| extension, and either of the  standard extensions '.so' (SVR4, OSF1  and
>| AIX) or  '.sl' (HP-UX)  is added  to it.  String arguments  may  specify
>| library  files  as  appropriate;   both  the  Poplog  external   library
>| '$popexternlib/libpop.olb'. and the  C default library  '-lc' are  added
>| automatically to the end of the list.
>
>Suggestions welcome

(i don't have access to the documentation right now, so i have to do it
in somewhat general terms):  if you look at the description of the ELF
file format:  pretty early in the file they have a table of the shared
libraries the program links to, in all examples i hve seen in a format like
libtermcap.so -> /usr/lin/termcap.so.x.y (where x.y. is the actual library the
program gets linked to).  i am sure it is standard behavior of the linker
to include this symbolic link.  afaik there are some flags in the linker
commandline, probably also some binutil that lets you change that.  it
should be easy to locate when checking the man or info page for gcc or ld
(unfortunately the machine where i have those on is turned off right now)

hs