Bug #77471 [Asn->Opn]: configure: error: cannot run test program while cross compiling

From: Date: Fri, 03 Mar 2023 23:52:12 +0000
Subject: Bug #77471 [Asn->Opn]: configure: error: cannot run test program while cross compiling
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243845@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77471&edit=1 ID: 77471 Updated by: petk@php.net Reported by: stephane at qnap dot com Summary: configure: error: cannot run test program while cross compiling -Status: Assigned +Status: Open Type: Bug Package: *Compile Issues Operating System: ubuntu 1404 PHP Version: 7.2.14 -Assigned To: petk +Assigned To: Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2019-01-16 19:09:15] petk@php.net Patching 7.2 with these issues might be simplest done to only fill the sensible defaults for the last argument of the AC_TRY_RUN macro [1]. Now there are some blank last arguments used in some places. The AC_TRY_RUN macro is an obsolete macro of the same functionality as its new version AC_RUN_IFELSE (which is used in 7.3). So basically even the migration to newer macro can be done for PHP 7.2 but simplest is probably to go manually through the AC_TRY_RUN occurrences and fill in the sensible defaults for the last argument. Last argument means what happens when cross compiling. End system can't be just run at this case because we are using one system to compile for another system where program can run differently... I'll check if I can come up with some patch in some decent time here, otherwise send the pull request to go from there if possible, please. [1] https://www.gnu.org/software/autoconf/manual/autoconf.html ------------------------------------------------------------------------ [2019-01-16 16:45:19] stephane at qnap dot com seems solved by patching lines moved from 7.3 to 7.2 a bit harder to modify manually seems other codes need also backported... i modify until opcache.. and opcache fail also if do not modify it with checking for mmap() using shm_open() shared memory support... no checking for mmap() using regular file shared memory support... no checking "whether flock struct is linux ordered"... configure: error: in `/SRC/.MYSCRIPT/tmp/php-src-php-7.2.14': configure: error: cannot run test program while cross compiling See `config.log' for more details ------------------------------------------------------------------------ [2019-01-16 16:32:07] stephane at qnap dot com I will try modify it.. but i wonder if it can be backported to 7.2.x branch thanks a lot ------------------------------------------------------------------------ [2019-01-16 15:55:46] nikic@php.net Looks like this was fixed on 7.3 with https://github.com/php/php-src/commit/f2e4de8b567a632f132fe0fdc34bbb75fcf01518. We can backport this change, or at least the part pertaining to strcasestr. ------------------------------------------------------------------------ [2019-01-16 15:44:06] stephane at qnap dot com Description: ------------ trying to cross compile PHP 7.2.14 autoconf is stuck on checking for FlatFile support... builtin checking whether to enable DBA interface... yes, shared checking whether to enable DOM support... yes checking for xml2-config path... (cached) /opt/PHPFPM/bin/xml2-config checking whether libxml build works... checking for ENCHANT support... no checking whether to enable EXIF (metadata from images) support... yes checking for fileinfo support... yes checking for strcasestr... configure: error: in `/SRC/.MYSCRIPT/tmp/php-7.2.14': configure: error: cannot run test program while cross compiling See `config.log' for more details this error should passed and be inactiv when cross compiling tried with PHP 7.3.1 .. it runs without issue with same config config.log stuck at : configure:28473: result: no configure:28862: checking for CDB support configure:28870: result: builtin configure:28894: checking for INI File support configure:28902: result: builtin configure:28926: checking for FlatFile support configure:28934: result: builtin configure:28943: checking whether to enable DBA interface configure:28947: result: yes, shared configure:29235: checking whether to enable DOM support configure:29270: result: yes configure:29311: checking for xml2-config path configure:29325: result: /opt/PHPFPM/bin/xml2-config configure:29532: checking whether libxml build works configure:29583: result: configure:29934: checking for ENCHANT support configure:29970: result: no configure:30544: checking whether to enable EXIF (metadata from images) support configure:30579: result: yes configure:30847: checking for fileinfo support configure:30882: result: yes configure:30897: checking for strcasestr configure:30900: error: in `/SRC/.MYSCRIPT/tmp/php-7.2.14': configure:30902: error: cannot run test program while cross compiling See `config.log' for more details Expected result: ---------------- ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=77471&edit=1

« previous php.bugs (#243845) next »