[Ecls-list] problems with c:build-program

Erik Winkels aerique at xs4all.nl
Fri Apr 23 06:27:05 UTC 2004


Juan Jose Garcia Ripoll <worm at arrakis.es> wrote:
>
> jlr at here> echo '(defun foo1 () t)' > foo.lisp
> jlr at here> echo '(defun foo2 () t)' > bar.lisp
> jlr at here> echo '(defun foo3 () t)' > baz.lisp

Fun, if I try this with the filenames foo1.lisp, foo2.lisp and
foo3.lisp ECL breaks at C::LINKER-CC (foo, bar, baz does work for me):

   > (c:build-program "myecl" :lisp-files '("foo1" "foo2" "foo3"))
   [...]
   >   extern ECL_CPP_TAG void init_FOOp(cl_object);
   >   extern ECL_CPP_TAG void init_FOOp(cl_object);
   >   extern ECL_CPP_TAG void init_FOOp(cl_object);
   [...]
   >   subblock = read_VV(OBJNULL, init_FOOp);
   >   subblock = read_VV(OBJNULL, init_FOOp);
   >   subblock = read_VV(OBJNULL, init_FOOp);
   [...]
   ;;; Invoking external command: gcc -o myecl -L/usr/local/lib/ecl/
   myecl.o foo1.o foo2.o foo3.o  -Wl,--rpath,/usr/local/lib/ecl/
   -lecl -lgmp -lgc -ldl -lm
   foo2.o(.text+0x3c): In function `init_FOOp':
   /autofs/srv009bh/home/ekwis/tmp/foo2.c:21: multiple definition of
   `init_FOOp'
   foo1.o(.text+0x3c):/autofs/srv009bh/home/ekwis/tmp/foo1.c:21: first
   defined here
   foo3.o(.text+0x3c): In function `init_FOOp':
   /autofs/srv009bh/home/ekwis/tmp/foo3.c:21: multiple definition of
   `init_FOOp'
   foo1.o(.text+0x3c):/autofs/srv009bh/home/ekwis/tmp/foo1.c:21: first
   defined here
   collect2: ld returned 1 exit status
   (SYSTEM "gcc -o myecl -L/usr/local/lib/ecl/ myecl.o foo1.o foo2.o
   foo3.o  -Wl,--rpath,/usr/local/lib/ecl/  -lecl -lgmp -lgc -ldl
   -lm") returned non-zero value 1
   Broken at C::LINKER-CC.
   >>

      
Erik
  





More information about the ecl-devel mailing list