httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Jungels" <>
Subject httpd configure relies on egrep which is broken on some platforms
Date Sat, 27 Nov 2004 07:24:04 GMT

Developers of Apache 1.3 and 2.0 should know that GNU egrep is broken on
some platforms, and on these platforms Apache configure scripts which rely
on egrep produce broken builds of Apache.  Details follow.

When building Apache 2.0, I was unable to build a version with shared
objects even though my compiler and linker support them.  I tracked this
down to a broken version of egrep which was confusing the configure script.

On platforms with this problem the user will notice the following symptoms:
during the part of the configure log that begins "performing libtool
configuration..." the user 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 the platform has the problem I am
describing, they are caused by a bad version of grep.  The user can check
for this by typing
  if echo GNU | egrep '(GNU|BFD)' >/dev/null; then echo "Good egrep";
else echo "Bad egrep"; fi

If "Bad egrep" comes up, the platform is running a version of egrep which
doesn't really support extended regular expressions, and this is confusing
the Apache configure script.  The problem can be fixed by installing GNU
grep 2.5 and then rebuilding Apache.  Apache 1.3.33 also depends on egrep
but fails in a different way.

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 Apache users hours of frustration by not relying on egrep in your
scripts.  One workaround is to use grep -E, or substitute a command like
"egrep '(GNU|with BFD)' with "grep '\(GNU\|with BFD\)'"

Kind regards,


View raw message