From magus@dlrow.dyndns.org  Wed Jul 20 19:46:52 2005
Return-Path: <magus@dlrow.dyndns.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id ACCDA16A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 20 Jul 2005 19:46:52 +0000 (GMT)
	(envelope-from magus@dlrow.dyndns.org)
Received: from dlrow.dyndns.org (h219-110-236-022.catv02.itscom.jp [219.110.236.22])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 489D743D48
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 20 Jul 2005 19:46:52 +0000 (GMT)
	(envelope-from magus@dlrow.dyndns.org)
Received: by dlrow.dyndns.org (Postfix, from userid 999)
	id 46A391FFC19; Thu, 21 Jul 2005 04:46:51 +0900 (JST)
Message-Id: <20050720194651.46A391FFC19@dlrow.dyndns.org>
Date: Thu, 21 Jul 2005 04:46:51 +0900 (JST)
From: KOBAYASHI Hidenobu <kobayasi@pp.iij4u.or.jp>
Reply-To: KOBAYASHI Hidenobu <kobayasi@pp.iij4u.or.jp>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Can not comple /usr/src/lib/msun/amd64/fenv.c at make buildworld.
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         83806
>Category:       amd64
>Synopsis:       Can not compile /usr/src/lib/msun/amd64/fenv.c at make buildworld.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-amd64
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 20 19:50:14 GMT 2005
>Closed-Date:    Mon Nov 28 19:09:57 GMT 2005
>Last-Modified:  Mon Nov 28 19:09:57 GMT 2005
>Originator:     KOBAYASHI Hidenobu
>Release:        FreeBSD 6.0-BETA1 amd64
>Organization:
>Environment:
System: FreeBSD eins.anzahl.local 6.0-BETA1 FreeBSD 6.0-BETA1 #1: Mon Jul 18 02:31:56 JST 2005 magus@eins.anzahl.local:/usr/obj/usr/src/sys/TURION amd64


>Description:
  I can not comple /usr/src/lib/msun/amd64/fenv.c as follow commands.
