Hey,
I'm confused about the librt thing, because librt never existed in
musl, and it was dropped a long time ago in uClibc/glibc. Buildroot no
longer supports glibc versions where librt was a separate library from
libc.
In ed355dec (PATCH 2/3) the following line is what makes opcache actually work:

PHP_CHECK_LIBRARY(rt, shm_unlink, [PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)])

Regards,
Pascal de Bruijn

From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Sent: Thursday, August 5, 2021 16:01
To: Pascal de Bruijn <p.debruijn@unilogic.nl>
Cc: buildroot@buildroot.org <buildroot@buildroot.org>; aduskett@gmail.com <aduskett@gmail.com>
Subject: Re: [Buildroot] [PATCH 3/3] package/php: enable opcache jit
 
Hello Pascal,

On Thu, 5 Aug 2021 13:53:21 +0000
Pascal de Bruijn <p.debruijn@unilogic.nl> wrote:

> No not really... I've not found a case where JIT does not work (when
> properly enabled in php.ini), maybe @aduskett could elaborate...

Yes, it would be good to have some details from Adam.

> Opcache (with or without JIT) was completely broken both in buildroot
> for both 7.4.x and 8.0.x due to the shm_unlink issue with librt. The
> main issue is that this fails at runtime, so you can have opcache
> compile just fine, but non-functional when enabled in php.ini...

I'm confused about the librt thing, because librt never existed in
musl, and it was dropped a long time ago in uClibc/glibc. Buildroot no
longer supports glibc versions where librt was a separate library from
libc.

Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com