relay: Can't install on Debian bookworm (apt) and PHP 8.1-8.2

relay.so seems to be compiled against wrong library versions, the ones I can’t install from packages.

Description

Debian bookworm has libssl3 (3.0.11-1~deb12u2) and relay.so is built against libssl.so.1.1 and libcrypto.so.1.1.

Expected Behavior

php --ri relay reports proper configuration and no errors shown.

Actual Behavior

PHP Warning:  PHP Startup: Unable to load dynamic library 'relay.so' (tried: /usr/lib/php/20210902/relay.so (libssl.so.1.1: cannot open shared object file: No such file or directory), /usr/lib/php/20210902/relay.so.so (/usr/lib/php/20210902/relay.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Extension 'relay' not present.
	linux-vdso.so.1 (0x0000ffffb12a1000)
	libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000ffffb1120000)
	libssl.so.1.1 => not found
	libcrypto.so.1.1 => not found
	libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffffb0f70000)
	/lib/ld-linux-aarch64.so.1 (0x0000ffffb1264000)
	libzstd.so.1 => /lib/aarch64-linux-gnu/libzstd.so.1 (0x0000ffffb0eb0000)
	liblz4.so.1 => /lib/aarch64-linux-gnu/liblz4.so.1 (0x0000ffffb0e60000)
	libanl.so.1 => /lib/aarch64-linux-gnu/libanl.so.1 (0x0000ffffb0e30000)

Possible Fix

I tried custom build from https://builds.r2.relay.so/v0.7.0/relay-v0.7.0-php8.2-debian-aarch64+libssl3.tar.gz and file relay-pkg.so seems to work, but it was quite a puzzle to find that specific link there and try that file.

Btw, relay.so is not working, it also has some libraries missing:

 ldd relay.so
	linux-vdso.so.1 (0x0000ffff8dd2e000)
	libhiredis_ssl.so.1.1.0 => not found
	libhiredis.so.1.1.0 => not found
	libssl.so.3 => /lib/aarch64-linux-gnu/libssl.so.3 (0x0000ffff8db40000)
	libcrypto.so.3 => /lib/aarch64-linux-gnu/libcrypto.so.3 (0x0000ffff8d6e0000)
	libck.so.0 => not found
	libzstd.so.1 => /lib/aarch64-linux-gnu/libzstd.so.1 (0x0000ffff8d620000)
	liblz4.so.1 => /lib/aarch64-linux-gnu/liblz4.so.1 (0x0000ffff8d5d0000)
	libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffff8d420000)
	/lib/ld-linux-aarch64.so.1 (0x0000ffff8dcf1000)

Bookworm is missing libhiredis 1.1.0, it only has libhiredis0.14.

Steps to Reproduce

I used the following Dockerfile (I’m on a mac, so arm64 arch, but that probably doesn’t matter). This is almost exact copy of one of your examples with some minor tweaks, like Debian version, php8.2 version and custom CMD command to simplify the test case.

FROM debian:12

RUN apt-get update

RUN apt-get install -y \
  wget \
  gnupg \
  lsb-release

RUN wget -q "https://packages.sury.org/php/apt.gpg" -O /usr/share/keyrings/ondrej.gpg
RUN echo "deb [signed-by=/usr/share/keyrings/ondrej.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/ondrej.list > /dev/null
RUN apt-get update

RUN apt-get install -y \
  php8.2-fpm

# Add Relay repository
RUN wget -q "https://repos.r2.relay.so/key.gpg" -O- | gpg --dearmor -o /usr/share/keyrings/cachewerk.gpg
RUN echo "deb [signed-by=/usr/share/keyrings/cachewerk.gpg] https://repos.r2.relay.so/deb $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/cachewerk.list > /dev/null
RUN apt-get update

# Install Relay
RUN apt-get install -y \
  php8.2-relay

CMD php --ri relay; ldd /usr/lib/php/2*/relay.so

Copy the above file into some folder like /tmp/relay/, build the image and run a container from it:

mkdir /tmp/relay
cd /tmp/relay
vim Dockerfile # paste the contents of Dockerfile to the file and save
docker build . --no-cache -t relay-debian-12-8.2 
docker run -it --rm relay-debian-12-8.2

Additional context

Relay diagnostics

...

Environment

  • OS and version: macOS Sonoma 14.2.1
  • PHP version: PHP 8.2
  • Redis version: not installed

About this issue

  • Original URL
  • State: closed
  • Created 4 months ago
  • Reactions: 1
  • Comments: 15 (11 by maintainers)

Most upvoted comments

It works now. Thanks again!

@conf Thanks, the bookworm builds were using the wrong libssl version because of a missing case: https://github.com/cachewerk/linux-repos/commit/2fdd77946c3801d25853f10b7bee7813db33ba0f

I’ll trigger a new build, the repo will update shortly.

@conf: I think we worked it out. It should install now. I believe this was the issue: https://github.com/cachewerk/linux-repos/commit/36551f97273577632f06bb40b29a55d7398980db