setup-graalvm icon indicating copy to clipboard operation
setup-graalvm copied to clipboard

v1.4.2 causes error undefined reference to `fstat64'

Open Eetami opened this issue 5 months ago • 4 comments

When building a Quarkus native application using musl toolchain from graalvm, builds fail on above error. Builds work fine with v1.4.1.

Eetami avatar Oct 28 '25 07:10 Eetami

Thanks for filing the ticket, @Eetami. We have fixed the error you mentioned some time ago, so either you are using an old version of Mandrel or the bug fix has not been backported. What version of Mandrel are you using? Could you share a link to the failing build?

The problem is that the musl toolchain previously used is old and is affected by CVEs (see https://musl.libc.org). Reverting to this musl toolchain is therefore not a good idea. Alternatively, you could use Oracle GraalVM 25 instead of Mandrel until this is fixed in Mandrel.

@zakkak, this is the corresponding fix: https://github.com/oracle/graal/pull/9073

fniephaus avatar Oct 28 '25 09:10 fniephaus

Hey @fniephaus I can't share a link since it's privately hosted. As far as I'm aware we're not using Mandrel, here's a snippet from the affected workflow file:

      - name: Setup GraalVM
        uses: graalvm/setup-graalvm@v1
        with:
          distribution: 'graalvm'
          java-version: '21'
          native-image-musl: 'true'
          components: 'native-image'
          check-for-updates: 'false'

Eetami avatar Oct 28 '25 09:10 Eetami

Thanks for sharing more info. I just checked and it seems that the backports of https://github.com/oracle/graal/pull/9073 was planned but unfortunately not actually done. I hope we can get this fixed in the new CPU release due on January 20, 2026.

I think the best option would be to upgrade and build with java-version: '25'.

BTW: you can drop components: 'native-image' from your config. It hasn't been needed for a while now.

Hope this helps, Fabio

fniephaus avatar Oct 28 '25 09:10 fniephaus

Thanks for the pointer @fniephaus. FWIW We don't support musl-based builds in Mandrel.

zakkak avatar Oct 29 '25 08:10 zakkak