[oe] [PATCH 2/2] php: fix linker errors by setting `ac_cv_func_dlopen=no`

Jeroen Hofstee jhofstee at victronenergy.com
Thu Sep 27 19:27:21 UTC 2018


Hello Max,


On 09/27/2018 02:55 PM, Max Kellermann wrote:
> From: Max Kellermann <max.kellermann at gmail.com>
>
> 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(-)
>
> diff --git a/meta-oe/recipes-devtools/php/php.inc b/meta-oe/recipes-devtools/php/php.inc
> index 99a25b94b..bfd0ddfb8 100644
> --- a/meta-oe/recipes-devtools/php/php.inc
> +++ b/meta-oe/recipes-devtools/php/php.inc
> @@ -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



More information about the Openembedded-devel mailing list