summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaude Bing <cbing@cybernetics.com>2020-05-07 14:28:06 -0400
committerKhem Raj <raj.khem@gmail.com>2020-05-07 23:01:29 -0700
commit0145cb4645b720efc36e4a034bb9e1077c191e5e (patch)
treed2475a4fceb586f237fa3377ce41658afa3bec6c
parent17426020a8c296986857511e85e3551207db857d (diff)
downloadmeta-openembedded-0145cb4645b720efc36e4a034bb9e1077c191e5e.tar.gz
php: fix opcache link error in 7.4
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. Signed-off-by: Claude Bing <cbing@cybernetics.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-devtools/php/php_7.4.4.bb11
1 files changed, 11 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/php/php_7.4.4.bb b/meta-oe/recipes-devtools/php/php_7.4.4.bb
index 48149304c6..68005c0bb5 100644
--- a/meta-oe/recipes-devtools/php/php_7.4.4.bb
+++ b/meta-oe/recipes-devtools/php/php_7.4.4.bb
@@ -111,6 +111,17 @@ export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}"
111export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php" 111export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php"
112CFLAGS += " -D_GNU_SOURCE -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2" 112CFLAGS += " -D_GNU_SOURCE -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2"
113 113
114# link against librt (libc) if opcache is specified in order to avoid the
115# following error:
116# 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
117LDFLAGS += "${@ " -lrt " if bb.utils.contains('PACKAGECONFIG', 'opcache', 'true', 'false', d) else "" }"
118
119# Adding these flags enables dynamic library support, which is disabled by
120# default when cross compiling
121# See https://bugs.php.net/bug.php?id=60109
122CFLAGS += " -DHAVE_LIBDL "
123LDFLAGS += " -ldl "
124
114EXTRA_OEMAKE = "INSTALL_ROOT=${D}" 125EXTRA_OEMAKE = "INSTALL_ROOT=${D}"
115 126
116acpaths = "" 127acpaths = ""