lukka / run-cmake

GitHub Action to build C++ applications with CMake (CMakePresets.json), Ninja and vcpkg on GitHub.
MIT License
171 stars 19 forks source link

run-cmake@10.7 fails to run on ubuntu-20.04 runners #128

Closed scareything closed 7 months ago

scareything commented 7 months ago

ubuntu 20 doesn't have the glibc version that node 20 was linked against. the actions immediately fails with an error like this:

/__e/node20/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /__e/node20/bin/node)

I realize that a seemingly obvious solution would be to upgrade the runner to something newer, but we intentionally build on older runners so the resulting binaries have broader binary compatibility.

lukka commented 7 months ago

@scareything you should be able to setup your runner and your build process to build as you need, for example use musl runtime instead of glibc, regardless of the node version the sction relies on. No change on run-cmake could help you on producing the needed binaries, that is what the build process needs to satisfy. Please try the musl route to build binaries that are almost universal on most Linux systems.

scareything commented 7 months ago

Hey @lukka, thanks for the quick response. I think the issue is that the run-cmake action runs as a JavaScript action using "node20", and all of that action metadata is handled by GitHub.

So I'd expect that nobody can use node 20 on a gh-provided runner that uses ubuntu 20, and the issue is actually there. Either way, the glib dependency is beyond the scope of this project.

Thanks again for your quick response, and also for your high quality actions!

lukka commented 7 months ago

@scareything to run workflows on Ubuntu 20.04 a current solution is to use run-cmake@v10..6 which relies on node v16. Another potential solution (I haven't tried though) is to install node v20 using setup-node, hopefully the installed binaries are not relying on a recent glibc runtime version.

I also think I need to add documentation about which Linux distro versions are supported after the bump to node v20.

scareything commented 7 months ago

Thanks. I did a little more digging and realized (a.k.a. re-learned) that our workflow is actually running in an ubuntu bionic (18.x) container, which explains why the glibc dependency was missing for me. It seems that the ubuntu-20 gh runner is perfectly capable of running node 20.