phanalist icon indicating copy to clipboard operation
phanalist copied to clipboard

/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found

Open rmikalkenas opened this issue 11 months ago • 8 comments

Installed via composer require denzyl/phanalist

Main image: php:8.3.3-cli-bullseye

> ldd --version
ldd (Debian GLIBC 2.31-13+deb11u8) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

I understand that the version of glibc on my machine is lower, but is there any chance to make this tool compatible with older machines?

rmikalkenas avatar Mar 13 '24 11:03 rmikalkenas

@rmikalkenas can you please instead of using the composer try to download a standalone binary on the same machine, using

curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/denzyldick/phanalist/main/bin/init.sh | sh

And try to run it?

I just want to identify if we have no corresponding complied executable, or if it is just a composer issue.

SerheyDolgushev avatar Mar 13 '24 13:03 SerheyDolgushev

@SerheyDolgushev same error.

Reproducer:

# Dockerfile
FROM php:8.3.3-cli-bullseye

RUN curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/denzyldick/phanalist/main/bin/init.sh | sh

RUN ~/phanalist -V

Output:

/root/phanalist: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /root/phanalist)
/root/phanalist: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /root/phanalist)
/root/phanalist: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /root/phanalist)

rmikalkenas avatar Mar 14 '24 05:03 rmikalkenas

@rmikalkenas can you please try to compile it locally, using the following instructions:

  1. Clone the latest phanalist:
cd ~/Projects
git clone [email protected]:denzyldick/phanalist.git
cd phanalist
  1. Create the following php-cli-bullseye docker file:
FROM php:8.3.3-cli-bullseye
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh -s -- -y
WORKDIR /usr/src/phanalist
COPY . .
RUN ~/.cargo/bin/cargo build --release
  1. Build php-cli-bullseye image using that docker file, it will compile phanalist:
docker build -f php-cli-bullseye -t phanalist-php-cli-bullseye .
  1. Get the compiled phanalist:
docker run -v ./:/tmp/release --rm phanalist-php-cli-bullseye cp /usr/src/phanalist/target/release/phanalist /tmp/release/phanalist

After this step, you will get the ~/Projects/phanalist/phanalist binary, which can be run in php:8.3.3-cli-bullseye.

Can you please confirm it works for your case?

SerheyDolgushev avatar Mar 14 '24 08:03 SerheyDolgushev

Hi everyone,

Thanks for submitting this issue. I think the issue is that the cargo.toml has a build dependency bindgen = "0.65.1".

I think this was a left behind when we removed the dependency with rocksdb. But im not really sure, i dont know what it does. But i will look into it when I get behind the PC.

Thanks.

denzyldick avatar Mar 14 '24 12:03 denzyldick

@rmikalkenas can you please try to compile it locally, using the following instructions:

  1. Clone the latest phanalist:
cd ~/Projects
git clone [email protected]:denzyldick/phanalist.git
cd phanalist
  1. Create the following php-cli-bullseye docker file:
FROM php:8.3.3-cli-bullseye
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh -s -- -y
WORKDIR /usr/src/phanalist
COPY . .
RUN ~/.cargo/bin/cargo build --release
  1. Build php-cli-bullseye image using that docker file, it will compile phanalist:
docker build -f php-cli-bullseye -t phanalist-php-cli-bullseye .
  1. Get the compiled phanalist:
docker run -v ./:/tmp/release --rm phanalist-php-cli-bullseye cp /usr/src/phanalist/target/release/phanalist /tmp/release/phanalist

After this step, you will get the ~/Projects/phanalist/phanalist binary, which can be run in php:8.3.3-cli-bullseye.

Can you please confirm it works for your case?

Seems to be working then. But would be great to avoid compilation.. Simply download compiled binary and run:)

rmikalkenas avatar Mar 14 '24 13:03 rmikalkenas

@rmikalkenas can you please try to compile it locally, using the following instructions:

  1. Clone the latest phanalist:
cd ~/Projects
git clone [email protected]:denzyldick/phanalist.git
cd phanalist
  1. Create the following php-cli-bullseye docker file:
FROM php:8.3.3-cli-bullseye
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh -s -- -y
WORKDIR /usr/src/phanalist
COPY . .
RUN ~/.cargo/bin/cargo build --release
  1. Build php-cli-bullseye image using that docker file, it will compile phanalist:
docker build -f php-cli-bullseye -t phanalist-php-cli-bullseye .
  1. Get the compiled phanalist:
docker run -v ./:/tmp/release --rm phanalist-php-cli-bullseye cp /usr/src/phanalist/target/release/phanalist /tmp/release/phanalist

After this step, you will get the ~/Projects/phanalist/phanalist binary, which can be run in php:8.3.3-cli-bullseye. Can you please confirm it works for your case?

Seems to be working then. But would be great to avoid compilation.. Simply download compiled binary and run:)

Yep, that is a temporary fix just to unblock you. But it is not an applicable long-term fix. But seems like @denzyldick will handle it.

SerheyDolgushev avatar Mar 14 '24 14:03 SerheyDolgushev

Locally, I could reproduce the same issue using the steps provided by @SerheyDolgushev. The solution was using the musl target. I changed the composer script. In the next release, I hope it will fix your issue. @rmikalkenas. Thanks for submitting the issue. If there is anything I can do or if you have any suggestions for the project, we are open to hearing it.

@SerheyDolgushev can you update the release binaries 😄?

denzyldick avatar Mar 14 '24 19:03 denzyldick

@denzyldick I run ./bin/release.sh but the binaries are the same, as there were no any recent changes that affected them. So seems like after https://github.com/denzyldick/phanalist/pull/63/files composer will use only musl target, but how about gnu platforms? I would assume there are some gnu platforms that are using composer, and after that change they will switch to musl which might be problematic. Maybe there should be an additional check, similar to https://github.com/denzyldick/phanalist/blob/main/bin/init.sh#L80-L82?

SerheyDolgushev avatar Mar 15 '24 07:03 SerheyDolgushev