Edit report at http://pear.php.net/bugs/bug.php?id=18040&edit=1
ID: 18040
Updated by: [email protected]
Reported By: treffynnon at php dot net
-Summary: Pyrus pickle generated PECL packages fail at
build/install time
+Summary: Pyrus: pickle generated PECL packages fail at
build/install time
Status: Open
Type: Bug
Package: PEAR
Operating System: Linux: Ubuntu 10.10 Maverick
Package Version: SVN
PHP Version: 5.3.3
Roadmap Versions:
New Comment:
-Summary: Pyrus pickle generated PECL packages fail at
build/install time
+Summary: Pyrus: pickle generated PECL packages fail at
build/install time
Previous Comments:
------------------------------------------------------------------------
[2010-11-10 14:28:27] treffynnon
Description:
------------
Pyrus version 2.0.0a1 SHA-1: E8D2B52B1C5FB9C1F02D753BECEAB96176348F77
When creating a package from the ssdeep PECL extension I attempted to
run `php pyrus.phar pickle`, which completed successfully and produced a
.tgz package as expected.
Subsequently I ran `pecl install ssdeep-1.0.2.tgz` to test building and
installing the extension from the package.
This feedback "ERROR: file
/build/buildd/php5-5.3.3/pear-build-download/ssdeep-1.0.2/examples/example.php
does not exist"
Upon looking in /build/buildd/php5-5.3.3/pear-build-download/ I could
see that there was no ssdeep-1.0.2 directory in there. The build
directory looked like:
ls -lkha /build/buildd/php5-5.3.3/pear-build-download/
total 44K
drwxr-xr-x 5 root root 4.0K Nov 10 12:58 .
drwxr-xr-x 3 root root 4.0K Nov 10 10:42 ..
drwxr-xr-x 2 root root 4.0K Nov 10 10:46 .phar
-rw-r--r-- 1 root root 3.2K Nov 10 12:58 ax_libssdeep.m4
-rw-r--r-- 1 root root 1.2K Nov 10 12:58 config.m4
drwxr-xr-x 2 root root 4.0K Nov 10 12:58 examples
-rw-r--r-- 1 root root 3.3K Nov 10 12:58 package.xml
-rw-r--r-- 1 root root 1.9K Nov 10 12:58 php_ssdeep.h
-rw-r--r-- 1 root root 5.4K Nov 10 12:58 ssdeep.c
drwxr-xr-x 2 root root 4.0K Nov 10 12:58 tests
So it appears that PECL is extracting the files to the wrong location
when a pyrus pickle package is supplied to it.
To get my package to create and build correctly I currently run `php
pyrus.phar pickle --donotpackage` followed by `php pyrus.phar package`.
I have attached two files to this report one generated by each method so
you can see the difference. The source for ssdeep is available via PECL
SVN.
Test script:
---------------
# Just in case ssdeep has been installed before we don't want PECL
getting confused and attempting to use the wrong ssdeep files
rm -rf /build/buildd/php5-5.3.3/pear-build-download/*
php pyrus.phar pickle
pecl install ssdeep-1.0.2.tgz
Expected result:
----------------
4 source files, building
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
building in /var/tmp/pear-build-root/ssdeep-1.0.2
running: /tmp/pear/temp/ssdeep/configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5
-I/usr/include/php5/main -I/usr/include/php5/TSRM
-I/usr/include/php5/Zend -I/usr/include/php5/ext
-I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
checking for PHP extension directory... /usr/lib/php5/20090626+lfs
checking for PHP installed headers prefix... /usr/include/php5
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to
regenerate PHP parsers.
checking for gawk... gawk
checking for ssdeep support... yes, shared
checking whether to enable build debug output... no
checking for ssdeep... /usr/local/lib
checking for fuzzy_compare in -lfuzzy... yes
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld) supports shared
libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
running: make
/bin/bash /var/tmp/pear-build-root/ssdeep-1.0.2/libtool --mode=compile
cc -I. -I/tmp/pear/temp/ssdeep -DPHP_ATOM_INC
-I/var/tmp/pear-build-root/ssdeep-1.0.2/include
-I/var/tmp/pear-build-root/ssdeep-1.0.2/main -I/tmp/pear/temp/ssdeep
-I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM
-I/usr/include/php5/Zend -I/usr/include/php5/ext
-I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/local/include -DHAVE_CONFIG_H -g -O2
-c /tmp/pear/temp/ssdeep/ssdeep.c -o ssdeep.lo
libtool: compile: cc -I. -I/tmp/pear/temp/ssdeep -DPHP_ATOM_INC
-I/var/tmp/pear-build-root/ssdeep-1.0.2/include
-I/var/tmp/pear-build-root/ssdeep-1.0.2/main -I/tmp/pear/temp/ssdeep
-I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM
-I/usr/include/php5/Zend -I/usr/include/php5/ext
-I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c
/tmp/pear/temp/ssdeep/ssdeep.c -fPIC -DPIC -o .libs/ssdeep.o
/bin/bash /var/tmp/pear-build-root/ssdeep-1.0.2/libtool --mode=link cc
-DPHP_ATOM_INC -I/var/tmp/pear-build-root/ssdeep-1.0.2/include
-I/var/tmp/pear-build-root/ssdeep-1.0.2/main -I/tmp/pear/temp/ssdeep
-I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM
-I/usr/include/php5/Zend -I/usr/include/php5/ext
-I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/local/include -DHAVE_CONFIG_H -g -O2
-o ssdeep.la -export-dynamic -avoid-version -prefer-pic -module -rpath
/var/tmp/pear-build-root/ssdeep-1.0.2/modules ssdeep.lo
-Wl,-rpath,/usr/local/lib -L/usr/local/lib -lfuzzy
libtool: link: cc -shared .libs/ssdeep.o -L/usr/local/lib
/usr/local/lib/libfuzzy.so -Wl,-rpath -Wl,/usr/local/lib -Wl,-soname
-Wl,ssdeep.so -o .libs/ssdeep.so
libtool: link: ( cd ".libs" && rm -f "ssdeep.la" && ln -s "../ssdeep.la"
"ssdeep.la" )
/bin/bash /var/tmp/pear-build-root/ssdeep-1.0.2/libtool --mode=install
cp ./ssdeep.la /var/tmp/pear-build-root/ssdeep-1.0.2/modules
libtool: install: cp ./.libs/ssdeep.so
/var/tmp/pear-build-root/ssdeep-1.0.2/modules/ssdeep.so
libtool: install: cp ./.libs/ssdeep.lai
/var/tmp/pear-build-root/ssdeep-1.0.2/modules/ssdeep.la
libtool: finish:
PATH="/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/sbin"
ldconfig -n /var/tmp/pear-build-root/ssdeep-1.0.2/modules
----------------------------------------------------------------------
Libraries have been installed in:
/var/tmp/pear-build-root/ssdeep-1.0.2/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Build complete.
Don't forget to run 'make test'.
running: make
INSTALL_ROOT="/var/tmp/pear-build-root/install-ssdeep-1.0.2" install
Installing shared extensions:
/var/tmp/pear-build-root/install-ssdeep-1.0.2/usr/lib/php5/20090626+lfs/
running: find "/var/tmp/pear-build-root/install-ssdeep-1.0.2" | xargs ls
-dils
1318915 4 drwxr-xr-x 3 root root 4096 Nov 10 13:19
/var/tmp/pear-build-root/install-ssdeep-1.0.2
1318939 4 drwxr-xr-x 3 root root 4096 Nov 10 13:19
/var/tmp/pear-build-root/install-ssdeep-1.0.2/usr
1318940 4 drwxr-xr-x 3 root root 4096 Nov 10 13:19
/var/tmp/pear-build-root/install-ssdeep-1.0.2/usr/lib
1318941 4 drwxr-xr-x 3 root root 4096 Nov 10 13:19
/var/tmp/pear-build-root/install-ssdeep-1.0.2/usr/lib/php5
1318942 4 drwxr-xr-x 2 root root 4096 Nov 10 13:19
/var/tmp/pear-build-root/install-ssdeep-1.0.2/usr/lib/php5/20090626+lfs
1318938 32 -rwxr-xr-x 1 root root 29829 Nov 10 13:19
/var/tmp/pear-build-root/install-ssdeep-1.0.2/usr/lib/php5/20090626+lfs/ssdeep.so
Build process completed successfully
Installing '/usr/lib/php5/20090626+lfs/ssdeep.so'
install ok: channel://pecl.php.net/ssdeep-1.0.2
configuration option "php_ini" is not set to php.ini location
You should add "extension=ssdeep.so" to php.ini
Actual result:
--------------
ERROR: file
/build/buildd/php5-5.3.3/pear-build-download/ssdeep-1.0.2/examples/example.php
does not exist
------------------------------------------------------------------------