gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gcl-devel] Foreign C with pipe(2) and dup(2)


From: Camm Maguire
Subject: Re: [Gcl-devel] Foreign C with pipe(2) and dup(2)
Date: 04 Nov 2003 20:11:19 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings!  There may be a way we could improve this, but as it stands
at present, GCl build a bfd symbol table for purposes of object file
relocation that only contains symbols referred to at compile time.
This is similar to the old situation with the EXTRAS makefile
variable, but somewhat improved, IMHO, as one does not any longer need
the gcl source tree to link in new symbols.  It still could be more
user friendly, but what I'd do is make a little c file with one dummy
function calling pipe, dup, and fork.  Compile this file into foo.o
with gcc -c, and then from GCL make a custom image like this:

(compiler::link nil "new_image_name" "" "foo.o")

Please let me know if your difficulties persist.

Take care,

Todd Kelley <address@hidden> writes:

> Hello GCL Developers!
> 
> I have a "callc.lsp" file that uses defentry to define some lisp
> functions in terms of C code that involves calls to pipe(2), dup(2),
> and fork(2).  The last time I tried it out was with AKCL-1-625 on
> Solaris for Intel, and I remember in order to get "callc.o" to load, I
> needed to recompile ackl with dup.o and pipe.o (ar x libc.a pipe.o,
> etc) linked in.  I'm having no luck trying something similar with
> GCL-2.5.3.
> 
> NOW I'M ON Redhat 8.0, with GCL, and it seems much is different from
> the AKCL/Solaris86 days.  I've tried defining EXTRAS= in various ways
> prescribed by various snippets of documentation I've found in various
> places.  I've tried (load "pipe.o") which gives an unresolved
> __syscall_error.  I've tried linking pipe.o and dup.o into saved_kcl
> and get unresolved __syscall_error errors.  I've tried a few other
> things in attepts to get those symbols into the mix, with no joy.
> (compile "callc.lsp") is fine, but (load "callc.lsp") always gives
> 
>  >(load "callc.o")
> 
> Loading callc.o
> pipe is undefined
> 
> Error: Cannot get relocated section contents
> 
> Fast links are on: do (si::use-fast-links nil) for debugging
> Error signalled by EVAL.
> Broken at LOAD.  Type :H for Help.
>  >>
> 
> Can anyone tell me if this is possible with GCL on Linux, and if so,
> how I should go about loading a lisp file with clines that call
> pipe(2), dup(2), and fork(2)?  I know I was able to do it with
> AKCL-1-625 on Solaris Intel (probably Solaris 2.4 or 2.5).
> 
> Cheers,
> Todd
> 
> 
> 
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/gcl-devel
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

[Prev in Thread] Current Thread [Next in Thread]