Skip to content
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

Support for musl library on linux-amd64 (Alpine) #642

Open
Raul1718 opened this issue May 7, 2022 · 6 comments
Open

Support for musl library on linux-amd64 (Alpine) #642

Raul1718 opened this issue May 7, 2022 · 6 comments

Comments

@Raul1718
Copy link

Raul1718 commented May 7, 2022

image

@Raul1718 Raul1718 changed the title mvnd cann't run in Apline mvnd cann't run in Apline: qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory May 7, 2022
@gnodet
Copy link
Contributor

gnodet commented May 13, 2022

Do you have a docker image to reproduce the problem ?

@gnodet gnodet changed the title mvnd cann't run in Apline: qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory mvnd cann't run in Alpine: qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory May 13, 2022
@walnut-tom
Copy link

Dockerfile add
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2

@gnodet
Copy link
Contributor

gnodet commented Sep 8, 2022

Dockerfile add
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2

Adding the link to the musl library still leads to an error:

~ # ./mvnd-0.8.0-linux-amd64/bin/mvnd
Error relocating ./mvnd-0.8.0-linux-amd64/bin/mvnd: __strdup: symbol not found
Segmentation fault

This looks similar to SAP-archive/node-rfc#148.
Either mvnd client and the native library have to be compiled and linked with musl, or glibc needs to be installed on the alpine box.

@walnut-tom
Copy link

@gnodet
Copy link
Contributor

gnodet commented Sep 13, 2022

here a graalvm in alpine
https://github.com/renanpalmeira/docker-graalvm-alpine/blob/master/Dockerfile

This looks a bit outdated as GraalVM location has changed (and version is now 22), but it may be used as a basis.
I found the following thread FTR: oracle/graal#1898 (comment) which points to this gist https://gist.github.com/sify21/2eec007e4b05d448c85192fc279232c6

@gnodet gnodet changed the title mvnd cann't run in Alpine: qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory Support for must on linux-amd64 (Alpine) Sep 20, 2022
@gnodet gnodet changed the title Support for must on linux-amd64 (Alpine) Support for musl library on linux-amd64 (Alpine) Sep 20, 2022
@zhaoyuehao
Copy link

Dockerfile add
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2

Adding the link to the musl library still leads to an error:

~ # ./mvnd-0.8.0-linux-amd64/bin/mvnd
Error relocating ./mvnd-0.8.0-linux-amd64/bin/mvnd: __strdup: symbol not found
Segmentation fault

This looks similar to SAP/node-rfc#148. Either mvnd client and the native library have to be compiled and linked with musl, or glibc needs to be installed on the alpine box.

https://wiki.alpinelinux.org/wiki/Running_glibc_programs

apk add gcompat

It work for me

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

No branches or pull requests

4 participants