[Ecls-list] Compiling ls.lsp (cmdline) Example

Parth Malwankar parth.malwankar at gmail.com
Fri Jul 4 11:58:10 UTC 2008


Hello,

I recently started using lisp and looked at multiple lisp
implementations.

I am quite excited about ecl with its features like threading,
ease of use with C etc. Thank you for making avalable such
a wonderful lisp distribution.

I am trying to compile the ls.lsp (cmdline) example that came with
ecl 0.9j but for some reason its failing for me. As I am quite
new to ecl I was wondering if I am doing anything wrong here.

Here is a log of my interaction:

============= interaction ================

[parth:~/src/ecl-0.9j/examples/cmdline]% ecl
;;; Loading #P"/home/parth/install/ecl-0.9j/lib/ecl/asdf.fas"
ECL (Embeddable Common-Lisp) 0.9j
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll
ECL is free software, and you are welcome to redistribute it
under certain conditions; see file 'Copyright' for details.
Type :h for Help.  Top level.
>   (compile-file "ls.lsp" :output-file "ls.o" :system-p t)
;;; Loading #P"/home/parth/install/ecl-0.9j/lib/ecl/cmp.fas"
;;; Loading #P"/home/parth/install/ecl-0.9j/lib/ecl/sysfun.lsp"
;;; Compiling ls.lsp.
;;; Compiling (DEFUN PRINT-DIRECTORY ...).
;;; Note: Replacing variable X by its value #<form VAR 819ECD8>
;;; Compiling (LET (#) ...).
;;; Warning: The ignored variable #:G66 is used.
;;; Note: Removing unused variable C
;;; End of Pass 1.
;;; Emitting code for PRINT-DIRECTORY.
;;; Note: Replacing variable G59 by its value
;;; Note: Replacing variable G61 by its value
;;; Note: Emiting FUNCALL for SI:PROCESS-COMMAND-ARGS
;;; Emitting code for #:G68.
;;; Calling the C compiler...
;;; Note: Invoking external command:
;;; gcc  -D_GNU_SOURCE -g -O2 -fPIC -D_THREAD_SAFE  -fstrict-aliasing
-Dlinux -O "-I/home/parth/install/ecl-0.9j/include/" -w -c
"/home/parth/src/ecl-0.9j/examples/cmdline/ls.c" -o
"/home/parth/src/ecl-0.9j/examples/cmdline/ls.o"

;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3
;;; Finished compiling ls.lsp.
#P"/home/parth/src/ecl-0.9j/examples/cmdline/ls.o"
NIL
NIL
>   (c::build-program "ls" :lisp-files '("ls.o"))
;;; Warning: File #P"ls" is of no known file type. Assuming it is an
object file.
;;; Note: Invoking external command:
;;; gcc  -D_GNU_SOURCE -g -O2 -fPIC -D_THREAD_SAFE  -fstrict-aliasing
-Dlinux -O "-I/home/parth/install/ecl-0.9j/include/" -w -c
"/home/parth/src/ecl-0.9j/examples/cmdline/ECLINITZwwlxH.c" -o
"/home/parth/src/ecl-0.9j/examples/cmdline/ECLINITZwwlxH.o"

;;; Note: Invoking external command:
;;; gcc -o "/home/parth/src/ecl-0.9j/examples/cmdline/ls"
-L"/home/parth/install/ecl-0.9j/lib/"
"/home/parth/src/ecl-0.9j/examples/cmdline/ECLINITZwwlxH.o"
"/home/parth/src/ecl-0.9j/examples/cmdline/ls.o"
-Wl,--rpath,/home/parth/install/ecl-0.9j/lib/   -lecl -lpthread -ldl
-lm   -lgmp

/home/parth/src/ecl-0.9j/examples/cmdline/ls.o: In function `init_LS':
/home/parth/src/ecl-0.9j/examples/cmdline/ls.c:106: multiple
definition of `init_LS'
/home/parth/src/ecl-0.9j/examples/cmdline/ECLINITZwwlxH.o:/home/parth/src/ecl-0.9j/examples/cmdline/ECLINITZwwlxH.c:22:
first defined here
collect2: ld returned 1 exit status
(SYSTEM "gcc -o \"/home/parth/src/ecl-0.9j/examples/cmdline/ls\"
-L\"/home/parth/install/ecl-0.9j/lib/\"
\"/home/parth/src/ecl-0.9j/examples/cmdline/ECLINITZwwlxH.o\"
\"/home/parth/src/ecl-0.9j/examples/cmdline/ls.o\"
-Wl,--rpath,/home/parth/install/ecl-0.9j/lib/   -lecl -lpthread -ldl
-lm   -lgmp") returned non-zero value 1
Broken at EVAL.Available restarts:
1. (CONTINUE) Continues anyway.
Broken at C::LINKER-CC.
>> *features*
(:ASDF :LINUX :IEEE-FLOATING-POINT :RELATIVE-PACKAGE-NAMES :UNICODE
:DFFI :CLOS-STREAMS :CMU-FORMAT :UNIX :DLOPEN :CLOS :THREADS :BOEHM-GC
:ANSI-CL :COMMON-LISP :ECL :COMMON :PENTIUM3 :FFI :PREFIXED-API)
>>

============= End interaction ================

As you can see, I have a local install of ecl 0.9j on a Debian
system. The installation folder being /home/parth/install/ecl-0.9j/.

Any ideas what might be going wrong? I also tried this with
ecl-0.9i (which is the standard install via debian apt) just to
be sure that my local install was ok. I get the same problem.
Log at the end of mail.

Thanks very much.
-- 
Parth Malwankar

=============== interaction with 0.9i =============
[parth:~/src/ecl-0.9j/examples/cmdline]% /usr/bin/ecl
;;; Loading #P"/usr/lib/ecl/cmp.fas"
;;; Loading #P"/usr/lib/ecl/sysfun.lsp"
ECL (Embeddable Common-Lisp) 0.9i
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll
ECL is free software, and you are welcome to redistribute it
under certain conditions; see file 'Copyright' for details.
Type :h for Help.  Top level.
> (compile-file "ls.lsp" :output-file "ls.o" :system-p t)
;;; Compiling ls.lsp.
;;; Compiling (DEFUN PRINT-DIRECTORY ...).
;;; Note: Replacing variable X by its value #<form VAR 831DCD8>
;;; Compiling (LET (#) ...).
;;; Warning: The ignored variable #:G64 is used.
;;; Note: Removing unused variable C
;;; End of Pass 1.
;;; Emitting code for PRINT-DIRECTORY.
;;; Note: Replacing variable G57 by its value
;;; Note: Replacing variable G59 by its value
;;; Note: Emiting FUNCALL for SI:PROCESS-COMMAND-ARGS
;;; Emitting code for #:G66.
;;; Calling the C compiler...
;;; Note: Invoking external command:
;;; /usr/bin/gcc-4.1  -D_GNU_SOURCE -g -O2 -fPIC -D_THREAD_SAFE
-fstrict-aliasing -Dlinux -O "-I/usr/lib/ecl/" -w -c
"/home/parth/src/ecl-0.9j/examples/cmdline/ls.c" -o
"/home/parth/src/ecl-0.9j/examples/cmdline/ls.o"

;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3
;;; Finished compiling ls.lsp.
#P"/home/parth/src/ecl-0.9j/examples/cmdline/ls.o"
NIL
NIL
>   (c::build-program "ls" :lisp-files '("ls.o"))
;;; Warning: File #P"ls" is of no known file type. Assuming it is an
object file.
;;; Note: Invoking external command:
;;; /usr/bin/gcc-4.1  -D_GNU_SOURCE -g -O2 -fPIC -D_THREAD_SAFE
-fstrict-aliasing -Dlinux -O "-I/usr/lib/ecl/" -w -c
"/home/parth/src/ecl-0.9j/examples/cmdline/ECLINIT6HQFHk.c" -o
"/home/parth/src/ecl-0.9j/examples/cmdline/ECLINIT6HQFHk.o"

;;; Note: Invoking external command:
;;; /usr/bin/gcc-4.1 -o "/home/parth/src/ecl-0.9j/examples/cmdline/ls"
-L"/usr/lib/ecl/"
"/home/parth/src/ecl-0.9j/examples/cmdline/ECLINIT6HQFHk.o"
"/home/parth/src/ecl-0.9j/examples/cmdline/ls.o"
-Wl,--rpath,/usr/lib/ecl/   -lecl -lpthread -ldl  -lm   -lgc -lgmp

/home/parth/src/ecl-0.9j/examples/cmdline/ls.o: In function `init_LS':
/home/parth/src/ecl-0.9j/examples/cmdline/ls.c:106: multiple
definition of `init_LS'
/home/parth/src/ecl-0.9j/examples/cmdline/ECLINIT6HQFHk.o:/home/parth/src/ecl-0.9j/examples/cmdline/ECLINIT6HQFHk.c:22:
first defined here
collect2: ld returned 1 exit status
(SYSTEM "/usr/bin/gcc-4.1 -o
\"/home/parth/src/ecl-0.9j/examples/cmdline/ls\" -L\"/usr/lib/ecl/\"
\"/home/parth/src/ecl-0.9j/examples/cmdline/ECLINIT6HQFHk.o\"
\"/home/parth/src/ecl-0.9j/examples/cmdline/ls.o\"
-Wl,--rpath,/usr/lib/ecl/   -lecl -lpthread -ldl  -lm   -lgc -lgmp")
returned non-zero value 1
Broken at EVAL.Available restarts:
1. (CONTINUE) Continues anyway.
Broken at C::LINKER-CC.
>> *features
The variable *FEATURES is unbound.
Broken at C::LINKER-CC.Available restarts:
1. (CONTINUE) Continues anyway.
Broken at EVAL.
>>> *features*
(:CLC-OS-DEBIAN :COMMON-LISP-CONTROLLER :ASDF :LINUX
:IEEE-FLOATING-POINT :RELATIVE-PACKAGE-NAMES :CLOS-STREAMS :CMU-FORMAT
:UNIX :DLOPEN :CLOS :THREADS :BOEHM-GC :ANSI-CL :COMMON-LISP :ECL
:COMMON :I486 :FFI)
>>>
[parth:~/src/ecl-0.9j/examples/cmdline]% ls
CVS/             ECLINIT6HQFHk.o  ECLINITffgKuq.o  ECLINITZwwlxH.o
ECLINIT6HQFHk    ECLINITffgKuq    ECLINITZwwlxH    ls.lsp
ECLINIT6HQFHk.c  ECLINITffgKuq.c  ECLINITZwwlxH.c  ls.o
[parth:~/src/ecl-0.9j/examples/cmdline]%

=============== End interaction with 0.9i =============




More information about the ecl-devel mailing list