php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44354 PEAR:Build fails due to permissions on /tmp/pear/cache from existing install
Submitted: 2008-03-06 21:41 UTC Modified: 2008-11-03 01:00 UTC
Votes:4
Avg. Score:4.0 ± 0.7
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: cos at aaaaa dot org Assigned: cellog (profile)
Status: No Feedback Package: Compile Failure
PHP Version: 5.2.5 OS: RedHat Linux - RHEL 4
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: cos at aaaaa dot org
New email:
PHP Version: OS:

 

 [2008-03-06 21:41 UTC] cos at aaaaa dot org
Description:
------------
I am trying to build PHP 5.2.5 for an RPM, on a system which already 
has PHP 5.2.4 installed (I built that RPM several months ago).  In 
order to build the RPM, I need to make and install into a temporary 
local directory, as an unprivileged user.  The build fails with this 
error:

Installing PEAR environment:      /hlg/rpmbuild/buildroot/php-5.2.5-1-
manual/usr/local/lib/php/download directory "/tmp/pear/cache" is not 
writeable.  Change download_dir config variable to a writeable dir
 ...

... followed by a series of related errors, and resulting in an 
incomplete install tree.

I think this bug someone filed with debian.org is the same problem:
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=463979


Note: php.net directed me to file PEAR-related bugs on the PEAR web 
site; however, their bug system seems to only want bugs about to 
specific pear packages, so this problem did not seem to fit there.

Reproduce code:
---------------
Unpack PHP tarfile.
Configure it with the --with-pear option.

# mkdir -p /rpmbuild/buildroot/php-5.2.5-1-manual/etc/httpd/conf/
# cp -p /etc/httpd/conf/httpd.conf /rpmbuild/buildroot/php-5.2.5-1-manual/etc/httpd/conf/
# make INSTALL_ROOT=/rpmbuild/buildroot/php-5.2.4-4-manual install



Expected result:
----------------
I expect a complete PHP install tree, with PEAR, in 
/rpmbuild/buildroot/php-5.2.5-1-manual/

Actual result:
--------------
Installing PHP SAPI module:       apache2handler
/usr/lib/httpd/build/instdso.sh SH_LIBTOOL='/bin/sh 
/usr/lib/apr/build/libtool' libphp5.la /rpmbuild/buildroot/php-5.2.4-
4-manual/usr/lib/httpd/modules
/bin/sh /usr/lib/apr/build/libtool --mode=install cp libphp5.la 
/rpmbuild/buildroot/php-5.2.4-4-manual/usr/lib/httpd/modules/
cp .libs/libphp5.so /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/lib/httpd/modules/libphp5.so
cp .libs/libphp5.lai /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/lib/httpd/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish 
/home/cos/php-5.2.4/libs'
chmod 755 /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/lib/httpd/modules/libphp5.so
[activating module `php5' in /rpmbuild/buildroot/php-5.2.4-4-
manual/etc/httpd/conf/httpd.conf]
Installing PHP CLI binary:        /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/bin/
Installing PHP CLI man page:      /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/man/man1/
Installing build environment:     /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/lib/php/build/
Installing header files:          /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/include/php/
Installing helper programs:       /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/bin/
  program: phpize
  program: php-config
Installing man pages:             /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/lib/php/
download directory "/tmp/pear/cache" is not writeable.  Change 
download_dir config variable to a writeable dir
[PEAR] Console_Getopt: Cannot initialize 'phar://install-pear-
nozlib.phar/Console_Getopt-1.2.3.tar', invalid or missing package file
download directory "/tmp/pear/cache" is not writeable.  Change 
download_dir config variable to a writeable dir
[PEAR] Archive_Tar: Cannot initialize 'phar://install-pear-
nozlib.phar/Archive_Tar-1.3.2.tar', invalid or missing package file
download directory "/tmp/pear/cache" is not writeable.  Change 
download_dir config variable to a writeable dir
[PEAR] Structures_Graph: Cannot initialize 'phar://install-pear-
nozlib.phar/Structures_Graph-1.0.2.tar', invalid or missing package 
file
download directory "/tmp/pear/cache" is not writeable.  Change 
download_dir config variable to a writeable dir
[PEAR] PEAR: Cannot initialize 'phar://install-pear-nozlib.phar/PEAR-
1.6.1.tar', invalid or missing package file
Installing PDO headers:          /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/include/php/ext/pdo/

(also at http://pastebin.com/f5c6ff39a )

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-06 21:51 UTC] cos at aaaaa dot org
The key, I think, is the INSTALL_ROOT I defined for php's make.

In the past, I believe this affected the pear build as well; now, it 
seems the pear build done by the php Makefile does not look at this, and 
instead uses the same temp dir and subdirectories as it would use at 
runtime, which is what puts it in conflict with what's already installed 
and in use on the system.

However, I can't figure out what changed in PHP such that INSTALL_ROOT 
used to be honored but now isn't.
 [2008-03-14 12:12 UTC] jani@php.net
Assigned to the PEAR manager. :)
 [2008-08-26 18:43 UTC] atomo64 at gmail dot com
At Debian I fixed the problem by passing a custom dir via 
PHP_PEAR_DOWNLOAD_DIR.

So:
make INSTALL_ROOT=/rpmbuild/buildroot/php-5.2.4-4-manual install
would become something like
make PHP_PEAR_DOWNLOAD_DIR="$(CURDIR)/tmp/" 
INSTALL_ROOT=/rpmbuild/buildroot/php-5.2.4-4-manual install
 [2008-10-26 23:23 UTC] jani@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2008-11-03 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Nov 27 12:01:28 2024 UTC