Skip to content

Cannot find -lnuma when building executables on arm64 image #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
msakai opened this issue Jul 28, 2022 · 2 comments · Fixed by #82
Closed

Cannot find -lnuma when building executables on arm64 image #81

msakai opened this issue Jul 28, 2022 · 2 comments · Fixed by #82

Comments

@msakai
Copy link

msakai commented Jul 28, 2022

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
Copy link
Contributor

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
Copy link
Contributor

A new version including the package will be released when docker-library/official-images#12871 is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants