On Thu, May 07, 2020 at 02:28:06PM -0400, Claude Bing wrote:
> Explicitly specifying -lrt is required for opcache to be linked against
> the proper dependencies.  Additionally, PHP disables libdl when it
> detects a cross-compilation environment for some reason.  In order to
> load any type of extension, re-enabling libdl is required.
>...
> +# link against librt (libc) if opcache is specified in order to avoid the
> +# following error:
> +# Failed loading 
> /usr/lib/php7/extensions/no-debug-non-zts-20190902/opcache.so: 
> /usr/lib/php7/extensions/no-debug-non-zts-20190902/opcache.so: undefined 
> symbol: shm_unlink
> +LDFLAGS += "${@ " -lrt " if bb.utils.contains('PACKAGECONFIG', 'opcache', 
> 'true', 'false', d) else "" }"

Is this actually a bug in 0001-opcache-config.m4-enable-opcache.patch
and should instead be fixed there?

-    AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM 
support])
-    AC_MSG_RESULT([yes])
-    PHP_CHECK_LIBRARY(rt, shm_unlink, 
[PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)])
+  AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM 
support])

I would guess re-adding the PHP_CHECK_LIBRARY fixes your problem?

> +# Adding these flags enables dynamic library support, which is disabled by
> +# default when cross compiling
> +# See https://bugs.php.net/bug.php?id=60109
> +CFLAGS += " -DHAVE_LIBDL "
> +LDFLAGS += " -ldl "
> +
>...

The linked PHP bug was closed in 2018 due to lack of feedback.

cu
Adrian
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#84261): 
https://lists.openembedded.org/g/openembedded-devel/message/84261
Mute This Topic: https://lists.openembedded.org/mt/74056955/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to