Subject: bin/17755: usr.bin/file of -current cannot be compiled on system without /usr/include/sys/stdint.h
To: None <gnats-bugs@gnats.netbsd.org>
From: None <naoto@morishima.net>
List: netbsd-bugs
Date: 07/29/2002 06:47:49
>Number: 17755
>Category: bin
>Synopsis: usr.bin/file of -current cannot be compiled on system without /usr/include/sys/stdint.h
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jul 29 06:48:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Naoto Morishima
>Release: NetBSD 1.5.2
>Organization:
Nara Institute of Science and Technology, Japan
>Environment:
NetBSD pc1.notemachi NetBSD 1.5.2 (PC1.NOTEMACHI) #0: Sun Mar 24 07:58:09 JST 2002 yasu@saboten:/usr/src/sys/arch/i386/compile/PC1.NOTEMACHI i386
>Description:
usr.bin/file of -current cannot be compiled on system
without /usr/include/sys/stdint.h like NetBSD 1.5.2.
This shows following errors:
-------------
cc -O -o mkmagic -DHAVE_CONFIG_H -DQUICK -DCOMPILE_ONLY -I/usr/src/usr.bin/file /usr/src/usr.bin/file/apprentice.c /usr/src/usr.bin/file/print.c
In file included from /usr/src/usr.bin/file/apprentice.c:30:
/usr/src/usr.bin/file/file.h:47: stdint.h: No such file or directory
In file included from /usr/src/usr.bin/file/print.c:30:
/usr/src/usr.bin/file/file.h:47: stdint.h: No such file or directory
-------------
>How-To-Repeat:
build NetBSD-current from src on NetBSD 1.5.2 or earlier.
>Fix:
cc refers /usr/include as include path when compiling mkmagic
in usr.sbin/file, and it should not. Applying patch like following
to usr.sbin/file/Makefile will fix this problem:
Index: Makefile
===================================================================
RCS file: /cvsroot/basesrc/usr.bin/file/Makefile,v
retrieving revision 1.40
diff -u -r1.40 Makefile
--- Makefile 2002/05/18 07:04:38 1.40
+++ Makefile 2002/07/29 13:41:24
@@ -48,6 +48,7 @@
mkmagic: apprentice.c print.c
${HOST_LINK.c} -o mkmagic -DHAVE_CONFIG_H -DQUICK -DCOMPILE_ONLY \
- -I${.CURDIR} ${.CURDIR}/apprentice.c ${.CURDIR}/print.c
+ -nostdinc -I${DESTDIR}/usr/include -I${.CURDIR} \
+ ${.CURDIR}/apprentice.c ${.CURDIR}/print.c
.include <bsd.prog.mk>
>Release-Note:
>Audit-Trail:
>Unformatted: