Permissions problem that's driving me crazy

Klaus Steden klaus.steden at dreamhost.com
Sun Jun 7 00:40:13 UTC 2015


Hi there,

I'm trying to build a version of PHP and I am currently beating my head
against the wall trying to sort out how to fix a problem.

Basically, the PHP configure script can't figure out where to find 'gmp.h',
which on an Ubuntu Trusty environment is in /usr/include/x86_64-linux-gnu

What I'm trying to do is get the debian/rules file to do this, to keep
configure happy:

        test -d /usr/include/x86_64-linux-gnu && install -v
/usr/include/x86_64-linux-gnu/gmp.h /usr/include

In automatic mode, it does this:

...
test -d /usr/include/x86_64-linux-gnu && install -v
/usr/include/x86_64-linux-gnu/gmp.h /usr/include
'/usr/include/x86_64-linux-gnu/gmp.h' -> '/usr/include/gmp.h'
install: cannot create regular file '/usr/include/gmp.h': Permission denied
make[1]: *** [override_dh_auto_configure] Error 1
make[1]: Leaving directory `/tmp/buildd/php55-5.5.21'
make: *** [binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit
status 2
E: Failed autobuilding of package
...

but if I use the C10shell hook and try it in the shell environment
post-failure:

...
root at builder:~/php55-5.5.21# test -d /usr/include/x86_64-linux-gnu &&
install -v /usr/include/x86_64-linux-gnu/gmp.h /usr/include
'/usr/include/x86_64-linux-gnu/gmp.h' -> '/usr/include/gmp.h'
root at builder:~/php55-5.5.21# ls -l /usr/include/gmp.h
-rwxr-xr-x 1 root root 79877 Jun  7 00:28 /usr/include/gmp.h
...

If I put diagnostic id and pwd commands in the step immediately proceeding
the failed install command, they look like what I should expect (and what
should work):

...
mkdir -p /tmp/buildd/php55-5.5.21/debian/php55/usr/lib/
id -a
uid=0(root) gid=0(root) groups=0(root),1234(pbuilder)
pwd
/tmp/buildd/php55-5.5.21
test -d /usr/include/x86_64-linux-gnu && install -v
/usr/include/x86_64-linux-gnu/gmp.h /usr/include
...

What gives? Am I attempting something that isn't supposed to work? Did I
miss an environment variable, or something else?

thanks,
Klaus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pbuilder-maint/attachments/20150606/7fa1a244/attachment.html>


More information about the Pbuilder-maint mailing list