php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28496 Fatal Error in the make install caused by broken egrep
Submitted: 2004-05-23 15:33 UTC Modified: 2005-06-07 01:00 UTC
Votes:15
Avg. Score:4.7 ± 0.7
Reproduced:14 of 15 (93.3%)
Same Version:6 (42.9%)
Same OS:11 (78.6%)
From: rehanann at kfupm dot edu dot sa Assigned: sniper (profile)
Status: No Feedback Package: Compile Failure
PHP Version: 5CVS, 4CVS OS: Aix 5.2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2004-05-23 15:33 UTC] rehanann at kfupm dot edu dot sa
Description:
------------
Please try to solve this error in PHP 4.3.6. I try lot of latest snapshots but still no use. 

configure options:
CC="gcc" CFLAGS="-D_THREAD_SAFE" ./configure --with-apxs2=/usr/local/apache2/bin/apxs --disable-all

Reproduce code:
---------------
Installing PHP SAPI module:       apache2handler
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp4.la /usr/local/apache2/modules
rm -f /usr/local/apache2/modules/libphp4.so
/usr/local/apache2/build/libtool --mode=install cp libphp4.la /usr/local/apache2/modules/
cp .libs/libphp4.a /usr/local/apache2/modules/libphp4.a
cp .libs/libphp4.lai /usr/local/apache2/modules/libphp4.la
libtool: install: warning: remember to run `libtool --finish /tmp/horde/php-4.3.5/libs'
chmod 755 /usr/local/apache2/modules/libphp4.so
chmod: /usr/local/apache2/modules/libphp4.so: A file or directory in the path name does not exist.
apxs:Error: Command failed with rc=65536
.
make: 1254-004 The error code from the last command is 1.


Stop.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-27 05:43 UTC] sjungels at adelphia dot net
I tracked this bug down to a faulty version of GNU grep.  If you are having problems where no libphp4.so is generated, this may be the cause in your case also.

If you have this problem you will notice the following symptoms: during the part of the php configure log that begins "performing libtool configuration..." you will see the following (or similar) messages:
  checking if the linker (/usr/powerpc-hardhat-linux/bin/ld) is GNU ld... no
  checking whether the linker (/usr/powerpc-hardhat-linux/bin/ld) supports shared libraries... no
  checking if libtool supports shared libraries... no
  checking whether to build shared libraries... no
  checking whether to build static libraries... yes

These messages may be correct, but if you have the problem I am describing, they are caused by a bad version of grep.  Check for this by typing
  if echo GNU | egrep '(GNU|BFD)' >/dev/null; then echo "Good egrep"; else echo "Bad egrep"; fi 

If you get back "Bad egrep" you are running a version of egrep which doesn't really support extended regular expressions, and this is confusing the php configure script.  You can fix the problem by installing GNU grep 2.5.

If you have this problem, it will have effected apache also (even though it seems to work, it is statically compiled and probably won't work with DSOs), so after installing the new grep you will have to rebuild apache and PHP

Note to whoever wrote the configure script: this issue is verified on only the Buffalo Linkstation, but indications are that it may apply to all versions of GNU grep 2.4.2 and earlier.  You can save PHP users hours of frustration by not relying on egrep in your scripts.  One workaround is to use grep -E.
 [2005-02-21 20:00 UTC] sniper@php.net
There is no check for broken grep in our configure yet..

 [2005-04-13 13:57 UTC] zahraoui at netcourrier dot com
i have the same pb with aix 5.1 and both php 4.3.11 and php 5.0.4 on apache 2.0.53

bash-2.05b# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/mysql --with-config-file-path=/usr/local/apache2/conf --with-ftp --with-zlib --with-system-regex 
...
Configuring libtool
checking for Cygwin environment... no
checking for mingw32 environment... no
checking build system type... powerpc-ibm-aix5.1.0.0
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking for a sed that does not truncate output... /usr/bin/sed
checking how to recognise dependent libraries... pass_all
checking for object suffix... o
checking for executable suffix... no
checking command to parse /usr/bin/nm -B output... ok
checking for ranlib... ranlib
checking for strip... strip
checking for objdir... .libs
checking for gcc option to produce PIC... none
checking if gcc static flag -static -Wl,-lC works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking whether the linker (/usr/bin/ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking dynamic linker characteristics... aix5.1.0.0 ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
...
bash-2.05b# make
... 
Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).
bash-2.05b# make install
Installing PHP SAPI module:       apache2handler
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp4.la /usr/local/apache2/modules
rm -f /usr/local/apache2/modules/libphp4.so
/usr/local/apache2/build/libtool --mode=install cp libphp4.la /usr/local/apache2/modules/
cp .libs/libphp4.a /usr/local/apache2/modules/libphp4.a
cp .libs/libphp4.lai /usr/local/apache2/modules/libphp4.la
libtool: install: warning: remember to run `libtool --finish /usr/sys/inst.images/php-4.3.11/libs'
chmod 755 /usr/local/apache2/modules/libphp4.so
chmod: /usr/local/apache2/modules/libphp4.so: A file or directory in the path name does not exist.
apxs:Error: Command failed with rc=65536
.
make: 1254-004 The error code from the last command is 1.


Stop.
bash-2.05b# if echo GNU | egrep '(GNU|BFD)' >/dev/null; then echo "Good egrep"; else echo "Bad egrep"; fi
Good egrep
 [2005-05-30 15:00 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-06-03 18:06 UTC] kallstrk at prtel dot com
I have the same problems.  However, both php4 & php5 compile/install just fine with apache_1.3.33 using AIX 5.1.  Maybe a problem with apxs2?
 [2005-06-07 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Feb 29 00:01:28 2024 UTC