scsh-users
[Top] [All Lists]

Re: problems with static linker

To: Eric Marsden <emarsden@mail.dotcom.fr>
Subject: Re: problems with static linker
From: Bruno.Verlyck@inria.fr
Date: Thu, 18 May 2000 12:39:46 +0200 (MET DST)
Cc: scsh-bugs@zurich.ai.mit.edu
> >>>>> "bv" == Bruno Verlyck <Bruno.Verlyck@inria.fr> writes:
> bv> On Solaris, I get problems while compiling the scripts; for example:
> bv>    Error: unknown #\ name
> bv>        space
> bv>        #{Input-port}
  
> bv> On Linux, static linking fails with some undefined symbols:
> bv>    (gcc -rdynamic -o
> bv>    /afs/inria.fr/common/usr/local/src/scsh-0.5.2/scsh/scsh.vm
> bv>    static-p0.o static-i0.o [...] static-p336.o static-i336.o static.o
> bv>    -L /usr/local/lib/scsh -lscshvm -ldl -lelf -lnsl -lm -lc)
> bv>    static-i51.o(.data+0x5c8): undefined reference to `df_compile_re'
> bv>    static-i51.o(.data+0x764): undefined reference to `df_free_re'

> are you sure the symptoms aren't the other way round? 
(I might misinterpret your question, but..)

It just happens that I compiled scsh on Solaris first, where static linking
scsh.image worked, but the resulting heap image couldn't interpret my
scripts in the byte-compilation phase.

Then I tried to compile scsh on Linux, where I couldn't even static-link
scsh.image.  I described my two problems in chronological order, but to me,
they are unrelated.

> I get similar strange string-related errors on Linux (calls to
> `make-string' of length -1 for example), and link errors for all the
> syscalls on Solaris (though for me on Solaris 2.7 it links fine but fails
> upon execution in unix.c:lookup_external_name).
(Just in case..) I remember I had to use this #! line:
   #!/usr/local/lib/scsh/scsh.vm \
   -o /usr/local/lib/scsh/scsh.vm -- <other options>
   !#
The -o /usr/local/lib/scsh/scsh.vm was mandatory under Solaris only (on
other systems it worked, and a little faster, without it).
 
> The link problem is fixed for me by removing the line in
> scsh/machine/sysdep.h which #undefs HAVE_DLOPEN
My machine/sysdep.h is empty :-(.

> Then I reach similar string errors to on Linux: no idea where these come
> from.
So I'm not alone.

The manual says:
 `In spite of .. we are providing the static linker .. so that people may
 get some experience with it.'
Then my experience is that it worked better in scsh 5.0.1.

Any reaction from the scsh maintainers ? (even to say I'll have to wait :-)

Bruno.

<Prev in Thread] Current Thread [Next in Thread>