You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At https://bugs.gentoo.org/931884 we have a bug report that boils down to the external libcrypt (./configure --with-external-libcrypt) checks running e.g.
where the last case is executed for cross-compiles and forces the feature to undetected (which, in this case, is fatal). We have a few options to work around this within Gentoo, but I thought it was worth asking about upstream approach more generally. AC_RUN_IFELSE is used in a few places, and I think it would be better if the cross-compile branch were kept consistent to whatever extent that's possible.
AC_CACHE_CHECK([for JIT support in PCRE2], ac_cv_have_pcre2_jit, [AC_RUN_IFELSE(...[AC_CANONICAL_HOST case $host_cpu in arm*|i[[34567]]86|x86_64|mips*|powerpc*|sparc) ac_cv_have_pcre2_jit=yes ;; *) ac_cv_have_pcre2_jit=no ;; esac])
This is important to me because I'm planning on making --with-external-gd the default soon, and I myself am guilty of writing a test that disables certain formats when cross-compiling because they cannot be detected with AC_RUN_IFELSE. This bug report has given me second thoughts about doing that.
Cross-compiling in PHP needs a lot of improvements indeed. Yes, all those checks should be wrapped in AC_CACHE_CHECK so the php_cv_* variables can be passed manually to help the configuration step determine the platform.
About these crypt algorithms checks I'm not sure how else could they be determined but to run the test program. Probably we can start filtering the platforms in case of cross-compiling and pass those that are certain to have these.
Thanks, I think using the cache variables is a fine approach where no better way to write the checks is apparent. I'll work on caching the format checks for the system libgd, and then afterwards solve both problems by overriding the cache variables.
Description
At https://bugs.gentoo.org/931884 we have a bug report that boils down to the external libcrypt (
./configure --with-external-libcrypt
) checks running e.g.where the last case is executed for cross-compiles and forces the feature to undetected (which, in this case, is fatal). We have a few options to work around this within Gentoo, but I thought it was worth asking about upstream approach more generally.
AC_RUN_IFELSE
is used in a few places, and I think it would be better if the cross-compile branch were kept consistent to whatever extent that's possible.For another example, take
ext/iconv/config.m4
:Or
ext/pcre/config0.m4
:This is important to me because I'm planning on making
--with-external-gd
the default soon, and I myself am guilty of writing a test that disables certain formats when cross-compiling because they cannot be detected withAC_RUN_IFELSE
. This bug report has given me second thoughts about doing that.ping @remicollet
PHP Version
git HEAD
Operating System
No response
The text was updated successfully, but these errors were encountered: