mir-algorithm
mir-algorithm copied to clipboard
Compilation fails on Linux aarch64 with hardfloat
Building mir-algorithm on aarch64 yields these errors currently
Performing "$DFLAGS" build using ldc2 for aarch64, arm_hardfloat.
bindbc-loader 1.0.1: building configuration "noBC"...
bindbc-opengl 1.0.2: building configuration "dynamic"...
bindbc-sdl 1.1.3: building configuration "dynamic"...
bindbc-imgui 0.7.0+build.16.g502f1a8: building configuration "static_dynamicCRT"...
mir-core 1.1.109: building configuration "library"...
mir-algorithm 3.14.10: building configuration "default"...
deps/mir-algorithm/source/mir/bignum/internal/dec2float.d(126,21): Error: shift by -49 is outside the range `0..63`
deps/mir-algorithm/source/mir/bignum/internal/dec2float.d(89,39): Error: template instance `mir.bignum.internal.dec2float.decimalToFloatImpl!real` error instantiating
ldc2 failed with exit code 1.
This problem was found by @grillo-delmal while working on getting Inochi Creator working on aarch64 Linux.
That is because quadruple floating point numbers. I have fixed the bug in the master branch. However, there is likely a few other similar bugs because the code has never been tested with IEEE quadruple floating point numbers.
tested with 3.14.19, and still having problems
Performing "debug" build using /usr/bin/ldc2 for aarch64, arm_hardfloat.
bindbc-loader 1.0.1: building configuration "noBC"...
bindbc-opengl 1.0.2: building configuration "dynamic"...
bindbc-sdl 1.1.3: building configuration "dynamic"...
bindbc-imgui 0.7.0+build.20.g237a209: building configuration "dynamic_dynamicCRT"...
mir-core 1.1.111: building configuration "library"...
mir-algorithm 3.14.19: building configuration "default"...
/root/.dub/packages/mir-algorithm-3.14.19/mir-algorithm/source/mir/bignum/fixed.d(541,9): Error: `assert(shift < 128LU)` failed
/root/.dub/packages/mir-algorithm-3.14.19/mir-algorithm/source/mir/bignum/fixed.d(600,26): called from here: `ret.opOpAssign(rhs)`
/root/.dub/packages/mir-algorithm-3.14.19/mir-algorithm/source/mir/bignum/internal/dec2float.d(126,21): called from here: `UInt(0LU).this(1LU).opBinary(18446744073709551567LU)`
/root/.dub/packages/mir-algorithm-3.14.19/mir-algorithm/source/mir/bignum/internal/dec2float.d(89,39): Error: template instance `mir.bignum.internal.dec2float.decimalToFloatImpl!real` error instantiating
/usr/bin/ldc2 failed with exit code 1.```
Fixed in v3.14.21. The registry will be updated in a few minutes.