NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-sparc/44389



The following reply was made to PR port-sparc/44389; it has been noted by GNATS.

From: Mateusz Loskot <mateusz%loskot.net@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: port-sparc/44389
Date: Tue, 18 Jan 2011 11:35:44 +0000

 I have managed to isolate exact command causing the problem.
 
 So, I am trying to install m4 using pkgsrc on NetBSD 5.1/SPARC and with 
 higher debug level, I can trace what is happening:
 
 #################################################################
 # cd /usr/pkgsrc/devel/m4
 # make PKG_DEBUG_LEVEL=2
 ...
 ===> Configuring for m4-1.4.15
 => Modifying GNU configure scripts to avoid --recheck
 : commands for target configure-scripts-override; set -x; set -e;  cd 
 /usr/pkgsrc_work/devel/m4/work/m4-1.4.15; 
                     depth=0; pattern=configure; 
      while test $depth -le 2; do     for file in $pattern; do 
                       test -f "$file" || continue; 
 /usr/bin/awk '/ *-recheck *\| *--recheck.*\)/ { 
 print;                                          print "        : Avoid 
 regenerating within pkgsrc";     print "        exit 0"; 
                   next;                                           } 
                                                    { print }' $file > 
 $file.override;                      /bin/chmod +x $file.override; 
                               /bin/mv -f $file.override $file; 
                        done; 
         depth=`/bin/expr $depth + 1`; pattern="*/$pattern";     done
 + set -e
 + cd /usr/pkgsrc_work/devel/m4/work/m4-1.4.15
 + depth=0
 + pattern=configure
 + test 0 -le 2
 + test -f configure
 + /usr/bin/awk / *-recheck *\| *--recheck.*\)/ { 
   print;                                          print "        : Avoid 
 regenerating within pkgsrc";     print "        exit 0"; 
                   next;                                           } 
                                                    { print } configure
 /usr/bin/awk: floating point exception 8
   input record number 18792, file configure
   source line number 1
 *** Error code 2
 
 Stop.
 make: stopped in /usr/pkgsrc/devel/m4
 #################################################################
 
 
 Context of the line 18792 in m4 ./configure script is:
 
 
 static float
 NaN ()
 {
    static float zero = 0.0f;
    return zero / zero;
 }
 
 
 and AWK is throwing error parsing the "Nan ()" line:
 
 
 #  echo "NaN ()" | /usr/bin/awk '/ *-recheck *\| *--recheck.*\)/ { print; }'
 /usr/bin/awk: floating point exception 8
   source line number 1
 
 
 Eventually, the failing command boils down to this simple form:
 
 
 # echo NaN | awk '{print "test"}'
 awk: floating point exception 8
   source line number 1
 
 
 Obviously, changing NaN to something else makes it working:
 
 
 # echo xNaN | awk '{print "test"}'
 test
 
 
 The problem seems to be with AWK on NetBSD 5.1/SPARC which
 interprets "NaN" as a number when it isn't asked to.
 
 Just to remind, I'm running the system under QEMU and I believe
 this issue is not related to QEMU like it was suggested.
 
 -- 
 Mateusz Loskot, http://mateusz.loskot.net
 Charter Member of OSGeo, http://osgeo.org
 Member of ACCU, http://accu.org
 


Home | Main Index | Thread Index | Old Index