Can't build any programs on 32-bit ARM #11497
Labels
kind:bug
A bug in the code. Does not apply to documentation, specs, etc.
kind:regression
Something that used to correctly work but no longer works
platform:arm
topic:stdlib:numeric
Linking any Crystal program (even an empty one) on an arm architecture fails with the following error:
The function
__multi3
is undefined incompiler-rt
on 32-bit ARM.There should be no implicit 128-bit arithmetics in Crystal program, unless you explicitly use those data types. Even the compiler has not yet support for parsing 128-bit integer literals.
#11206 added
__muloti4
etc. which do 128-bit arithmetics and are defined as afun
. So they' always get compiled, even when never called.A quick temporary workaround is this patch, which disables the troublesome functions on arm. They're currently not necessary unless you actually use 128-bit arithmetics.
Of course, this is not a real solution because we want to support 128-bit arithmetics on all platforms. Implementing the compiler-rt functions ourselves is actually a step to enable that for 32-bit architectures. It seems we need to implement __multi3 as well. At least for arm.
This was originally reported in https://forum.crystal-lang.org/t/cant-compile-crystal-1-2-2-on-32-bit-arm-armv7l-device-undefined-reference-to-multi3/4077/7
i386 seems to be unaffected, so apparently
__multi3
is available.The text was updated successfully, but these errors were encountered: