NetBSD-Bugs archive

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

toolchain/43320: build.sh fails on Cygwin 1.7.2



>Number:         43320
>Category:       toolchain
>Synopsis:       build.sh fails on Cygwin 1.7.2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 18 06:55:00 +0000 2010
>Originator:     Hiroyuki Bessho
>Release:        NetBSD-current as of 2010/May/5
>Organization:
        not so organized
>Environment:
System: CYGWIN_NT-6.0 1.7.2(0.225/5/3) i686
Architecture: i386
Machine: i386
>Description:
        Cross build on Cygwin newer than 2010/Mar/2 fails.
        "build.sh tools" stops with following  messages:

----------------------------------------------------------------
===> build.sh command: ./build.sh -mevbarm tools
===> build.sh started: Mon May 17 14:18:36     2010
===> NetBSD version:   5.99.29
===> MACHINE:          evbarm
===> MACHINE_ARCH:     arm
===> Build platform:   CYGWIN_NT-5.1 1.7.2(0.225/5/3) i686
===> HOST_SH:          /usr/bin/sh
/tmp/GmOYNVTk:3: *** missing separator.  Stop.
===> No $TOOLDIR/bin/nbmake, needs building.
===> Bootstrapping nbmake
checking for sh... /usr/bin/sh
checking for gcc... cc
checking for C compiler default output... a.exe

[[SNIP]]

#      link  mtree/mtree
cc -O -DNO_MD5 -DNO_RMD160 -DNO_SHA1 -DNO_SHA2 
-I/cygdrive/c/work/gt-current2/src/tools/compat/obj.evbarm 
-I/cygdrive/c/work/gt-current2/src/tools/compat/obj.evbarm/include  
-I/cygdrive/c/work/gt-current2/src/tools/mtree/../compat 
-DHAVE_NBTOOL_CONFIG_H=1  -D_FILE_OFFSET_BITS=64  -DMTREE 
-I/cygdrive/c/work/gt-current2/src/sbin/mknod   -o mtree compare.lo crc.lo 
create.lo excludes.lo misc.lo mtree.lo spec.lo verify.lo getid.lo pack_dev.lo 
-L/cygdrive/c/work/gt-current2/src/tools/compat/obj.evbarm -lnbcompat -lz
dependall ===> rpcgen
#    create  rpcgen/rpc_clntout.d
/cygdrive/c/work/gt-current2/src/obj.evbarm/tooldir.CYGWIN_NT-5.1-1.7.2-i686/bin/nbhost-mkdep
 -f rpc_clntout.d --     
-I/cygdrive/c/work/gt-current2/src/tools/compat/obj.evbarm 
-I/cygdrive/c/work/gt-current2/src/tools/compat/obj.evbarm/include  
-I/cygdrive/c/work/gt-current2/src/tools/rpcgen/../compat 
-DHAVE_NBTOOL_CONFIG_H=1  -D_FILE_OFFSET_BITS=64   
/cygdrive/c/work/gt-current2/src/tools/rpcgen/../../usr.bin/rpcgen/rpc_clntout.c
#    create  rpcgen/rpc_cout.d
/cygdrive/c/work/gt-current2/src/obj.evbarm/tooldir.CYGWIN_NT-5.1-1.7.2-i686/bin/nbhost-mkdep
 -f rpc_cout.d --     
-I/cygdrive/c/work/gt-current2/src/tools/compat/obj.evbarm 
-I/cygdrive/c/work/gt-current2/src/tools/compat/obj.evbarm/include  
-I/cygdrive/c/work/gt-current2/src/tools/rpcgen/../compat 
-DHAVE_NBTOOL_CONFIG_H=1  -D_FILE_OFFSET_BITS=64   
/cygdrive/c/work/gt-current2/src/tools/rpcgen/../../usr.bin/rpcgen/rpc_cout.c
#    create  rpcgen/rpc_hout.d
[[SNIP]]
#    create  rpcgen/rpc_util.d
/cygdrive/c/work/gt-current2/src/obj.evbarm/tooldir.CYGWIN_NT-5.1-1.7.2-i686/bin/nbhost-mkdep
 -f rpc_util.d --     
-I/cygdrive/c/work/gt-current2/src/tools/compat/obj.evbarm 
-I/cygdrive/c/work/gt-current2/src/tools/compat/obj.evbarm/include  
-I/cygdrive/c/work/gt-current2/src/tools/rpcgen/../compat 
-DHAVE_NBTOOL_CONFIG_H=1  -D_FILE_OFFSET_BITS=64   
/cygdrive/c/work/gt-current2/src/tools/rpcgen/../../usr.bin/rpcgen/rpc_util.c
#    create  rpcgen/.depend
rm -f .depend
/cygdrive/c/work/gt-current2/src/obj.evbarm/tooldir.CYGWIN_NT-5.1-1.7.2-i686/bin/nbhost-mkdep
 -d -f .depend -s .lo\ .ln rpc_clntout.d rpc_cout.d rpc_hout.d rpc_main.d 
rpc_parse.d rpc_sample.d rpc_scan.d rpc_svcout.d rpc_tblout.d rpc_util.d
#   compile  rpcgen/rpc_clntout.lo
cc -O -I/cygdrive/c/work/gt-current2/src/tools/compat/obj.evbarm 
-I/cygdrive/c/work/gt-current2/src/tools/compat/obj.evbarm/include  
-I/cygdrive/c/work/gt-current2/src/tools/rpcgen/../compat 
-DHAVE_NBTOOL_CONFIG_H=1  -D_FILE_OFFSET_BITS=64  -c -o rpc_clntout.lo.o    
/cygdrive/c/work/gt-current2/src/tools/rpcgen/../../usr.bin/rpcgen/rpc_clntout.c
In file included from 
/cygdrive/c/work/gt-current2/src/tools/rpcgen/../../usr.bin/rpcgen/rpc_clntout.c:51:
/usr/include/rpc/types.h:49: error: two or more data types in declaration 
specifiers
/usr/include/rpc/types.h:49: error: two or more data types in declaration 
specifiers
/usr/include/rpc/types.h:49: error: two or more data types in declaration 
specifiers
/usr/include/rpc/types.h:50: error: two or more data types in declaration 
specifiers
/usr/include/rpc/types.h:50: error: two or more data types in declaration 
specifiers

*** Failed target:  rpc_clntout.lo
*** Failed command: cc -O 
-I/cygdrive/c/work/gt-current2/src/tools/compat/obj.evbarm 
-I/cygdrive/c/work/gt-current2/src/tools/compat/obj.evbarm/include 
-I/cygdrive/c/work/gt-current2/src/tools/rpcgen/../compat 
-DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -c -o rpc_clntout.lo.o 
/cygdrive/c/work/gt-current2/src/tools/rpcgen/../../usr.bin/rpcgen/rpc_clntout.c
*** Error code 1

Stop.
nbmake: stopped in /cygdrive/c/work/gt-current2/src/tools/rpcgen

*** Failed target:  dependall
*** Failed command: cd "/cygdrive/c/work/gt-current2/src/tools/rpcgen"; 
/cygdrive/c/work/gt-current2/src/obj.evbarm/tooldir.CYGWIN_NT-5.1-1.7.2-i686/bin/nbmake
 realall
*** Error code 1

Stop.
nbmake: stopped in /cygdrive/c/work/gt-current2/src/tools/rpcgen

*** Failed target:  dependall-rpcgen
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; 
case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; 
real="/cygdrive/c/work/gt-current2/src/tools" ;; *) this="${dir}/"; 
real="/cygdrive/c/work/gt-current2/src/tools/${dir}" ;; esac; show=${this:-.}; 
echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && 
/cygdrive/c/work/gt-current2/src/obj.evbarm/tooldir.CYGWIN_NT-5.1-1.7.2-i686/bin/nbmake
 _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget rpcgen dependall
*** Error code 1

Stop.
nbmake: stopped in /cygdrive/c/work/gt-current2/src/tools

