Re: [PHP-INSTALL] Re: build fails: conflict over /tmp/pear/cache - workaround

[email protected] (Ofer Inbar)
Newsgroups php.install
Organization American Association Against Acronym Abuse
Message-ID <[email protected]>
Sriram Natarajan <[email protected]> wrote:
> Did you try exporting PHP_PEAR_TEMP_DIR and PHP_PEAR_CACHE_DIR 
> environment variables to a different location before building with 
> '--with-pear' option

PHP_PEAR_TEMP_DIR seemed to have no effect.

PHP_PEAR_CACHE_DIR did the trick.  It used that directory during the
build, but after I installed it, it no longer seems to be using it,
which is exactly what I wanted.

My rpm .spec file now has these commands in it:
 mkdir -p $RPM_BUILD_ROOT/pearcache
 make INSTALL_ROOT=$RPM_BUILD_ROOT PHP_PEAR_CACHE_DIR=$RPM_BUILD_ROOT/pearcache install
 rm -rf $RPM_BUILD_ROOT/pearcache

... and that successfully builds PHP with PEAR even when it has no
permissions to /tmp/pear/cache.

I saw no mention of either of these environment variable names in any
PHP or PEAR documentation, or in the Makefiles.  Now that I know it
works, I tried to see if it occurs anywhere in the unpacked tar file,
and the only hit is:

>grep PHP_PEAR_CACHE_DIR */*
Binary file pear/install-pear-nozlib.phar matches

... but the next person who encounters this problem will hopefully
find this message when they Google for it.

Thank you!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.