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

devcontainer with denoland/deno:alpine not working #373

Open
cirolosapio opened this issue Jun 11, 2024 · 8 comments
Open

devcontainer with denoland/deno:alpine not working #373

cirolosapio opened this issue Jun 11, 2024 · 8 comments

Comments

@cirolosapio
Copy link

using denoland/deno:alpine as a base image to run a devcontainer run in this error:

Error relocating /usr/local/lib/libgcc_s.so.1: _dl_find_object: symbol not found
Error relocating /usr/local/lib/libgcc_s.so.1: __cpu_indicator_init: symbol not found
Error relocating /usr/local/lib/libgcc_s.so.1: __cpu_model: symbol not found
@lucacasonato
Copy link
Member

Probably vscode depends on glibc, and thus can not run on alpine. I don't think these errors come from Deno.

@cirolosapio
Copy link
Author

cirolosapio commented Jun 13, 2024

no vscode does not require gclib afaik
if you use alpine image instead it works

using this reproduction check compose.yml and try switching image from alpine and denoland/deno:alpine

@littledivy littledivy reopened this Jun 13, 2024
@lucacasonato lucacasonato transferred this issue from denoland/deno Jun 17, 2024
@vaaski
Copy link

vaaski commented Oct 18, 2024

i just ran into a similar issue on denoland/deno:alpine trying to use ffmpeg.

❯ docker run --rm -it denoland/deno:alpine sh

/ # apk add ffmpeg

[...]

/ # ffmpeg
Error relocating /usr/local/lib/libgcc_s.so.1: _dl_find_object: symbol not found

works fine on the regular alpine image

@jd1378
Copy link

jd1378 commented Oct 29, 2024

I'm also getting similar errors due to switching to denoland/deno:alpine-2.0.3 from alpine:3.20.3, when using php:

PHP Warning:  PHP Startup: Unable to load dynamic library 'imagick' (tried: /usr/lib/php83/modules/imagick (Error loading shared library /usr/lib/php83/modules/imagick: No such file or directory), /usr/lib/php83/modules/imagick.so (Error relocating /usr/local/lib/libgcc_s.so.1: __cpu_indicator_init: symbol not found)) in Unknown on line 0

this is a serious issue

@jd1378
Copy link

jd1378 commented Oct 29, 2024

#350 is probably related

@Meldiron
Copy link

Meldiron commented Nov 6, 2024

Also facing this issue.

RUN apk update && apk add --no-cache npm
RUN npm install pnpm yarn -g
 > [11/18] RUN npm install pnpm yarn -g:
0.408 Error relocating /usr/local/lib/libgcc_s.so.1: _dl_find_object: symbol not found
0.408 Error relocating /usr/local/lib/libgcc_s.so.1: __cpu_indicator_init: symbol not found
0.408 Error relocating /usr/local/lib/libgcc_s.so.1: __cpu_model: symbol not found
------
Dockerfile:27
--------------------
  25 |     ENV DENO_DIR=/usr/builds/deno-cache
  26 |     RUN apk update && apk add --no-cache npm
  27 | >>> RUN npm install pnpm yarn -g
  28 |     # DOCKERFILE-X:END file="./deno" includedBy="dockerfile_1730902581" includeType="include"
  29 |     # DOCKERFILE-X:START file="./base-after" includedBy="dockerfile_1730902581" includeType="include"
--------------------
ERROR: failed to solve: process "/bin/sh -c npm install pnpm yarn -g" did not complete successfully: exit code: 127

@bartlomieju
Copy link
Member

@Meldiron which version of the dockerfile are you using?

@Tate-CC
Copy link

Tate-CC commented Dec 12, 2024

I'm hitting this issue too when trying to run lftp on the denoland/deno:alpine-2.1.3 image.

I was able to work around it by updating the LD_LIBRARY_PATH environment variable. It looks like the base deno alpine Docker image has LD_LIBRARY_PATH=/usr/local/lib which points to the libgcc_s.so.1 that is causing issues. On a plain alpine:3 Docker image it looks like lftp is linked to /usr/lib/libgcc_s.so.1 instead.

So by setting LD_LIBRARY_PATH=/usr/lib when running lftp I was able to run it in the Deno image without issue.

Interestingly, after updating the LD_LIBRARY_PATH deno also seemed to run fine, and when looking at the deno binary with ldd it looks like it's also failing to find some symbols in /usr/local/lib/libgcc_s.so.1 🤔

This is a bit above my pay grade so I'm not exactly sure of the repercussions, but could this potentially be resolved by not providing a custom libgcc in the base Dockerfile and instead using the one from /usr/lib (which I assume is being installed from apk)

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

8 participants