Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 143890 - Emerging PHP fails when PHP doesn't install libphp5.so in the image directory
Summary: Emerging PHP fails when PHP doesn't install libphp5.so in the image directory
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-14 09:00 UTC by Rob K
Modified: 2006-09-03 06:10 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info,8.16 KB, text/plain)
2006-08-14 09:02 UTC, Rob K
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rob K 2006-08-14 09:00:02 UTC
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.
Comment 1 Rob K 2006-08-14 09:02:01 UTC
Created attachment 94243 [details]
emerge --info

emerge --info
Comment 2 Rob K 2006-09-03 06:10:35 UTC
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.