php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14588 --with-bz2 doesn't listen to =dir
Submitted: 2001-12-18 13:39 UTC Modified: 2002-01-20 20:55 UTC
From: rabidfly at hotmail dot com Assigned:
Status: Closed Package: Bzip2 Related
PHP Version: 4.1.0 OS: linux 2.4.16 - redhat 6.2
Private report: No CVE-ID:
 [2001-12-18 13:39 UTC] rabidfly at hotmail dot com
I compile bzip2 1.0.1 (the latest) and install it into a directory /www

Then try to compile php as so

./configure \
    --prefix=/www \
    --with-config-file-path=/www/apache/conf \
    --with-apache=../apache_1.3.22 \
    --disable-debug \
    --enable-trans-id \
    --enable-ftp \
    --with-imap=/www \
    --with-mysql=/usr \
    --with-pgsql=/usr \
    --with-sybase=/www \
    --with-mcrypt \
    --with-mhash \
    --with-zlib=/www \
    --with-bz2=/www \
    --with-gd=/www \
    --with-freetype-dir=/www \
    --with-png-dir=/www \
    --with-jpeg-dir=/www \
    --enable-track-vars
    make
    make install

It fails while compiling in Bzip2 support. I don't have the exact errors to post because I deleted my compile log, but they are the same errors you get if you don't have the bzip2 development libraries installed, which of course I do in /www

Errors along the lines of:

undefined reference to BZ2_open unknown function

therefore this leads me to believe it's ignoring =/www Because the bzip2 packages for redhat 6.2 do not have the needed files.

fyi - in case I haven't been clear, if I go back to php-4.0.6 everything is fine.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-18 13:46 UTC] derick@php.net
Please recompile so that you can tell us te exact errors.

Derick
 [2001-12-18 13:58 UTC] rabidfly at hotmail dot com
The php developer who added/maintains bzip2 support will know what I am talking about. I am not going to compile when I know this! It would be a waste of my time.
 [2001-12-18 14:03 UTC] rabidfly at hotmail dot com
ah heck ok I'll recompile, but it's still a waste. I'll go for a coffee. :-)
 [2001-12-19 01:22 UTC] rabidfly at hotmail dot com
The kicker about this problem is that it only shows up when php is being compiled as a CGI. I always compile twice....

Php bzip2 support requires >= 1.0.0

Redhat 6.2 bzip2-0.9.5d-2
Upgradng the stock bzip2 is not an option, there are too many packages that require the shared object files from this version.

When I first tried adding bzip2 support to php I had the same errors as you'll see below.

So to solve this, I installed bzip2-1.0.1 into /www
and told php where it is with --with-bz2=/www
all earlier releases of php 4.X worked fine with this.
Until 4.1.0, which seemingly is trying to use the headers from /usr which brings us back to php-4.1.0 is ignoring =/www for the --with-bz2 compile option.

Redhat 7.0 bzip2-1.0.1-3
This problem doesn't exist.

Redhat 7.1 bzip2-1.0.1-3
This problem doesn't exist.


Ok, here's the error

make[1]: Entering directory `/usr/src/web/build/php-4.1.0'
/bin/sh /usr/src/web/build/php-4.1.0/libtool --silent --mode=link gcc -I. -I/usr/src/web/build/php-4.1.
0/ -I/usr/src/web/build/php-4.1.0/main -I/usr/src/web/build/php-4.1.0 -I/usr/src/web/build/php-4.1.0/Ze
nd -I/www/include -I/www/include/freetype2/freetype -I/usr/include/mysql -I/usr/src/web/build/php-4.1.0
/ext/xml/expat  -I/usr/src/web/build/php-4.1.0/TSRM -g -O2   -o php -export-dynamic      stub.lo libphp
4.la 
./.libs/libphp4.a(bz2.o): In function `zm_info_bz2':
/usr/src/web/build/php-4.1.0/ext/bz2/bz2.c:97: undefined reference to `BZ2_bzlibVersion'
./.libs/libphp4.a(bz2.o): In function `zif_bzopen':
/usr/src/web/build/php-4.1.0/ext/bz2/bz2.c:127: undefined reference to `BZ2_bzopen'
/usr/src/web/build/php-4.1.0/ext/bz2/bz2.c:132: undefined reference to `BZ2_bzdopen'
./.libs/libphp4.a(bz2.o): In function `zif_bzread':
/usr/src/web/build/php-4.1.0/ext/bz2/bz2.c:171: undefined reference to `BZ2_bzread'
./.libs/libphp4.a(bz2.o): In function `zif_bzwrite':
/usr/src/web/build/php-4.1.0/ext/bz2/bz2.c:211: undefined reference to `BZ2_bzwrite'
./.libs/libphp4.a(bz2.o): In function `zif_bzflush':
/usr/src/web/build/php-4.1.0/ext/bz2/bz2.c:230: undefined reference to `BZ2_bzflush'
./.libs/libphp4.a(bz2.o): In function `zif_bzcompress':
/usr/src/web/build/php-4.1.0/ext/bz2/bz2.c:319: undefined reference to `BZ2_bzBuffToBuffCompress'
./.libs/libphp4.a(bz2.o): In function `zif_bzdecompress':
/usr/src/web/build/php-4.1.0/ext/bz2/bz2.c:370: undefined reference to `BZ2_bzBuffToBuffDecompress'
./.libs/libphp4.a(bz2.o): In function `php_bz2_close':
/usr/src/web/build/php-4.1.0/ext/bz2/bz2.c:391: undefined reference to `BZ2_bzclose'
./.libs/libphp4.a(bz2.o): In function `php_bz2_error':
/usr/src/web/build/php-4.1.0/ext/bz2/bz2.c:411: undefined reference to `BZ2_bzerror'
collect2: ld returned 1 exit status
make[1]: *** [php] Error 1
make[1]: Leaving directory `/usr/src/web/build/php-4.1.0'
make: *** [install-recursive] Error 1


While I have your attention I've got a few unrelated questions.

1) Unix smtp server option was going to be added to 4.0.4, yet has still not been added. Any date set for this?

2) Php compiled as a module and as a cgi was supposed to have been changed so only 1 compile was necessary. Is this still in the plans?

Thanks.

Dan
 [2002-01-20 20:55 UTC] edink@php.net
It seems that this is not a php bug but a problem
with the way libtool works and how RedHat packages
the libraries. There is an easy workaround:

mv /usr/lib/libbz2.la /usr/lib/libbz2.la.old

Then configure and compile php. This should fix
the problem. If it does not, please reopen the report.

To answer your other questions:

1. Have a look at pear/Mail/smtp.php

2. Yes. It's probably going to make it into the next major
   release of php.
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Tue Aug 29 15:01:52 2017 UTC