[Ecls-list] Compile Flags

Mark McCurry mark.d.mccurry at gmail.com
Sun Jul 24 21:00:39 UTC 2011


Hello,

After testing 11.1.1 and the listed git mirror I have not been able to
compile lisp code while preserving the headers and C files.
When attempting to compile a simple hello-world file ecl appears to
fail at gather the arguments.
Based upon the documentation, I assumed that using the "-h" and "-c"
flags would generate the code such that an external C program could
compile and link to the generated code.
While the "-c" flag works, the "-h" flag fails to parse.
It also appears that the "-eval" flag fails to execute properly.
All of these definitions appear to be fine in
+default-command-arg-rules+ in cmdline.lsp .
My system is i486-slackware-linux with gcc version 4.4.4.
Both "hello-world.lisp" and a log of the command executions should be attached.

In case I have misinterpreted the documentation:
I have an existing C program that I want to call into lisp code.
I want the C program to generate out a tree via cons cells and pass it
into a lisp system for interpretation/evaluation.
The semantics of this evaluation would ideally be defined in an
external lisp file that could be built/linked to this program at
compile time.

Thanks,
--Mark McCurry
-------------- next part --------------
$ ecl -compile hello-world.lisp
;;; Loading #P"/usr/local/lib/ecl-11.1.1/cmp.fas"
;;;
;;; Compiling hello-world.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Compiling (DEFUN HELLO-WORLD ...).
;;; End of Pass 1.
;;; Emitting code for HELLO-WORLD.
;;; Note:
;;;   Invoking external command:
;;;   gcc -I. -I/usr/local/include/ -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fPIC -Dlinux -O2 -w -c hello-world.c -o hello-world.o 
;;; Note:
;;;   Invoking external command:
;;;   gcc -o hello-world.fas -L/usr/local/lib/ /home/mark/code/ecl/hello-world.o -Wl,--rpath,/usr/local/lib/ -shared -lecl -lgmp -lgc -ldl -lm 
;;; Finished compiling hello-world.lisp.
;;;
$ ecl -c out.c -h out.h -compile hello-world.lisp
Unknown command line option out.h.

Usage: ecl [-? | --help]
           [-dir dir] [-load file] [-shell file] [-eval expr] [-rc | -norc] [-hp | -nohp]
           [--c-stack size] [--lisp-stack size] [--heap-size size] [--frame-stack size]
           [[-o ofile] [-c [cfile]] [-h [hfile]] [-data [datafile]] [-s] [-q]
            -compile file]
           [[-o ofile] -link file+]
           [--input-encoding external-format] [--output-encoding external-format]
           [--error-encoding external-format] [--encoding external-format]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hello-world.lisp
Type: application/octet-stream
Size: 50 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20110724/5d99b2bb/attachment.obj>


More information about the ecl-devel mailing list