=== START: COMMAND AND ERROR MESSAGES ===
eins# pwd
/usr/src/lib/msun/amd64
eins# make -f Makefile.inc fenv.o
/usr/local/libexec/ccache/cc -O2 -fno-strict-aliasing -pipe  -c fenv.c
fenv.c:35: warning: braces around scalar initializer
fenv.c:35: warning: (near initialization for `__fe_dfl_env.__control')
fenv.c:35: warning: large integer implicitly truncated to unsigned type
fenv.c:36: warning: excess elements in scalar initializer
fenv.c:36: warning: (near initialization for `__fe_dfl_env.__control')
fenv.c:37: warning: excess elements in scalar initializer
fenv.c:37: warning: (near initialization for `__fe_dfl_env.__control')
fenv.c:38: warning: braces around scalar initializer
fenv.c:38: warning: (near initialization for `__fe_dfl_env.__control')
fenv.c:38: warning: excess elements in scalar initializer
fenv.c:38: warning: (near initialization for `__fe_dfl_env.__control')
fenv.c:38: warning: excess elements in scalar initializer
fenv.c:38: warning: (near initialization for `__fe_dfl_env.__control')
fenv.c:38: warning: excess elements in scalar initializer
fenv.c:38: warning: (near initialization for `__fe_dfl_env.__control')
fenv.c:38: warning: excess elements in scalar initializer
fenv.c:38: warning: (near initialization for `__fe_dfl_env.__control')
fenv.c:38: warning: excess elements in scalar initializer
fenv.c:38: warning: (near initialization for `__fe_dfl_env.__control')
fenv.c:38: warning: excess elements in scalar initializer
fenv.c:38: warning: (near initialization for `__fe_dfl_env.__control')
fenv.c:38: warning: excess elements in scalar initializer
fenv.c:38: warning: (near initialization for `__fe_dfl_env.__control')
fenv.c:39: warning: excess elements in scalar initializer
fenv.c:39: warning: (near initialization for `__fe_dfl_env.__control')
fenv.c:39: warning: excess elements in scalar initializer
fenv.c:39: warning: (near initialization for `__fe_dfl_env.__control')
fenv.c:39: warning: excess elements in scalar initializer
fenv.c:39: warning: (near initialization for `__fe_dfl_env.__control')
fenv.c:39: warning: excess elements in scalar initializer
fenv.c:39: warning: (near initialization for `__fe_dfl_env.__control')
fenv.c:39: warning: excess elements in scalar initializer
fenv.c:39: warning: (near initialization for `__fe_dfl_env.__control')
fenv.c:39: warning: excess elements in scalar initializer
fenv.c:39: warning: (near initialization for `__fe_dfl_env.__control')
fenv.c:39: warning: excess elements in scalar initializer
fenv.c:39: warning: (near initialization for `__fe_dfl_env.__control')
fenv.c:39: warning: excess elements in scalar initializer
fenv.c:39: warning: (near initialization for `__fe_dfl_env.__control')
fenv.c:39: warning: excess elements in scalar initializer
fenv.c:39: warning: (near initialization for `__fe_dfl_env.__control')
fenv.c: In function `fesetexceptflag':
fenv.c:49: error: structure has no member named `__x87'
fenv.c:50: error: structure has no member named `__x87'
fenv.c:51: error: structure has no member named `__x87'
fenv.c:52: error: structure has no member named `__x87'
fenv.c:54: error: structure has no member named `__mxcsr'
fenv.c:55: error: structure has no member named `__mxcsr'
fenv.c:56: error: structure has no member named `__mxcsr'
fenv.c:57: error: structure has no member named `__mxcsr'
fenv.c: In function `fegetenv':
fenv.c:82: error: structure has no member named `__x87'
fenv.c:83: error: structure has no member named `__mxcsr'
fenv.c: In function `feholdexcept':
fenv.c:94: error: structure has no member named `__x87'
fenv.c:96: error: structure has no member named `__mxcsr'
*** Error code 1

Stop in /usr/src/lib/msun/amd64.
=== END: COMMAND AND ERROR MESSAGES ===

So I can not make buildworld.
   
>How-To-Repeat:
  See Description part.

>Fix:
  The cause of the compile error is in the method of the include of fenv.h. 
    Now include /usr/include/fenv.h but include local fenv.h in same directory.
  
  Please apply the following patch.

--- fenv.c.orig Thu Mar 17 04:03:45 2005
+++ fenv.c      Thu Jul 21 04:37:50 2005
@@ -29,7 +29,7 @@
 #include <sys/cdefs.h>
 #include <sys/types.h>
 #include <machine/fpu.h>
-#include <fenv.h>
+#include "fenv.h"

 const fenv_t __fe_dfl_env = {
        { 0xffff0000 | __INITIAL_FPUCW__,

>Release-Note:
>Audit-Trail:

From: KOBAYASHI Hidenobu <kobayasi@pp.iij4u.or.jp>
To: bug-followup@FreeBSD.org
Cc: KOBAYASHI Hidenobu <kobayasi@pp.iij4u.or.jp>
Subject: Re: amd64/83806: Can not comple /usr/src/lib/msun/amd64/fenv.c at make buildworld.
Date: Sun, 24 Jul 2005 12:43:37 +0900

 I correct Fix parts.
 
 >Fix:
 The 1st my report is invalid.
 
 The fact that compiling the fenv.c fails is because the /usr/src/lib/msun/i387/fenv.h is included.
 It is correct for the /usr/src/lib/msun/amd64/fenv.h to be included.
 
 When I install the lib32 with the make installworld,
 the /usr/include/fenv.h is superscribed with the  /usr/src/lib/msun/i387/fenv.h.
 
 --- START: make installworld log---
  ...
 
 ===> lib/msun (install)
 install -C -o root -g wheel -m 444   libm.a /usr/lib
 install -C -o root -g wheel -m 444   libm_p.a /usr/lib
 install -s -o root -g wheel -m 444     libm.so.4 /lib
 ln -fs /lib/libm.so.4  /usr/lib/libm.so
 install -C -o root -g wheel -m 444  /usr/src/lib/msun/amd64/fenv.h /usr/src/lib/msun/src/math.h
 /usr/include
 
  ...
 
 ===> msun (install)
 sh /usr/src/tools/install.sh -C -o root -g wheel -m 444   libm.a /usr/lib32
 sh /usr/src/tools/install.sh -C -o root -g wheel -m 444   libm_p.a /usr/lib32
 sh /usr/src/tools/install.sh -s -o root -g wheel -m 444     libm.so.4 /usr/lib32
 ln -fs libm.so.4 /usr/lib32/libm.so
 sh /usr/src/tools/install.sh -C -o root -g wheel -m 444  /usr/src/lib/msun/i387/fenv.h /usr/src/
 lib/msun/src/math.h /usr/include
 
 --- END: make installworld log ---
 
 Workaround is as follows,
   1. echo "NO_LIB32=yes" >> /etc/make.conf
   2. re-compile and install world.
   3. re-compile and install world. once more.
 
 Best Regards,
 -- 
 KOBAYASHI Hidenobu
 kobayasi@pp.iij4u.or.jp
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Sat Nov 12 17:16:43 GMT 2005 
State-Changed-Why:  
Is this still a problem with the latest 6-STABLE tree? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=83806 
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Mon Nov 14 23:09:33 GMT 2005 
State-Changed-Why:  
Feedback received. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=83806 
State-Changed-From-To: open->patched 
State-Changed-By: ru 
State-Changed-When: Sat Nov 19 07:33:26 GMT 2005 
State-Changed-Why:  
Fixed in 7.0-CURRENT, MFC in 1 week. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=83806 
State-Changed-From-To: patched->closed 
State-Changed-By: ru 
State-Changed-When: Mon Nov 28 19:09:06 GMT 2005 
State-Changed-Why:  
Also fixed in 6.0-STABLE. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=83806 
>Unformatted:
