| the installation process at this point. | +--------------------------------------------------------------------+ Thank you for using PHP. * ERROR: dev-lang/php-8.2.3::gentoo failed (configure phase): * no configure script found * * Call stack: ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.1_desktop_plasma-j5-20230306-130011 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-13 * clang/llvm (if any): clang version 15.0.7 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/15/bin Configuration file: /etc/clang/clang.cfg /usr/lib/llvm/15 15.0.7 Python 3.10.10 Available Ruby profiles: (none found) Available Rust versions: [1] rust-1.67.1 * php cli (if any): [1] php7.4 [2] php8.0 [3] php8.2 * HEAD of ::gentoo commit 57d726affec161718c6d3c5c01ec85b93744a105 Author: Repository mirror & CI <repomirrorci@gentoo.org> Date: Tue Mar 7 17:32:08 2023 +0000 2023-03-07 17:32:07 UTC emerge -qpvO dev-lang/php [ebuild R ] dev-lang/php-8.2.3 USE="acl apparmor bzip2 calendar cdb cjk cli coverage embed enchant exif ffi fileinfo filter firebird flatfile gd iconv imap intl iodbc jit nls opcache pdo phar posix readline session simplexml sodium ssl sysvipc tokenizer tokyocabinet unicode xml xmlwriter xslt zlib -apache2 -argon2 -bcmath -berkdb -cgi -ctype -curl -debug -fpm -ftp -gdbm -gmp -inifile -kerberos -ldap -ldap-sasl -libedit -lmdb -mhash -mssql -mysql -mysqli -oci8-instant-client -odbc -pcntl -phpdbg -postgres -qdbm (-selinux) -session-mm -sharedmem -snmp -soap -sockets -spell -sqlite -systemd -test -threads -tidy -truetype -webp -xmlreader -xpm -zip"
Created attachment 856660 [details] emerge-info.txt
Created attachment 856662 [details] dev-lang:php-8.2.3:20230307-175214.log
Created attachment 856664 [details] emerge-history.txt
Created attachment 856666 [details] environment
Created attachment 856668 [details] etc.clang.tar.bz2
Created attachment 856670 [details] etc.portage.tar.bz2
Created attachment 856672 [details] logs.tar.bz2
Same for dev-lang/php-8.2.4
(In reply to H.-Peter Pfeufer from comment #8) > Same for dev-lang/php-8.2.4 I don't remember if I ever built 8.2.3, but I'm the one who added 8.2.4, and I can't get this failure to happen. If you can reproduce it, can you help debug? The PHP ebuild first runs eautoreconf once, to generate the autotools files, including the configure script. It then loops through each of the SAPIs -- "cli" and "embed", in this case. For each SAPI it creates a subdirectory and copies the source files into it. Then within that subdirectory it runs ./configure. In Toralf's build log, it looks like the loop was able to run ./configure in the "embed" directory (look for --enable-embed --disable-cli), but not in the "cli" directory (look for --disable-embed --enable-cli). Of course, those directories should contain the same thing: they're both populated by cp -a "${S}" "${BUILD_DIR}" where BUILD_DIR is the per-SAPI subdirectory. So I can't explain how one of them gets a ./configure script and the other does not. Nothing in the loop should be messing with $S in between runs.
Oh great, now it's working O_o During yesterday's world update it still failed with this error so I removed the `~amd64` keyword and the package to not be bothered with it every world update and not have the `preserved-rebuild` reminder after every emerge I was running. Now as I wanted to provide the log for it, it just compiles … The only difference on my system: - World update (where it failed) - Package and keyword removal - emerge --depclean Now added the keyword again and it just runs through …
(In reply to H.-Peter Pfeufer from comment #10) > Oh great, now it's working O_o > That should be the Gentoo slogan. I wish I knew what to tell you. I've had the same thing happen a thousand times. I'll leave this open for a little while longer but probably whatever was wrong is history and was fixed by somebody else.
Created attachment 861629 [details] Build Log (php-8.1.16) Now I've got this with php-8.1.16 during today's world update … I know, this issue is for a different version, but might be related. The build log is attached …
I still haven't been able to reproduce this, so I'm not going to be much help, but I wanted to reply before I forget again. If/when this happens to you, can you poke around in the build directory to see what went wrong? The PHP ebuild runs "eautoconf --force" once, in src_prepare(), to create the ./configure script. Then in src_configure(), we copy the source files to sapis-build/<sapi-name> for each SAPI (cli, fpm, etc.) that you have enabled. In each of those directories, we run ./configure. What's confusing is that you were able to run ./configure in one of those SAPI directories but not in another: they should both have been copied from the same place! If one SAPI directory is missing a ./configure script, the other should be too.
(In reply to Michael Orlitzky from comment #13) >If one SAPI directory is missing a ./configure script, the > other should be too. Does by any chance parallel build, eg -j4 or -j5 causes it ?
(In reply to Toralf Förster from comment #14) > (In reply to Michael Orlitzky from comment #13) > >If one SAPI directory is missing a ./configure script, the > > other should be too. > > Does by any chance parallel build, eg -j4 or -j5 causes it ? I can't really swear that it's not, since obviously my understanding of what should be happening and what are actually happening are quite different. But, the source-tree copying and SAPI-specific ./configure runs all happen in a "for" loop in src_configure(). Nothing has run in parallel at that point.
If it is worth I could add few more code lines to the tinderbox for this case - but I need to know, which files/info you like to collect for this pacakge.
Interestingly enough, unmerging and re-emerging the packages seems to fix it. At least in my case.
(In reply to Toralf Förster from comment #16) > If it is worth I could add few more code lines to the tinderbox for this > case - but I need to know, which files/info you like to collect for this > pacakge. Thanks for the offer, but I don't even know what to look for. There should be a configure script in each of the SAPI subdirectories. If I could reproduce it, I would probably start by adding echo statements to the ebuild to see where they go missing: are they in the SAPI directories after the cp -a, but missing when we later try to run ./configure? Or, if they're not in the SAPI directories after cp -a, are they still in the source directory after cp -a? Etc. At some point there's at least one working configure script, because it gets run. And then at a later point, it isn't where we expect it to be.
I finally reproduced this, and it happened twice in a row, and now has me questioning my sanity. I added some einfo statements, so I know exactly what happened: first the "embed" SAPI was ./configure'd, and then... * Current SAPI: cli * Copying sources to /var/lib/portage/tmp/portage/dev-lang/php-8.2.8/work/sapis-build/cli * Running ./configure in /var/lib/portage/tmp/portage/dev-lang/php-8.2.8/work/sapis-build/cli * ERROR: dev-lang/php-8.2.8::gentoo failed (configure phase): * no configure script found So now I can actually look in that directory: $ sudo ls -lh /var/lib/portage/tmp/portage/dev-lang/php-8.2.8/work/sapis-build/cli total 24K drwxr-xr-x 2 portage portage 4.0K Jul 27 09:06 TSRM drwxr-xr-x 3 portage portage 4.0K Jul 27 09:06 Zend drwxr-xr-x 68 portage portage 4.0K Jul 27 09:06 ext drwxr-xr-x 3 portage portage 4.0K Jul 27 09:06 main drwxr-xr-x 17 portage portage 4.0K Jul 27 09:06 php-8.2.8 drwxr-xr-x 3 portage portage 4.0K Jul 27 09:06 sapi That's the result of, cp -a "${S}" "${BUILD_DIR}" where the last component of $S is "php-8.2.8". So, it looks like "${BUILD_DIR}" already exists when the call to "cp" is made, causing $S to be copied UNDER the new build directory, rather than TO it. But how ${WORKDIR}/sapis-build/cli gets created before we've finished running ./configure in ${WORKDIR}/sapis-build/embed is a mystery to me.
Before the call to, cp -a "${S}" "${BUILD_DIR}" the contents of $BUILD_DIR (which shouldn't exist yet) are, # find ./ -type f ./ext/ctype/ctype.gcda ./ext/reflection/php_reflection.gcda ./ext/sockets/sockaddr_conv.gcda ./ext/sockets/conversions.gcda ./ext/sockets/sockets.gcda ... that is, all *.gcda files. This means something but who knows what.
It looks like the problem is USE=coverage on the EXISTING /usr/bin/php (not the one being built). Somehow the path to portage's temporary $WORKDIR is hard-coded, and the CLI workdir gets populated when the pre-existing CLI php is detected or run or whatever. I'll do two things to fix it: 1. Disable USE=coverage. The option says "FOR DEVELOPERS ONLY!!", and it only works with GCC anyway. Not really something I want to maintain for end users. 2. Hide any existing /usr/bin/php from ./configure. It can't be necessary, and only squares the number of configurations that we have to worry about w.r.t. weird edge cases like this.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=615036dd66eb3c0a2cf6ef45b4535fe235235108 commit 615036dd66eb3c0a2cf6ef45b4535fe235235108 Author: Michael Orlitzky <mjo@gentoo.org> AuthorDate: 2023-07-27 17:24:15 +0000 Commit: Michael Orlitzky <mjo@gentoo.org> CommitDate: 2023-07-31 00:49:12 +0000 dev-lang/php: disable USE=coverage and hide /usr/bin/php. Code coverage is "FOR DEVELOPERS ONLY!!", and requires GCC. It's not really something we want to support for end users, and it's contributing to bug 900210, so now it's gone. The rest of that bug is caused by PHP's ./configure script detecting an already-installed PHP (at /usr/bin/php) and running it. Obviously PHP isn't needed to build itself, so allowing it to detect and (apparently) run an existing installation is only multiplying the insane number of configurations we already support. To avoid that in the future (and to fix bug 900210 right now), we hide the system "php" by overriding its cache variable during ./configure. Closes: https://bugs.gentoo.org/900210 Signed-off-by: Michael Orlitzky <mjo@gentoo.org> dev-lang/php/{php-8.2.8.ebuild => php-8.2.8-r1.ebuild} | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)