Date: Thu, 17 Oct 2002 11:15:03 -0700 (PDT) From: Liu Kang <lazykang@hotmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/44176: coda can not be compiled, ports's error or sys/types.h 's problem? Message-ID: <200210171815.g9HIF3oa004696@www.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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 <sys/types.h> #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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210171815.g9HIF3oa004696>