ERROR: Failed to make dependall in "tools"
----------------------------------------------------------------

  This happens because u_quad_t and quad_t are defined in
<rpc/types.h> instead of <sys/types.h> on Cygwin.  (Those
definitions were added on 2010/Mar/2.)

  tools/compat/configure can't find those definitions and
HAVE_U_QUAD_T is left undefined in mbtool_config.h to enable
definitions of quad_t and u_quad_t in compat_defs.h.  This results
in compile error when <rpc/types.h> is included as in
rpcgen/rpc_clntout.c.

>How-To-Repeat:
  run "build.sh tools" on Cygwin
>Fix:
  Here's a patch to workaround the problem.
I myself don't like this patch very much.  Wiser souls may find better solution.

diff -r 209f1ce1629b -r 675176593633 src/tools/compat/configure.ac
--- a/src/tools/compat/configure.ac     Thu May 06 23:05:46 2010 +0900
+++ b/src/tools/compat/configure.ac     Mon May 17 17:11:48 2010 +0900
@@ -95,12 +95,24 @@
 
 # Typedefs.
 AC_TYPE_SIZE_T
-AC_CHECK_TYPES([id_t, long long, u_long, u_char, u_short, u_int, u_quad_t])
+AC_CHECK_TYPES([id_t, long long, u_long, u_char, u_short, u_int])
 AC_CHECK_TYPE(socklen_t, [AC_DEFINE([HAVE_SOCKLEN_T], 1,
                          [Define if you have the socklen_t type.])],,
 [#include <sys/types.h>
 #include <sys/socket.h>])
 
+AC_CHECK_TYPE(u_quad_t,[AC_DEFINE([HAVE_U_QUAD_T], 1, 
+                                                  [Define if you have the type 
u_quad_t])],
+[unset ac_cv_type_u_quad_t
+AC_CHECK_TYPE(u_quad_t, [
+   AC_DEFINE([HAVE_U_QUAD_T_IN_RPC_TYPES_H], 1,
+    [Define if u_quad_t is defined in <rpc/types.h> instead of <sys/types.h> 
as in Cygwin])
+   ],, [[
+#ifdef HAVE_RPC_TYPES_H
+#include <rpc/types.h>
+#endif
+]])])
+
 dnl XXX - This is UGLY.  Need a better way to homogenize the bitsized types,
 dnl including use of compiler primitive types via AC_CHECK_SIZEOF.
 dnl
diff -r 209f1ce1629b -r 675176593633 src/usr.bin/rpcgen/rpc_clntout.c
--- a/src/usr.bin/rpcgen/rpc_clntout.c  Thu May 06 23:05:46 2010 +0900
+++ b/src/usr.bin/rpcgen/rpc_clntout.c  Mon May 17 17:11:48 2010 +0900
@@ -31,6 +31,11 @@
 
 #if HAVE_NBTOOL_CONFIG_H
 #include "nbtool_config.h"
+#if !defined(HAVE_U_QUAD_T) && defined(HAVE_U_QUAD_T_IN_RPC_TYPES_H)
+/* use definitions in <rpc/types.h> for Cygwin*/
+#undef u_quad_t
+#undef quad_t
+#endif
 #endif
 
 #include <sys/cdefs.h>
diff -r 209f1ce1629b -r 675176593633 src/usr.bin/rpcgen/rpc_parse.c
--- a/src/usr.bin/rpcgen/rpc_parse.c    Thu May 06 23:05:46 2010 +0900
+++ b/src/usr.bin/rpcgen/rpc_parse.c    Mon May 17 17:11:48 2010 +0900
@@ -31,6 +31,11 @@
 
 #if HAVE_NBTOOL_CONFIG_H
 #include "nbtool_config.h"
+#if !defined(HAVE_U_QUAD_T) && defined(HAVE_U_QUAD_T_IN_RPC_TYPES_H)
+/* use definitions in <rpc/types.h> for Cygwin */
+#undef u_quad_t
+#undef quad_t
+#endif
 #endif
 
 #include <sys/cdefs.h>




Home | Main Index | Thread Index | Old Index