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