Bug 20 - symlink grep -> /bin/egrep may cause configure to lie
symlink grep -> /bin/egrep may cause configure to lie
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.6.3
Sun Solaris 2.x
: normal normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2001-01-11 10:23 MST by David Thompson
Modified: 2001-12-12 18:30 MST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Thompson 2001-01-11 10:23:36 MST
In ~/bin I have grep as a symbolic link to /bin/egrep.  (I have found this
symlink to be more thorough than using an alias, and I've found it rather
common among my peers.)  This causes configure to lie about the availability of
certain header files, in particular this symlink causes configure to think
header paths.h *is* available, when in fact it is not.  The culprit is a grep
command that is used to detect the compiler error indicating the header was not
found.  Specificly, approx lineno 4893 produces errorenous results if grep is
symlinked to egrep,

    ac_err=`grep -v '^ *+' conftest.out`

I would think a simple solution is for autoconf to generate configure scripts
that locate grep on some standard PATH automatically, ie,

    grep=/bin/grep
    ac_err=`$grep -v '^ *+' conftest.out`

Also, you need to add configure as Component to this web page.

Thank you.
Comment 1 Todd C. Miller 2001-12-12 14:30:59 MST
Grep and egrep use different regular expressions (grep basic and egrep extended).  Linking
grep to egrep is just a bad idea, period.  However, the current version of autoconf eschews grep
for egrep in most cases so this won't be a problem in sudo 1.6.4 when it is released.