<div dir="ltr"><div><br>Hello Tomas,<br><br>On Wed, Oct 14, 2015 at 6:20 PM, Tomas Hlavaty <<a href="mailto:tom@logand.com">tom@logand.com</a>> wrote:<br>><br>> Hi,<br>><br>> I get an error when compiling on ARM:<br>><br>> gcc -L/nix/store/s2ldc3kwqwmiiags6pjibwdjlwdhbs8w-gmp-5.1.3/lib -o<br>> mkcl_min c/cinit.o c/all_symbols.o mkclmin.a mkclgc.a -lgmp -pthread<br>> -lrt -ldl  -lm<br>> mkclmin.a(ffi.o): In function `mkcl_fficall_prepare':<br>> /tmp/nix-build-mkcl-1.1.9.drv-0/mkcl-86768cc/src/c/ffi.d:729: undefined<br>> reference to `mkcl_fficall_prepare_extra'<br>> mkclmin.a(ffi.o): In function `mk_si_call_cfun':<br>> /tmp/nix-build-mkcl-1.1.9.drv-0/mkcl-86768cc/src/c/ffi.d:788: undefined<br>> reference to `mkcl_fficall_push_arg'<br>> /tmp/nix-build-mkcl-1.1.9.drv-0/mkcl-86768cc/src/c/ffi.d:792: undefined<br>> reference to `mkcl_fficall_execute'<br>> mkclmin.a(ffi.o): In function `mk_si_make_dynamic_callback':<br>> /tmp/nix-build-mkcl-1.1.9.drv-0/mkcl-86768cc/src/c/ffi.d:810: undefined<br>> reference to `mkcl_dynamic_callback_make'<br>> collect2: error: ld returned 1 exit status<br>> Makefile:258: recipe for target 'mkcl_min' failed<br>> make[1]: *** [mkcl_min] Error 1<br>> make[1]: Leaving directory<br>> '/tmp/nix-build-mkcl-1.1.9.drv-0/mkcl-86768cc/src'<br>> Makefile:86: recipe for target 'all' failed<br>> make: *** [all] Error 2<br>> builder for ■/nix/store/jc4fcn4vnmj9zbid9xkr9cg5kfy36yav-mkcl-1.1.9.drv■<br>> failed with exit code 2<br>><br>> Any ideas what could be wrong?  It works with the same build<br>> configuration on x86_64.<br>><br><br></div><div>I sure do. What you hit on here is the exact part of MKCL that happens to<br></div><div>be processor architecture dependent. The code for the functions said to<br></div><div>be missing here above is normally located in a file in directory src/c/arch<br></div><div>and for ARM would probably be named ffi_arm.d. But that file still has to<br></div><div>be written since the port of MKCL on ARM has not been done yet.<br><br></div><div>On my side, I am currently stuck deep in a large rewrite of the CLOS code<br></div><div>of MKCL (with dramatic memory consumption reduction being accomplished)<br></div><div>that is nearly completion and that will be part of 1.2.0. The second<br></div><div>consideration related to what you point is that the entire FFI interface<br></div><div>of MKCL is currently being redone for 1.2.0 and the functions mentioned<br></div><div>here above are at various levels of redesign.<br><br></div><div>That being said, the nearly tragic part of this is that the code you hit on is<br></div><div>useful only to provide FFI support to interpreted code, compiled-to-C code<br></div><div>does not use it. That part could in fact be stubbed out without much of a loss.<br><br></div><div>On the other hand, if your ARM assembler skills and ARM ABI knowledge<br></div><div>is up to it you could give a try at writing that ffi_arm.d file, at least as a first<br></div><div>draft.<br><br></div><div>BTW, I should push out the door a MKCL 1.1.10 any time now as a bug<br></div><div>fix consolidation release. And be aware that the real action is on the 1.2.0 side.<br><br></div><div>Regards,<br><br></div><div>Jean-Claude<br><br></div></div>