[Ecls-list] [BUG] example/cmdline symbol collision

Eric Rannaud eric.rannaud at gmail.com
Mon Dec 31 04:59:32 UTC 2007


With latest HEAD, on Fedora Core 7 x86_64, the example cmdline doesn't
work if one uses the build commands given at the top of ls.lsp.

(c::build-program "ls" :lisp-files '("ls.o"))

fails with:

;;; 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  -fstrict-aliasing -Dlinux -O
"-I/home/e/local//include/" -w -c
"/home/e/dev/ecl/ecl/examples/cmdline/ECLINITq93wQr.c" -o

;;; Note: Invoking external command:
;;; gcc -o "/home/e/dev/ecl/ecl/examples/cmdline/ls"
-Wl,--rpath,/home/e/local//lib/   -lecl -ldl  -lm   -lgmp

/home/e/dev/ecl/ecl/examples/cmdline/ls.o: In function `init_LS':
/home/e/dev/ecl/ecl/examples/cmdline/ls.c:106: multiple definition of
first defined here
/usr/bin/ld: Warning: size of symbol `init_LS' changed from 79 in
/home/e/dev/ecl/ecl/examples/cmdline/ECLINITq93wQr.o to 714 in
collect2: ld returned 1 exit status
(SYSTEM "gcc -o \"/home/e/dev/ecl/ecl/examples/cmdline/ls\"
-Wl,--rpath,/home/e/local//lib/   -lecl -ldl  -lm   -lgmp") returned
non-zero value 1
Broken at EVAL.Available restarts:
1. (CONTINUE) Continues anyway.
Broken at C::LINKER-CC.

Building the program with a different name than "ls" will work (or
renaming the object file).

There is an obvious name collision on the symbol init_LS.

I'm not sure what is the best way to solve the problem. It's easy to
change the example ls.lsp to use a different executable filename. However,
it seems a bit more fundamental: whenever one has object files and
executables with the same name, which seems quite reasonnable, there will
be a problem.

Is it worth doing something about?


More information about the ecl-devel mailing list