NetBSD Problem Report #56187

From cjep@netbsd.org  Tue May 18 18:19:43 2021
Return-Path: <cjep@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 8711A1A92B4
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 18 May 2021 18:19:43 +0000 (UTC)
Message-Id: <20210518181942.0353C1A92B5@mollari.NetBSD.org>
Date: Tue, 18 May 2021 18:19:41 +0000 (UTC)
From: cjep@netbsd.org
Reply-To: cjep@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: port-atari does not cross-build (build.sh) on Darwin due to keymaps
X-Send-Pr-Version: 3.95

>Number:         56187
>Category:       port-atari
>Synopsis:       port-atari does not cross-build (build.sh) on Darwin due to keymaps
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-atari-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 18 18:20:00 +0000 2021
>Closed-Date:    Sun May 30 11:55:38 +0000 2021
>Last-Modified:  Sun May 30 11:55:38 +0000 2021
>Originator:     Chris Pinnock
>Release:        Observed on both latest NetBSD 9.2 and -current sources
>Organization:
>Environment:
macOS Big Sur 11.3.1/x86
Darwin MacMini-8795 20.4.0 Darwin Kernel Version 20.4.0: Thu Apr 22 21:46:47 PDT 2021; root:xnu-7195.101.2~1/RELEASE_X86_64 x86_64
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin20.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

>Description:
The cross-build of the atari port fails in the standalone sections
when building the keymaps.
#    create  de/de-kbdmap.d
/Volumes/TimeMachine/Chris/NetBSD/current/src/../objects/atari/tooldir.Darwin-20.4.0-x86_64/bin/nbhost-mkdep -f de-kbdmap.d.tmp  --           /Volumes/TimeMachine/Chris/NetBSD/current/src/sys/arch/atari/stand/keymaps/de/de-kbdmap.c &&  mv -f de-kbdmap.d.tmp de-kbdmap.d
#    create  de/.depend
rm -f .depend
/Volumes/TimeMachine/Chris/NetBSD/current/src/../objects/atari/tooldir.Darwin-20.4.0-x86_64/bin/nbhost-mkdep -s .lo\ .ln\ .d -d -f .depend de-kbdmap.d
#   compile  de/de-kbdmap.lo
cc -O   -c -o de-kbdmap.lo.o    /Volumes/TimeMachine/Chris/NetBSD/current/src/sys/arch/atari/stand/keymaps/de/de-kbdmap.c
/Volumes/TimeMachine/Chris/NetBSD/current/src/sys/arch/atari/stand/keymaps/de/de-kbdmap.c:206:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
main(void)
^
/Volumes/TimeMachine/Chris/NetBSD/current/src/sys/arch/atari/stand/keymaps/de/de-kbdmap.c:208:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
  exit(write (1, &ascii_kbdmap, sizeof (kbdmap)) == sizeof (kbdmap) ? 0 : 1);
  ^
/Volumes/TimeMachine/Chris/NetBSD/current/src/sys/arch/atari/stand/keymaps/de/de-kbdmap.c:208:3: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'
/Volumes/TimeMachine/Chris/NetBSD/current/src/sys/arch/atari/stand/keymaps/de/de-kbdmap.c:208:8: error: implicit declaration of function 'write' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  exit(write (1, &ascii_kbdmap, sizeof (kbdmap)) == sizeof (kbdmap) ? 0 : 1);
       ^
1 warning and 2 errors generated.

*** Failed target: de-kbdmap.lo
*** Failed commands:
        ${_MKTARGET_COMPILE}
        ${HOST_COMPILE.c} -o ${.TARGET}.o ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC}
        ${MV} ${.TARGET}.o ${.TARGET}
*** [de-kbdmap.lo] Error code 1


>How-To-Repeat:
./build.sh -U -m atari build
with either 9 branch sources or current sources on Darwin.

>Fix:

>Release-Note:

>Audit-Trail:
From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/56187 CVS commit: src/sys/arch/atari/stand/keymaps
Date: Sat, 29 May 2021 09:50:04 +0000

 Module Name:	src
 Committed By:	tsutsui
 Date:		Sat May 29 09:50:04 UTC 2021

 Modified Files:
 	src/sys/arch/atari/stand/keymaps: Makefile.inc
 	src/sys/arch/atari/stand/keymaps/de: de-kbdmap.c
 	src/sys/arch/atari/stand/keymaps/fr: fr-kbdmap.c
 	src/sys/arch/atari/stand/keymaps/uk: uk-kbdmap.c
 	src/sys/arch/atari/stand/keymaps/us: us-kbdmap.c

 Log Message:
 Appease compiler warnings derived from ancient HOST files.  PR/56187

 Also fix misc styles and formats per KNF.


 To generate a diff of this commit:
 cvs rdiff -u -r1.7 -r1.8 src/sys/arch/atari/stand/keymaps/Makefile.inc
 cvs rdiff -u -r1.3 -r1.4 src/sys/arch/atari/stand/keymaps/de/de-kbdmap.c
 cvs rdiff -u -r1.3 -r1.4 src/sys/arch/atari/stand/keymaps/fr/fr-kbdmap.c
 cvs rdiff -u -r1.3 -r1.4 src/sys/arch/atari/stand/keymaps/uk/uk-kbdmap.c
 cvs rdiff -u -r1.3 -r1.4 src/sys/arch/atari/stand/keymaps/us/us-kbdmap.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: cjep@NetBSD.org
State-Changed-When: Sun, 30 May 2021 11:55:38 +0000
State-Changed-Why:
Problem has been fixed by tsutsui. Darwin build and release confirmed this 
morning.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.