graalvm / setup-graalvm

GitHub Action for setting up GraalVM distributions.
https://www.graalvm.org
Universal Permissive License v1.0
192 stars 27 forks source link

`GLIBC_2.27' not found-error after update to node20 #80

Closed johannes-link closed 7 months ago

johannes-link commented 7 months ago

Describe the issue

I get an error using the setup-graalvm-GHA after your update to node20 last week. I use the GraalVM-GitHub-Action on a self-hosted runner on Amazon Linux 2023. When I run the GitHub-Action I get the following error:

Run graalvm/setup-graalvm@v1
/home/ec2-user/actions-runner/externals/node20/bin/node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /home/ec2-user/actions-runner/externals/node20/bin/node)
/home/ec2-user/actions-runner/externals/node20/bin/node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /home/ec2-user/actions-runner/externals/node20/bin/node)

Steps to reproduce the issue

You can reproduce the error with this workflow:

  graalvm:
    runs-on: [ self-hosted ]
    steps:
      - name: 'GraalVM: Setup'
        uses: graalvm/setup-graalvm@v1
        with:
          java-version: 21
      - name: Set up Maven
        uses: stCarolas/setup-maven@v4.5
        with:
          maven-version: 3.9.5
      - name: 'Maven verify'
        run: |
          mvn verify

I also tried to use an own container:

    graalvm:
    runs-on: [ self-hosted, zke ]
    container:
      image: node:20.11.0-alpine3.19
      options: --user root
    steps:
      - name: 'GraalVM: Setup'
        uses: graalvm/setup-graalvm@v1
        with:
          java-version: 21
      - name: Set up Maven
        uses: stCarolas/setup-maven@v4.5
        with:
          maven-version: 3.9.5
      - name: 'Maven verify'
        run: |
          mvn verify

In this case I get this error:

/__w/_tool/maven/3.9.5/x64/bin/mvn: exec: line 195: /__w/_tool/graalvm-jdk-21_linux-x64_bin/21.0.0/x64/graalvm-jdk-21.0.2+13.1/bin/java: not found

Workaround

I can´t update the node-version on my Amazon Linux-machine. So i downgraded to @v1.1.5.1 manually:

    steps:
      - name: 'GraalVM: Setup'
        uses: graalvm/setup-graalvm@v1.1.5.1
        with:
          java-version: 21
fniephaus commented 7 months ago

Hi @johannes-link, thanks for raising this. GitHub Actions is transitioning to Node 20, so I'm afraid there is no way to avoid that. The error indicates a problem with your libc, which is quite surprising to me given you are using Amazon Linux from 2023. A quick Google search brought up this thread, which seems related: https://stackoverflow.com/questions/72022527/glibc-2-27-not-found-while-installing-node-on-amazon-ec2-instance

Alternatively, you could also lock the setup-graalvm version in your workflow (use setup-graalvm@v1.1.5.1 instead of setup-graalvm@v1 for example). While this would bring back Node 16, I would still consider it a temporary workaround as you will no longer receive updates from neither us or GitHub.

I hope you don't mind if I'm closing this for now as there isn't really anything we can do.

johannes-link commented 7 months ago

Hi @fniephaus, thanks for your quick reply. I used the same solution as you suggested in your comment and updated my report. Maybe it helps someone with the same issue. Have a nice week :)