From owner-freebsd-bugs Thu Oct 17 11:20: 5 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B44CD37B401 for ; Thu, 17 Oct 2002 11:20:02 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA7A143E6E for ; Thu, 17 Oct 2002 11:20:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g9HIK1x3024796 for ; Thu, 17 Oct 2002 11:20:01 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g9HIK1VR024795; Thu, 17 Oct 2002 11:20:01 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A4D0037B401 for ; Thu, 17 Oct 2002 11:15:03 -0700 (PDT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3FA8A43E88 for ; Thu, 17 Oct 2002 11:15:03 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.6/8.12.6) with ESMTP id g9HIF37R004697 for ; Thu, 17 Oct 2002 11:15:03 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.6/8.12.6/Submit) id g9HIF3oa004696; Thu, 17 Oct 2002 11:15:03 -0700 (PDT) Message-Id: <200210171815.g9HIF3oa004696@www.freebsd.org> Date: Thu, 17 Oct 2002 11:15:03 -0700 (PDT) From: Liu Kang To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: misc/44176: coda can not be compiled, ports's error or sys/types.h 's problem? Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 44176 >Category: misc >Synopsis: coda can not be compiled, ports's error or sys/types.h 's problem? >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Oct 17 11:20:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Liu Kang >Release: 4.7 & 5 >Organization: Beijing Polytechnic Univerisity >Environment: FreeBSD ftp.bjpu.edu.cn 4.7-STABLE FreeBSD 4.7-STABLE #19: Wed Oct 16 04:30:06 CST 2002 root@ftp.bjpu.edu.cn:/usr/obj/usr/src/sys/FTP i386 >Description: when I tried to install coda from /usr/ports/net/coda5_server it said: /usr/ports/net/coda5_server/work/coda-5.3.19/include/coda.h:130: redefinition of `int8_t' /usr/include/sys/inttypes.h:11: `int8_t' previously declared here /usr/ports/net/coda5_server/work/coda-5.3.19/include/coda.h:131: redefinition of `u_int8_t' /usr/include/sys/types.h:60: `u_int8_t' previously declared here /usr/ports/net/coda5_server/work/coda-5.3.19/include/coda.h:132: redefinition of `int16_t' /usr/include/sys/inttypes.h:12: `int16_t' previously declared here /usr/ports/net/coda5_server/work/coda-5.3.19/include/coda.h:133: redefinition of `u_int16_t' /usr/include/sys/types.h:61: `u_int16_t' previously declared here /usr/ports/net/coda5_server/work/coda-5.3.19/include/coda.h:134: redefinition of `int32_t' /usr/include/sys/inttypes.h:13: `int32_t' previously declared here /usr/ports/net/coda5_server/work/coda-5.3.19/include/coda.h:135: redefinition of `u_int32_t' /usr/include/sys/types.h:62: `u_int32_t' previously declared here gmake[2]: *** [pioctl.o] Error 1 gmake[2]: Leaving directory `/usr/ports/net/coda5_server/work/coda-5.3.19/coda-src/kerndep' ----> Error in kerndep gmake[1]: *** [Coda] Error 1 gmake[1]: Leaving directory `/usr/ports/net/coda5_server/work/coda-5.3.19/coda-src' ----> Error in coda-src gmake: *** [Coda] Error 1 *** Error code 2 I check the source code of coda, work/coda-5.3.19/include (line 130): #ifndef __BIT_TYPES_DEFINED__ #define __BIT_TYPES_DEFINED__ typedef signed char int8_t; typedef unsigned char u_int8_t; typedef short int16_t; typedef unsigned short u_int16_t; typedef int int32_t; typedef unsigned int u_int32_t; #endif after I added following lines , the compile error disappeared. #if defined(__BSD44__) #define __BIT_TYPES_DEFINED__ #endif I checked the code of /usr/include/sys/types.h and NetBSD's sys/ int_types.h. There is a line in NetBSD's inet_types.h "#define __BIT_TYPES_DEFINED__" but freebsd's does not have. I'm not sure if it should be add into freebsd's sys/types.h >How-To-Repeat: run make in /usr/ports/net/coda5_server or net/coda5_client >Fix: There are 2 ways to fix the problem: I. make a patch for coda.h in ports dir. --- coda.h.orig Fri Oct 18 02:00:15 2002 +++ coda.h Fri Oct 18 01:59:25 2002 @@ -67,6 +67,10 @@ #include #endif +#if defined(__BSD44__) +#define __BIT_TYPES_DEFINED__ +#endif + #ifndef CODA_MAXSYMLINKS #define CODA_MAXSYMLINKS 10 #endif II: Add "#define __BIT_TYPES_DEFINED__" into sys/types.h I'm not sure it is right or wrong. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message