[Ecls-list] Problem compiling CVS 4/18/2004
Larry Clapp
larry at theclapp.org
Sun Apr 18 11:02:04 UTC 2004
I checked out CVS this afternoon. I configure --with-cxx, so the
compile uses g++. I got a couple errors compiling lsp/ffi.lsp:
> ;;; Invoking external command: g++ -g -O2 -fomit-frame-pointer
> -mcpu=athlon -march=athlon -fPIC -fstrict-aliasing -Dlinux
> -I/usr/src/ecls/src/h -I/usr/src/ecls/src/gmp
> -I/usr/src/ecls/build/h -O -I/usr/src/ecls/build/h -w -c
> /usr/src/ecls/build/lsp/ffi.c -o /usr/src/ecls/build/lsp/ffi.o
> /usr/src/ecls/build/lsp/ffi.c: In function `cl_lispunion* LC29(int,
> cl_lispunion*)':
> /usr/src/ecls/build/lsp/ffi.c:817: error: `strlen' undeclared (first use this
> function)
> /usr/src/ecls/build/lsp/ffi.c:817: error: (Each undeclared identifier is
> reported only once for each function it appears in.)
> /usr/src/ecls/build/lsp/ffi.c: In function `cl_lispunion* LC30(int,
> cl_lispunion*, ...)':
> /usr/src/ecls/build/lsp/ffi.c:851: error: `memcpy' undeclared (first use this
> function)
> /usr/src/ecls/build/lsp/ffi.c: In function `cl_lispunion* LC31(int,
> cl_lispunion*)':
> /usr/src/ecls/build/lsp/ffi.c:870: error: `memcpy' undeclared (first use this
> function)
I added "#include <string.h>" to h/ecl-cmp.h, which got me a bit
farther:
> /usr/src/ecls/build/lsp/ffi.c: In function `cl_lispunion* LC30(int,
> cl_lispunion*, ...)':
> /usr/src/ecls/build/lsp/ffi.c:851: error: invalid conversion from `void*' to `
> cl_lispunion*'
In lsp/ffi.lsp I changed
@(return) = memcpy(output->string.self, (#0)->foreign.data, length);
in convert-from-foreign-string to
memcpy(output->string.self, (#0)->foreign.data, length);
@(return) = output;
which made my compiler error go away, and ecl linked. However, I
can't find anything that uses convert-from-foreign-string anywhere, so
I'm not sure my patch actually does what client code would expect.
Juanjo, any thoughts?
-- Larry
More information about the ecl-devel
mailing list