Page 1 of 1

PHP UUID extension

Posted: Thu May 05, 2011 11:47 am
by breun
I'd like to request a package for the PHP PECL UUID extension: http://pecl.php.net/package/uuid

The EPEL repository has a package for this extension called uuid-php, but it contains the extension for the default CentOS PHP distribution (and lacks a configuration file to load the extension).

The EPEL src RPM for the uuid package is here if that helps: http://download.fedora.redhat.com/pub/e ... l5.src.rpm The uuid and uuid-* packages are all built from the same spec file.

Re: PHP UUID extension

Posted: Sun May 15, 2011 10:10 am
by breun
I've tried to install the PHP UUID extension for PHP 5.3.6 (Atomic packages), but both rebuilding the EPEL src rpm and installing through pecl fail.

Rebuilding the EPEL src rpm:
# wget http://download.fedora.redhat.com/pub/e ... l5.src.rpm
(...)
# rpmbuild --rebuild uuid-1.5.1-3.el5.src.rpm
(...)
configure: creating libtool
appending configuration tag "CXX" to libtool
appending configuration tag "F77" to libtool
configure: creating ./config.status
config.status: creating config.h
+ sed -i -e '/^LDFLAGS =/s/-Wl,-rpath,[^[:space:]]*//' Makefile
+ make LIBTOOL=/usr/bin/libtool -j8
/usr/bin/libtool --mode=compile cc -I. -I/usr/src/redhat/BUILD/uuid-1.5.1/php -DPHP_ATOM_INC -I/usr/src/redhat/BUILD/uuid-1.5.1/php/include -I/usr/src/redhat/BUILD/uuid-1.5.1/php/main -I/usr/src/redhat/BUILD/uuid-1.5.1/php -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/src/redhat/BUILD/uuid-1.5.1/php/.. -DHAVE_CONFIG_H -O2 -g -m64 -mtune=generic -I.. -L.. -L../.libs -c /usr/src/redhat/BUILD/uuid-1.5.1/php/uuid.c -o uuid.lo
libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'
make: *** [uuid.lo] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.29264 (%build)


RPM build errors:
user mockbuild does not exist - using root
group mockbuild does not exist - using root
user mockbuild does not exist - using root
group mockbuild does not exist - using root
user mockbuild does not exist - using root
group mockbuild does not exist - using root
Bad exit status from /var/tmp/rpm-tmp.29264 (%build)
Installing the extension via pecl:
# yum install uuid-devel
(...)
# rpm -ql uuid-devel | grep include
/usr/include/uuid.h
# pecl install uuid
(...)
checking uuid/uuid.h usability... no
checking uuid/uuid.h presence... no
checking for uuid/uuid.h... no
configure: error: 'uuid/uuid.h' header not found
ERROR: `/var/tmp/uuid/configure --with-uuid' failed
Any idea how I can get either method to succeed?

Re: PHP UUID extension

Posted: Sun May 15, 2011 5:17 pm
by faris
Looks like the PECL method is looking for uuid.h somewhere other than /usr/include.

Try copying it to /usr/include/uuid/ or similar possibilities?

(82 RPMs put it in /usr/include/uuid/uuid.h according to http://rpmfind.net/linux/rpm2html/searc ... d%2Fuuid.h so I think there's a reasonable chance it might work)

Re: PHP UUID extension

Posted: Sun May 15, 2011 6:18 pm
by scott
For future reference:

yum provides */uuid.h

On el5 its this:
e2fsprogs-devel-1.39-23.el5_5.1.i386 : Ext2/3 filesystem-specific static libraries and headers


and on Fedora 14:
libuuid-devel-2.18-4.8.fc14.x86_64 : Universally unique ID library

best way to check with a backport is always to use provides, or if you really have to Requires: /path/to/file in the .spec

Re: PHP UUID extension

Posted: Mon May 16, 2011 3:32 am
by breun
Thanks for that, after installing e2fsprogs-devel I was finally able to build the uuid extension through pecl.