I have the following problem when trying to install PHP. It appears as if instdso.sh fails to create libphp5.so (I'm not 100% sure what instdso.sh does); but the libphp5.so library is built and is accessible inside the PHP emerge work directory. My system performs a nightly sync is fully upto date (emerge --deep --newuse --update world). * Installing SAPI(s) cli cgi apache2 * * Installing CLI SAPI * Setting extension_dir in php.ini * Securing fopen wrappers * Setting correct include_path * Installing CGI SAPI * Setting extension_dir in php.ini * Securing fopen wrappers * Setting correct include_path * Installing Apache2 SAPI Installing PHP SAPI module: apache2handler /usr/lib64/apache2/build/instdso.sh SH_LIBTOOL='/usr/share/apr-0/build/libtool' libphp5.la /home/gentoo/temp/portage/php-5.1.4-r6/image//usr/lib64/apache2/modules echo chmod 755 /home/gentoo/temp/portage/php-5.1.4-r6/image//usr/lib64/apache2/modules/libphp5.so chmod: cannot access `/home/gentoo/temp/portage/php-5.1.4-r6/image//usr/lib64/apache2/modules/libphp5.so': No such file or directory apxs:Error: Command failed with rc=65536 . make: *** [install-sapi] Error 1 !!! ERROR: dev-lang/php-5.1.4-r6 failed. Call stack: ebuild.sh, line 1543: Called dyn_install ebuild.sh, line 1017: Called src_install php-5.1.4-r6.ebuild, line 387: Called die !!! Unable to install apache2 SAPI !!! If you need support, post the topmost build error, and the call stack if relevant. --- libphp5.so exists in the work directory: /home/gentoo/temp/portage/php-5.1.4-r6/work/php-5.1.4/libs/libphp5.so but there is noting in the modules directory: /home/gentoo/temp/portage/php-5.1.4-r6/image//usr/lib64/apache2/modules If I perform the emerge via ebuild I can copy the library over prior to the final qmerge(?) and it works, but this is not ideal.
Created attachment 94243 [details] emerge --info emerge --info
I've found the cause of the problem, it was as a direct result of using the Bash pre-exec patch. This patch sets the variable CMD to be equal to the command that is being executing. Unfortunately /usr/lib64/apache2/build/instdso.sh uses this variable internally. If I replace CMD with CMDD in instdso.sh I am able to install PHP without problem. As the pre-exec patch is not, unfortunately, in the set of patches that Gentoo applies to Bash this bug is completely user induced and therefore invalid.