Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLIBC_2.32 not found #137

Open
roccomuso opened this issue Sep 26, 2024 · 2 comments
Open

GLIBC_2.32 not found #137

roccomuso opened this issue Sep 26, 2024 · 2 comments

Comments

@roccomuso
Copy link

Getting this error when executing bin inside latest dora_1.12.0_linux_amd64.tar.gz:

./dora-explorer: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./dora-explorer)

@pk910
Copy link
Member

pk910 commented Oct 1, 2024

Heya @roccomuso,
Which OS are you trying to run the explorer on?

@pk910
Copy link
Member

pk910 commented Oct 1, 2024

The root cause for the issue is the CGO compilation that dora needs to compile C libs for cryptography & sqlite.
When using CGO, the resulting build always targets the GLIBC version of the build system.
The github workflows that are building the release binaries are running on ubuntu-latest, which always targets a recent version of GLIBC.

I've been curious to see if I can get the explorer running on older systems.
And yea, it's actually not hard when building it yourself.

We could actually generate builds for older GLIBC versions by using docker for the build environment.
eg. for GLIBC_2.27:

git clone https://github.com/ethpandaops/dora.git
cd dora
cat > ./Dockerfile-legacy <<- EOF
FROM ubuntu:18.04
RUN apt-get update -y && apt-get install -y --no-install-recommends \
    curl ca-certificates build-essential

# Download and install Go
ENV GO_VERSION 1.23.1
RUN curl -LO "https://go.dev/dl/go1.23.1.linux-amd64.tar.gz" && \
    tar -C /usr/local -xzf "go1.23.1.linux-amd64.tar.gz" && \
    rm "go1.23.1.linux-amd64.tar.gz"

# Set Go environment variables
ENV PATH="/usr/local/go/bin:${PATH}"
ENV GOPATH="/go"
ENV GOBIN="/go/bin"

# Set the working directory
WORKDIR /app

CMD ["/bin/bash"]
EOF

docker build --file ./Dockerfile-legacy . -t dora-build --load
docker run -it -v $(pwd):/app dora-build make build

ls ./bin

The resulting build is forward compatible with recent versions of GLIBC, but might be slightly slower due to a limited feature set.
But I'm not sure if it's worth adding additional build artifacts for older systems to releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants