php: add "--without-sqlite3 --without-pdo-sqlite"
PATCH 1/2 php: add "--without-sqlite3 --without-pdo-sqlite"
From: Max Kellermann <[email protected]>
Removing "sqlite3" from PACKAGECONFIG doesn't actually disable SQLite, because those options default to "yes". It just switches from the system SQLite to PHP's internal SQLite copy.
--- meta-oe/recipes-devtools/php/php.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-devtools/php/php.inc +1 -1
@@ -79,7 +79,7 @@ PACKAGECONFIG[mysql] = "--with-mysql=${STAGING_DIR_TARGET}${prefix} \ PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_LIBDIR}/.. \ --with-pdo-sqlite=${STAGING_LIBDIR}/.. \ - , \ + ,--without-sqlite3 --without-pdo-sqlite \ ,sqlite3" PACKAGECONFIG[pgsql] = "--with-pgsql=${STAGING_DIR_TARGET}${exec_prefix},--without-pgsql,postgresql" PACKAGECONFIG[soap] = "--enable-libxml --enable-soap, --disable-soap, libxml2"
Signature · 1 line
2.19.0
PATCH 2/2 php: fix linker errors by setting `ac_cv_func_dlopen=no`
From: Max Kellermann <[email protected]>
The autoconf variable ac_cv_func_dlopen controls whether dlopen() is available without linking libdl.so. But that doesn't work:
tmp-glibc/work/aarch64-oe-linux/php/7.2.10-r0/recipe-sysroot-native/usr/bin/aarch64-oe-linux/../../libexec/aarch64-oe-linux/gcc/aarch64-oe-linux/8.2.0/ld: ext/sqlite3/libsqlite/sqlite3.o: undefined reference to symbol 'dlsym@@GLIBC_2.17' tmp-glibc/work/aarch64-oe-linux/php/7.2.10-r0/recipe-sysroot-native/usr/bin/aarch64-oe-linux/../../libexec/aarch64-oe-linux/gcc/aarch64-oe-linux/8.2.0/ld: tmp-glibc/work/aarch64-oe-linux/php/7.2.10-r0/recipe-sysroot/lib/libdl.so.2: error adding symbols: DSO missing from command line
Leave ac_cv_lib_dl_dlopen=yes, because that's the one which controls whether -ldl is needed.
--- meta-oe/recipes-devtools/php/php.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-devtools/php/php.inc +1 -1
@@ -58,7 +58,7 @@ EXTRA_OECONF = "--enable-mbstring \ ${COMMON_EXTRA_OECONF} \ " -CACHED_CONFIGUREVARS += "ac_cv_func_dlopen=yes ac_cv_lib_dl_dlopen=yes" +CACHED_CONFIGUREVARS += "ac_cv_func_dlopen=no ac_cv_lib_dl_dlopen=yes" EXTRA_OECONF_class-native = " \ --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \
Signature · 1 line
2.19.0
Re: [PATCH 2/2] php: fix linker errors by setting `ac_cv_func_dlopen=no`
Hello Max,
Quoted 19 lines · Max Kellermann
From: Max Kellermann <[email protected]>
The autoconf variable
ac_cv_func_dlopencontrols whetherdlopen()is available without linkinglibdl.so. But that doesn't work:tmp-glibc/work/aarch64-oe-linux/php/7.2.10-r0/recipe-sysroot-native/usr/bin/aarch64-oe-linux/../../libexec/aarch64-oe-linux/gcc/aarch64-oe-linux/8.2.0/ld:
ext/sqlite3/libsqlite/sqlite3.o: undefined reference to symbol 'dlsym@@GLIBC_2.17' tmp-glibc/work/aarch64-oe-linux/php/7.2.10-r0/recipe-sysroot-native/usr/bin/aarch64-oe-linux/../../libexec/aarch64-oe-linux/gcc/aarch64-oe-linux/8.2.0/ld: tmp-glibc/work/aarch64-oe-linux/php/7.2.10-r0/recipe-sysroot/lib/libdl.so.2: error adding symbols: DSO missing from command lineLeave
ac_cv_lib_dl_dlopen=yes, because that's the one which controls whether-ldlis needed.--- meta-oe/recipes-devtools/php/php.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta-oe/recipes-devtools/php/php.inc +0
-0
meta-oe/recipes-devtools/php/php.inc EXTRA_OECONF = "--enable-mbstring \ · line 62
Quoted 6 lines
meta-oe/recipes-devtools/php/php.inc +1
-1@@ -58,7 +58,7 @@ EXTRA_OECONF = "--enable-mbstring \ ${COMMON_EXTRA_OECONF} \ " -CACHED_CONFIGUREVARS += "ac_cv_func_dlopen=yes ac_cv_lib_dl_dlopen=yes" +CACHED_CONFIGUREVARS += "ac_cv_func_dlopen=no ac_cv_lib_dl_dlopen=yes"
I encountered the same error when building php 7.2.9 without mysql support. With mysql enabled it will build fine. With this patch both build fine.
Removing CACHED_CONFIGUREVARS completely also seems to work for 7.2.9, but perhaps 5.6 needs this?
Regards,
Jeroen
Re: [PATCH 2/2] php: fix linker errors by setting `ac_cv_func_dlopen=no`
Quoted 2 lines · Jeroen Hofstee
Removing
CACHED_CONFIGUREVARScompletely also seems to work for 7.2.9, but perhaps 5.6 needs this?
I thought about this as well. The reason for hard-coding those variables is a mystery to me, because I thought doing such detections, even when cross-compiling, is a first-class feature of autotools which always works reliably.
Max
Re: [PATCH 2/2] php: fix linker errors by setting `ac_cv_func_dlopen=no`
Quoted 9 lines · Max Kellermann
Quoted 2 lines · Jeroen Hofstee
Removing
CACHED_CONFIGUREVARScompletely also seems to work for 7.2.9, but perhaps 5.6 needs this?I thought about this as well. The reason for hard-coding those variables is a mystery to me, because I thought doing such detections, even when cross-compiling, is a first-class feature of autotools which always works reliably.
see http://git.openembedded.org/meta-openembedded/commit/?id=0d052a48c9fd6d2207f150729a20804e416c91b1
Quoted 7 lines
Max
--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Re: [PATCH 2/2] php: fix linker errors by setting `ac_cv_func_dlopen=no`
Hi,
Quoted 10 lines · Khem Raj
Quoted 7 lines · Max Kellermann
Quoted 2 lines · Jeroen Hofstee
Removing
CACHED_CONFIGUREVARScompletely also seems to work for 7.2.9, but perhaps 5.6 needs this?I thought about this as well. The reason for hard-coding those variables is a mystery to me, because I thought doing such detections, even when cross-compiling, is a first-class feature of autotools which always works reliably.
see http://git.openembedded.org/meta-openembedded/commit/?id=0d052a48c9fd6d2207f150729a20804e416c91b1
For what it is worth, php_5.6.36 builds fine without the CACHED_CONFIGUREVARS and opcache enable. I am not sure I get this part "AC_CHECK_FUNC isn't suitable for a cross-compile environment". Yes, it will check the cross compiler, but I would expect the cross setup to be the same as on the target, or that should be fixed I guess.
Anyway, no objection for the patch, since it does already fix something (building without mysql support e.g.), but I am tempted to think the CACHED_CONFIGUREVARS can be removed completely.
php 5.6.36 does seem to be broken in default setup though, with openssl enabled, at least I had to disable it to test this, see below
Regards,
Jeroen
| /home/jeroen/software/venus-upstream/build/tmp-glibc/work/cortexa8hf-neon-ve-linux-gnueabi/php/5.6.36-r0/php-5.6.36/ext/openssl/openssl.c: In function 'zif_openssl_sign': | /home/jeroen/software/venus-upstream/build/tmp-glibc/work/cortexa8hf-neon-ve-linux-gnueabi/php/5.6.36-r0/php-5.6.36/ext/openssl/openssl.c:4801:13: error: storage size of 'md_ctx' isn't known | EVP_MD_CTX md_ctx; | ^~~~~~ | /home/jeroen/software/venus-upstream/build/tmp-glibc/work/cortexa8hf-neon-ve-linux-gnueabi/php/5.6.36-r0/php-5.6.36/ext/openssl/openssl.c:4845:2: warning: implicit declaration of function 'EVP_MD_CTX_cleanup'; did you mean 'EVP_MD_CTX_create'? [-Wimplicit-function-declaration] | EVP_MD_CTX_cleanup(&md_ctx); | ^~~~~~~~~~~~~~~~~~ | EVP_MD_CTX_create | /home/jeroen/software/venus-upstream/build/tmp-glibc/work/cortexa8hf-neon-ve-linux-gnueabi/php/5.6.36-r0/php-5.6.36/ext/openssl/openssl.c: In function 'zif_openssl_verify': | /home/jeroen/software/venus-upstream/build/tmp-glibc/work/cortexa8hf-neon-ve-linux-gnueabi/php/5.6.36-r0/php-5.6.36/ext/openssl/openssl.c:4859:17: error: storage size of 'md_ctx' isn't known | EVP_MD_CTX md_ctx; | ^~~~~~ | /home/jeroen/software/venus-upstream/build/tmp-glibc/work/cortexa8hf-neon-ve-linux-gnueabi/php/5.6.36-r0/php-5.6.36/ext/openssl/openssl.c: In function 'zif_openssl_seal': | /home/jeroen/software/venus-upstream/build/tmp-glibc/work/cortexa8hf-neon-ve-linux-gnueabi/php/5.6.36-r0/php-5.6.36/ext/openssl/openssl.c:4920:17: error: storage size of 'ctx' isn't known | EVP_CIPHER_CTX ctx; | ^~~ | /home/jeroen/software/venus-upstream/build/tmp-glibc/work/cortexa8hf-neon-ve-linux-gnueabi/php/5.6.36-r0/php-5.6.36/ext/openssl/openssl.c: In function 'zif_openssl_open': | /home/jeroen/software/venus-upstream/build/tmp-glibc/work/cortexa8hf-neon-ve-linux-gnueabi/php/5.6.36-r0/php-5.6.36/ext/openssl/openssl.c:5048:17: error: storage size of 'ctx' isn't known | EVP_CIPHER_CTX ctx; | ^~~ | /home/jeroen/software/venus-upstream/build/tmp-glibc/work/cortexa8hf-neon-ve-linux-gnueabi/php/5.6.36-r0/php-5.6.36/ext/openssl/openssl.c: In function 'zif_openssl_digest': | /home/jeroen/software/venus-upstream/build/tmp-glibc/work/cortexa8hf-neon-ve-linux-gnueabi/php/5.6.36-r0/php-5.6.36/ext/openssl/openssl.c:5154:13: error: storage size of 'md_ctx' isn't known | EVP_MD_CTX md_ctx; | ^~~~~~ | /home/jeroen/software/venus-upstream/build/tmp-glibc/work/cortexa8hf-neon-ve-linux-gnueabi/php/5.6.36-r0/php-5.6.36/ext/openssl/openssl.c: In function 'zif_openssl_encrypt': | /home/jeroen/software/venus-upstream/build/tmp-glibc/work/cortexa8hf-neon-ve-linux-gnueabi/php/5.6.36-r0/php-5.6.36/ext/openssl/openssl.c:5233:17: error: storage size of 'cipher_ctx' isn't known | EVP_CIPHER_CTX cipher_ctx; | ^~~~~~~~~~ | /home/jeroen/software/venus-upstream/build/tmp-glibc/work/cortexa8hf-neon-ve-linux-gnueabi/php/5.6.36-r0/php-5.6.36/ext/openssl/openssl.c: In function 'zif_openssl_decrypt': | /home/jeroen/software/venus-upstream/build/tmp-glibc/work/cortexa8hf-neon-ve-linux-gnueabi/php/5.6.36-r0/php-5.6.36/ext/openssl/openssl.c:5316:17: error: storage size of 'cipher_ctx' isn't known | EVP_CIPHER_CTX cipher_ctx;