venkatdevex

venkatdevex

Elixir release fails due to GLIBC not found

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 ??

First Post!

karlosmid

karlosmid

Hi, github actions runner was updated to ubuntu 24.04.
Check your Dockerfile ubuntu version and put that version in runs-on instead of ubuntu-latest.

Where Next?

Popular in Questions Top

belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
logicmason
Hi there, I'm working through my first release with elixir/phoenix. I've built a release with distillery and found that it crashes when I...
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New

Other popular topics Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30048 115
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New

We're in Beta

About us Mission Statement