Skip to content

"GLIBC_2.35 not found" error in AWS CodeBuild pipeline #114

@vergjor

Description

@vergjor

I have an automated test project in Cypress, where I use the odiff-bin package for verifying images in some of our tests. I also have a setup for running these tests on AWS CodeBuild, where we have the following environment setup:

  • Image: aws/codebuild/standard:5.0
  • Environment type: Linux Container
  • Compute type: EC2
  • Node version: 20
  • Cypress version: 13.15.2
  • Odiff-bin version: 3.1.1

The issue is that when those specific tests are running on the pipeline, the following error is thrown:

From Node.js Internals:
  Error: /codebuild/output/src3891/src/github.com/.../node_modules/odiff-bin/bin/odiff.exe: /lib64/libm.so.6: version `GLIBC_2.35' not found (required by /codebuild/output/src3891/src/github.com/.../node_modules/odiff-bin/bin/odiff.exe)
  
      at ChildProcess.<anonymous> (/codebuild/output/src3891/src/github.com/.../node_modules/odiff-bin/odiff.js:169:13)
      at ChildProcess.emit (node:events:531:35)
      at ChildProcess.emit (node:domain:488:12)
      at maybeClose (node:internal/child_process:1105:16)
      at Socket.<anonymous> (node:internal/child_process:457:11)
      at Socket.emit (node:events:519:28)
      at Socket.emit (node:domain:488:12)
      at Pipe.<anonymous> (node:net:338:12)

Since the aws/codebuild/amazonlinux2-x86_64-standard:5.0 image is based on Amazon Linux 2023, from what I can see on DockerHub the current version of glibc of that image is 2.34:
image

I am unsure on how to resolve this issue... any advice?

Activity

dmtrKovalenko

dmtrKovalenko commented on Nov 22, 2024

@dmtrKovalenko
Owner

This is strange because odiff provides a statically linked binary there shouldn't be any dependencies on glibc

Mauladen

Mauladen commented on Feb 16, 2025

@Mauladen

@dmtrKovalenko I also got this error after upgrading to 3.2.1.

maroskapral

maroskapral commented on Feb 17, 2025

@maroskapral

same for me with version 3.2.1, I guess it can be because new version was built on ubuntu-latest / ubuntu-24.04 where both of them has glibc 2.39. You can try to change the build os on ubuntu-22.04, where is glibc 2.35 or even older ubuntu-20.04

olegafx

olegafx commented on Mar 4, 2025

@olegafx

Just got the same error on v3.2.1

SherAtrium

SherAtrium commented on Mar 13, 2025

@SherAtrium

Same error on v3.2.1

SergeyVolynkin

SergeyVolynkin commented on May 9, 2025

@SergeyVolynkin

+1, as the workaround locked version to 3.2.0 for now

// package.json

// for yarn
  "resolutions": {
    "**/odiff-bin": "3.2.0"
  },
semanser

semanser commented on Jul 23, 2025

@semanser

I was getting a similar error.

odiff: /lib/x86_64-linux-gnu/libm.so.6: version GLIBC_2.38' not found (required by odiff)

Using 3.2.0 helped.

Looks like the only difference between 3.2.1 and 3.2.0 is that it doesn't require a fixed version of ocaml. My best guess is that because of that, it kind of adds some dynamic linking to the final build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @olegafx@semanser@Mauladen@dmtrKovalenko@SergeyVolynkin

        Issue actions

          "GLIBC_2.35 not found" error in AWS CodeBuild pipeline · Issue #114 · dmtrKovalenko/odiff