I am deploying an app with GitHub actions, this fails due to GLIBC version
home/app_user/_build/staging/rel/app/erts-13.2.2.12/bin/beam.smp: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.38' not found (required by /home/app_user/_build/staging/rel/app/erts-13.2.2.12/bin/beam.smp)
as I checked my image ldd --version
it has 2.39 but Erlang expects 2.38, I did try downgrading this to 2.38, but that didn’t help.
here is yml I used to downgrade
name: Elixir CI staging
on:
push:
branches: [ main, master, release ]
jobs:
build:
name: Build and Deploy
runs-on: ubuntu-latest
env:
MIX_ENV: production
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: SSH Agent
uses: webfactory/ssh-agent@v0.7.0
- name: Setup elixir
uses: erlef/setup-beam@v1
with:
otp-version: 25.0
elixir-version: 1.16.0
- name: Restore dependencies cache
uses: actions/cache@v3
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- uses: actions/cache@v3
with:
path: |
assets/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install GLIBC 2.38
run: |
sudo apt-get update
sudo apt-get install -y wget build-essential
sudo apt-get install gcc-10 g++-10
export CC=gcc-10
export CXX=g++-10
wget http://ftp.gnu.org/gnu/libc/glibc-2.38.tar.gz
tar -xvzf glibc-2.38.tar.gz
cd glibc-2.38
mkdir build
cd build
../configure --prefix=/opt/glibc-2.38 CFLAGS="-O2 -Wno-error"
make -j$(nproc)
sudo make install
sudo ldconfig
export LD_LIBRARY_PATH=/opt/glibc-2.38/lib:$LD_LIBRARY_PATH
- name: Verify GLIBC version
run: ldd --version
- name: Install mix dependecies
run: mix deps.get
- name: Install node dependencies
run: npm install --prefix ./assets --legacy-peer-deps
- name: Deploy assets
run: npm run deploy --prefix assets
- name: Digest assets
run: mix phx.digest
- name: Create Release
run: mix release --overwrite
- name: Verify GLIBC version
run: ldd --version
does anyone has faced this issue ??