Bug 9863 - [3.4 Regression] Absence of awk isn't properly diagnosed at configure time
Summary: [3.4 Regression] Absence of awk isn't properly diagnosed at configure time
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 3.2.2
: P3 critical
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords: build
Depends on:
Blocks:
 
Reported: 2003-02-26 14:26 UTC by Hans-Peter Nilsson
Modified: 2004-01-17 04:22 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2003-08-09 13:51:24


Attachments
Patch to bail out if awk is missing (368 bytes, patch)
2003-10-24 20:37 UTC, Nathanael C. Nerode
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hans-Peter Nilsson 2003-02-26 14:26:00 UTC
During configure:
...
checking for GNU C library... yes
checking for mawk... no           
checking for gawk... no       
checking for nawk... no       
checking for awk... no     
checking whether ln works... yes
...
Still, configure continues.  Build fails with unfriendly message:
if [ -f ranlib ] || ( [ cris-axis-linux-gnu = cris-axis-linux-gnu ] && [ -f /usr/bin/ranlib -o -f /b
  ranlib ./libgcc_eh.a ; \                                                                          
else true; fi;                                                                                      
{ nm -pg  libgcc/./_muldi3.o libgcc/./_negdi2.o libgcc/./_lshrdi3.o libgcc/./_ashldi3.o libgcc/./_as
  cat /usr/local/tmp/gcc-3.2.2/gcc/libgcc-std.ver | sed -e "/^[         ]*#/d" -e 's/^%\(if\|else\|e
  | ./xgcc -B./ -B/usr/local/tmp/p/cris-axis-linux-gnu/bin/ -isystem /usr/local/tmp/p/cris-axis-linu
} |  -f /usr/local/tmp/gcc-3.2.2/gcc/mkmap-symver.awk  > libgcc/./tmp-libgcc.map
-f: not found                                    
make[3]: *** [libgcc/./libgcc.map] Error 127     

when attempting to use $AWK while building the linker map for libgcc.so

Release:
gcc-3.2.2, probably all

Environment:
Any GNU/Linux environment with awk uninstalled.

How-To-Repeat:
Uninstall all awk (gawk, nawk, awk).
Configure.  Attempt bootstrap.
Comment 1 Hans-Peter Nilsson 2003-02-26 14:26:00 UTC
Fix:
Check $AWK in gcc/configure.in after AC_PROG_AWK call;
bail out with error message if empty.
(At user level: install gawk. :-)
Comment 2 Dara Hazeghi 2003-05-26 22:40:17 UTC
Hello,

I can confirm that on gcc 3.3 branch and mainline configure.in still lacks a provision to exit if 
AC_PROG_AWK fails. Hans, would it be possible for you to make a patch for this? Thanks,

Dara
Comment 3 Andrew Pinski 2003-05-26 22:41:52 UTC
See Dara's question, and make sure that the patch goes to gcc-patches@gcc.gnu.org 
also.
Comment 4 hans-peter.nilsson@axis.com 2003-06-02 14:33:56 UTC
Subject: Re:  Absence of awk isn't properly diagnosed at configure time

> Date: 26 May 2003 22:40:17 -0000
> From: "dhazeghi@yahoo.com" <gcc-bugzilla@gcc.gnu.org>

> I can confirm that on gcc 3.3 branch and mainline configure.in still lacks a provision to exit if 
> AC_PROG_AWK fails. Hans, would it be possible for you to make a patch for this? Thanks,

Of course.  Though no time-frame given, deliberately.

brgds, H-P
Comment 5 Dara Hazeghi 2003-06-02 17:22:58 UTC
Shouldn't be in waiting.
Comment 6 Andrew Pinski 2003-08-09 13:51:23 UTC
Now on the mainline we require awk for generating the $(lang)-opt-*.{c,h} file we should 
now fail on configure time.
Comment 7 Andrew Pinski 2003-08-23 01:57:48 UTC
Really this is a regression for targets that did not use ld maps, on the mainline awk is used by the 
option handling now so if 3.3 was able to compile without awk, now it will fail so making this a 
regression.
Comment 8 Nathanael C. Nerode 2003-10-24 20:37:31 UTC
Created attachment 4990 [details]
Patch to bail out if awk is missing
Comment 9 Nathanael C. Nerode 2003-10-31 09:58:51 UTC
I believe this is fixed by my recent commit.  Confirmation welcome.  :-)

Comment 10 GCC Commits 2003-10-31 09:58:52 UTC
Subject: Bug 9863

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	neroden@gcc.gnu.org	2003-10-31 09:58:47

Modified files:
	gcc            : ChangeLog configure configure.in 

Log message:
	PR bootstrap/9863
	* configure.in: Bail out if awk is missing.
	* configure: Regenerate.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.1614&r2=2.1615
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/configure.diff?cvsroot=gcc&r1=1.768&r2=1.769
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/configure.in.diff?cvsroot=gcc&r1=1.748&r2=1.749