I think I’m kinda closer, but I’m still getting the same .. 1 | require "c/dlfcn" .. error. Suggestions? Here’s more info for where I’m at:
I tried to build the official Crystal Compiler using the notes in Install From sources - The Crystal Programming Language and got some errors. Then, I realized that I might need to update my installed Crystal version. (My asdf crystal was maxing out at 1.1.0.) So I switched to the official Crystal 1.1.1 and tried to compile the official Crystal Compiler. That seems to be compiling. (I’m still waiting for tests to complete.
)
Meanwhile, I re-tried your instructions with my clone of your repo. Again, I got as far as:
make clean crystal && bin/crystal build --cross-compile --target aarch64-unknown-linux-android24 src/compiler/crystal.cr -Dwithout_playground
I am getting the same .. 1 | require "c/dlfcn" .. error with your repo that I was in my previous post. So, splitting those commands, I get:
-
make clean crystal: no errors -
bin/crystal build --cross-compile --target aarch64-unknown-linux-android24 src/compiler/crystal.cr -Dwithout_playground: This instantly takes me to the..1 | require "c/dlfcn"..error.
I think c.dlfcn is trying to use some code from glibc. I have:
$ sudo apt list *libc-bin
Listing... Done
libc-bin/now 2.31-0ubuntu9.3 amd64 [installed,local]
libc-bin/focal-updates 2.31-0ubuntu9.2 i386
I even wrapped it in a minimal dockerized alpine container using crystallang/crystal:nightly-alpine-build, but got the same error.
I do see require "c/dlfcn" in the official Crystal Compiler at crystal/libunwind.cr at edef02bb102f969773337e248c4057c96daf4d9a · crystal-lang/crystal · GitHub .
(Also, The official Crystal Compiler finished building and all testes passed. I haven’t actually gotten the official Crystal Compiler to build and run tests locally, so I’m happy for that much progress.
)