Elm-format: GLIBC_2.27' not found in 0.8.4

Created on 25 Sep 2020  路  10Comments  路  Source: avh4/elm-format

We updated the node package from 0.8.3 to 0.8.4
When trying to run elm-format we get:

/usr/src/app/node_modules/elm-format/unpacked_bin/elm-format: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by /usr/src/app/node_modules/elm-format/unpacked_bin/elm-format)
packaging Linux

Most helpful comment

Note for Travis-CI users: adding dist: focal to your .travis.yml appears to give the needed glibc version.

All 10 comments

This is inside a Docker Node image

Ubuntu with Node 12.14 from here https://hub.docker.com/_/node

uname -a
Linux 63c18b4da8af 5.4.0-7642-generic #46~1598628707~20.04~040157c-Ubuntu SMP Fri Aug 28 18:02:16 UTC  x86_64 GNU/Linux

Thanks, there was a report of this on slack too.. Can you tell which version of glibc is available? 2.27 was apparently released in Feb 2018 which seems like it should be old enough to be supported most places. But also I didn't do anything specific to set the glibc version either (and the elm-format linux binaries are built in a docker container, specifically buildpack-deps:buster).

I don't know that much about modern linux, so if anyone has advice here (esp w/r to haskell), let me know!

Hmm, not that this is necessarily a viable solution, but apparently there are buster variants of the node docker images.

node:12.14 fails with the GLIBC_2.27 not found error:

docker run -it node:12.14 /bin/sh -c "npm i elm-format && node_modules/.bin/elm-format --help"

node:12.14-buster works:

docker run -it node:12.14-buster /bin/sh -c "npm i elm-format && node_modules/.bin/elm-format --help"

The Ubuntu Node 12.18 LTS Docker image has 2.24 available.

Adding to the notes:

apparently the default node docker images are based on buildpack-deps:stretch (Debian 9), but there's also a corresponding -buster (Debian 10) version of each. And as sporto notes, apparently stretch has glibc-2.24.

Also note that I want to switch the linux binaries to be statically linked (see https://github.com/avh4/elm-format/issues/589) which I think would also solve this issue once that can be done.

I have just tried it and using -buster node docker image has helped 馃憤 Thanks ;)

FROM: node:12.8.4-buster

Note for Travis-CI users: adding dist: focal to your .travis.yml appears to give the needed glibc version.

I'm testing the next release, and docker run -it node:12.14 /bin/sh -c "npm i [email protected] && node_modules/.bin/elm-format --help" appears to work, so this should be fixed once 0.8.5 gets released (which will happen as soon as #722 is confirmed to be working)

Should be fixed in 0.8.5

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mordrax picture mordrax  路  6Comments

ahstro picture ahstro  路  3Comments

ahstro picture ahstro  路  4Comments

welblaud picture welblaud  路  3Comments

Janiczek picture Janiczek  路  5Comments