Cannot find -lnuma when building executables on arm64 image
msakai opened this issue · 2 comments
msakai commented
Building executable on arm64 image fails with cannot find -lnuma error.
% docker run --platform linux/arm64 -it haskell:8.10.7 bash
root@d04edf654535:/# echo "main = return ()" > test.hs
root@d04edf654535:/# ghc test.hs
[1 of 1] Compiling Main ( test.hs, test.o )
Linking test ...
/usr/bin/ld.gold: error: cannot find -lnuma
rts/posix/OSMem.c:370:0: error:
error: undefined reference to 'mbind'
rts/posix/OSMem.c:748:0: error:
error: undefined reference to 'numa_num_configured_nodes'
rts/posix/OSMem.c:758:0: error:
error: undefined reference to 'numa_get_mems_allowed'
rts/posix/OSMem.c:748:0: error:
error: undefined reference to 'numa_num_configured_nodes'
rts/posix/OSMem.c:763:0: error:
error: undefined reference to 'numa_bitmask_free'
rts/posix/OSMem.c:748:0: error:
error: undefined reference to 'numa_num_configured_nodes'
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
This can be fixed by installing libnuma-dev.
I think it would be friendly if libnuma-dev is installed by default.
AlistairB commented
Thanks, good pickup! I think it is reasonable that libnuma-dev should always be installed. It is included in the slim images but not the regular ones. Adding it now.
AlistairB commented
A new version including the package will be released when docker-library/official-images#12871 is merged.