[Ecls-list] Objective achieved

Waldek Hebisch hebisch at math.uni.wroc.pl
Sat Feb 16 14:39:04 UTC 2008


Juan Jose Garcia-Ripoll wrote:
> Sorry, I do not have a 64 bit machine and forgot to adapt the FFI
> interface. Go to src/c/arch and type "cvs update" some time later
> (between 15 minutes and half an hour). You can then continue your
> original build by going to ecl/build, typing "make -C c clean; rm -f
> ecl_min; make"
> 

I get now different error:

if test -f ../CROSS-DPP ; then ../CROSS-DPP /var/tmp/hebisch/lisp/ecl-tst2/src/c/arch/ffi_x86_64.d ffi_x86_64.c ; else ./dpp /var/tmp/hebisch/lisp/ecl-tst2/src/c/arch/ffi_x86_64.d ffi_x86_64.c ; fi
dpp: /var/tmp/hebisch/lisp/ecl-tst2/src/c/arch/ffi_x86_64.d -> ffi_x86_64.c
gcc -c -I. -I/var/tmp/hebisch/lisp/ecl-tst2/build -I/var/tmp/hebisch/lisp/ecl-tst2/src/c -I../ecl/gc  -D_GNU_SOURCE -g -O2 -fPIC  -fstrict-aliasing -Dlinux  -o
ffi_x86_64.o ffi_x86_64.c
/var/tmp/hebisch/lisp/ecl-tst2/src/c/arch/ffi_x86_64.d: In function 'ecl_dynamic_callback_execute':
/var/tmp/hebisch/lisp/ecl-tst2/src/c/arch/ffi_x86_64.d:191: error: 'i' undeclared (first use in this function)
/var/tmp/hebisch/lisp/ecl-tst2/src/c/arch/ffi_x86_64.d:191: error: (Each undeclared identifier is reported only once
/var/tmp/hebisch/lisp/ecl-tst2/src/c/arch/ffi_x86_64.d:191: error: for each function it appears in.)
/var/tmp/hebisch/lisp/ecl-tst2/src/c/arch/ffi_x86_64.d:216: warning: assignment
makes pointer from integer without a cast
make[2]: *** [ffi_x86_64.o] Error 1

Looks trivial to fix (see patch below).

Later I get another error:

if [ -f CROSS-COMPILER ]; then \
                touch ecl_min; \
        else \
                gcc  -o ecl_min cinit.o c/all_symbols.o -L./ libeclmin.a -leclgc  -ldl  -lm  -lgmp;\
        fi
libeclmin.a(ffi_x86_64.o): In function `ecl_dynamic_callback_execute':
/var/tmp/hebisch/lisp/ecl-tst2/src/c/arch/ffi_x86_64.d:217: undefined reference
to `cl_apply_from_stack_frame'
/var/tmp/hebisch/lisp/ecl-tst2/src/c/arch/ffi_x86_64.d:218: undefined reference
to `cl_stack_frame_close'
collect2: ld returned 1 exit status
make[1]: *** [ecl_min] Error 1
make[1]: Leaving directory `/var/tmp/hebisch/lisp/ecl-tst2/build'
make: *** [all] Error 2

Looks like a typo ('ecl_apply_from_stack_frame' and 'ecl_stack_frame_close'
are defined).  Correcting this problem gave me succesful build.

The changes:

--- /home/s/test/tt/axiom3/ecl-tst/ecl/src/c/arch/ffi_x86_64.d	2008-02-16 14:04:46.000000000 +0100
+++ src/c/arch/ffi_x86_64.d	2008-02-16 15:15:43.000000000 +0100
@@ -162,6 +162,7 @@
 	cl_index size, i_reg_index, f_reg_index;
 	union ecl_ffi_values output;
 	enum ecl_ffi_tag tag;
+	long i;
 	long i_reg[MAX_INT_REGISTERS];
 	double f_reg[MAX_FP_REGISTERS];
 
@@ -213,8 +214,8 @@
 		ecl_stack_frame_push(frame, result);
 	}
 
-	result = cl_apply_from_stack_frame(frame, fun);
-	cl_stack_frame_close(frame);
+	result = ecl_apply_from_stack_frame(frame, fun);
+	ecl_stack_frame_close(frame);
 
 	tag = ecl_foreign_type_code(rtype);
 	memset(&output, 0, sizeof(output));

-- 
                              Waldek Hebisch
hebisch at math.uni.wroc.pl 




More information about the ecl-devel mailing list