NetBSD Problem Report #53511
From www@NetBSD.org Sat Aug 11 13:32:44 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-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 F08F97A111
for <gnats-bugs@gnats.NetBSD.org>; Sat, 11 Aug 2018 13:32:43 +0000 (UTC)
Message-Id: <20180811133242.6BCCF7A1D7@mollari.NetBSD.org>
Date: Sat, 11 Aug 2018 13:32:42 +0000 (UTC)
From: palle@netbsd.org
Reply-To: palle@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: Fix compiling flex on a Solaris 11 host system
X-Send-Pr-Version: www-1.0
>Number: 53511
>Category: toolchain
>Synopsis: Fix compiling flex on a Solaris 11 host system
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: toolchain-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Aug 11 13:35:00 +0000 2018
>Closed-Date: Mon Sep 10 06:50:12 +0000 2018
>Last-Modified: Mon Sep 10 06:50:12 +0000 2018
>Originator: Palle Lyckegaard
>Release: current as of 2018-08-11
>Organization:
NetBSD
>Environment:
SunOS solaris 5.11 11.4.0.3.0 i86pc i386 i86pc
>Description:
Compiler error:
In file included from /export/home/palle/data/netbsd/current/src/tools/compat/regex.h:3:0,
from /export/home/palle/data/netbsd/current/src/external/bsd/flex/dist/src/flexdef.h:82,
from /export/home/palle/data/netbsd/current/src/external/bsd/flex/dist/src/buf.c:35:
/export/home/palle/data/netbsd/current/src/tools/compat/../../include/regex.h:135:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
int regcomp(regex_t * __restrict, const char * __restrict, int);
^~~
In file included from /export/home/palle/data/netbsd/current/src/external/bsd/flex/dist/src/flexint.h:19:0,
from /export/home/palle/data/netbsd/current/src/external/bsd/flex/dist/src/flexdef.h:84,
from /export/home/palle/data/netbsd/current/src/external/bsd/flex/dist/src/buf.c:35:
/usr/include/inttypes.h:57:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
typedef struct {
^~~~~~~
--- ccl.lo ---
In file included from /export/home/palle/data/netbsd/current/src/tools/compat/regex.h:3:0,
from /export/home/palle/data/netbsd/current/src/external/bsd/flex/dist/src/flexdef.h:82,
from /export/home/palle/data/netbsd/current/src/external/bsd/flex/dist/src/ccl.c:33:
/export/home/palle/data/netbsd/current/src/tools/compat/../../include/regex.h:135:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
int regcomp(regex_t * __restrict, const char * __restrict, int);
^~~
In file included from /export/home/palle/data/netbsd/current/src/external/bsd/flex/dist/src/flexint.h:19:0,
from /export/home/palle/data/netbsd/current/src/external/bsd/flex/dist/src/flexdef.h:84,
from /export/home/palle/data/netbsd/current/src/external/bsd/flex/dist/src/ccl.c:33:
/usr/include/inttypes.h:57:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
^~~~~~~
>How-To-Repeat:
Do a standard build.sh release on a Solaris 11 system (Solaris 11.4 beta)
>Fix:
Patch below fixes the problem:
Index: external/bsd/flex/dist/src/flexdef.h
===================================================================
RCS file: /cvsroot/src/external/bsd/flex/dist/src/flexdef.h,v
retrieving revision 1.3
diff -u -r1.3 flexdef.h
--- external/bsd/flex/dist/src/flexdef.h 2 Jan 2017 17:45:27 -0000 1.3
+++ external/bsd/flex/dist/src/flexdef.h 10 Aug 2018 13:56:28 -0000
@@ -36,6 +36,10 @@
#ifndef FLEXDEF_H
#define FLEXDEF_H 1
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
>Release-Note:
>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/53511 CVS commit: src/external/bsd/flex/dist/src
Date: Mon, 20 Aug 2018 04:51:57 -0400
Module Name: src
Committed By: christos
Date: Mon Aug 20 08:51:57 UTC 2018
Modified Files:
src/external/bsd/flex/dist/src: flexdef.h
Log Message:
PR/53511: Palle Lyckegaard: Fix compiling flex on a Solaris 11 host system
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/flex/dist/src/flexdef.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Robert Elz" <kre@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/53511 CVS commit: src/external/bsd/flex/dist/src
Date: Mon, 20 Aug 2018 10:24:17 +0000
Module Name: src
Committed By: kre
Date: Mon Aug 20 10:24:17 UTC 2018
Modified Files:
src/external/bsd/flex/dist/src: flexdef.h
Log Message:
PR toolchain/53511
_NETBSD_SOURCE and nbtool_config.h don't play well together...
(unbreak tools build on netbsd host)
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/flex/dist/src/flexdef.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, toolchain-manager@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, palle@netbsd.org
Cc:
Subject: Re: PR/53511 CVS commit: src/external/bsd/flex/dist/src
Date: Mon, 20 Aug 2018 06:29:10 -0400
On Aug 20, 10:25am, kre@netbsd.org ("Robert Elz") wrote:
-- Subject: PR/53511 CVS commit: src/external/bsd/flex/dist/src
| _NETBSD_SOURCE and nbtool_config.h don't play well together...
| (unbreak tools build on netbsd host)
Yes, this needs to be done differently so that it always includes
nbtools_compat.h, for non-netbsd hosts.
christos
From: Robert Elz <kre@munnari.OZ.AU>
To: christos@zoulas.com (Christos Zoulas)
Cc: gnats-bugs@NetBSD.org, toolchain-manager@netbsd.org,
netbsd-bugs@netbsd.org, palle@netbsd.org
Subject: Re: PR/53511 CVS commit: src/external/bsd/flex/dist/src
Date: Mon, 20 Aug 2018 17:40:36 +0700
Date: Mon, 20 Aug 2018 06:29:10 -0400
From: christos@zoulas.com (Christos Zoulas)
Message-ID: <20180820102910.35E6C17FDA1@rebar.astron.com>
| Yes, this needs to be done differently [...]
I was going to send a message saying just that, but you had
"done differently" before I had the chance, so ...
kre
From: Palle Lyckegaard <palle@lyckegaard.dk>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: toolchain/53511
Date: Sun, 9 Sep 2018 19:45:51 +0000 (UTC)
The issue can be closed, since proper instructions for building have been
documented in tools/compat/README revision 1.13
State-Changed-From-To: open->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Mon, 10 Sep 2018 06:50:12 +0000
State-Changed-Why:
Instructions have been update
d
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.