NetBSD Problem Report #57533
From www@netbsd.org Thu Jul 20 20:36:45 2023
Return-Path: <www@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 403C61A923D
for <gnats-bugs@gnats.NetBSD.org>; Thu, 20 Jul 2023 20:36:45 +0000 (UTC)
Message-Id: <20230720203643.AD20E1A923E@mollari.NetBSD.org>
Date: Thu, 20 Jul 2023 20:36:43 +0000 (UTC)
From: palle@lyckegaard.dk
Reply-To: palle@lyckegaard.dk
To: gnats-bugs@NetBSD.org
Subject: usr.bin/xlint/lint1 fails to build on Solaris 11.4 host - basic/extended regex issue - Posix
X-Send-Pr-Version: www-1.0
>Number: 57533
>Category: bin
>Synopsis: usr.bin/xlint/lint1 fails to build on Solaris 11.4 host - basic/extended regex issue - Posix
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lukem
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jul 20 20:40:00 +0000 2023
>Closed-Date: Fri Jul 21 15:09:47 +0000 2023
>Last-Modified: Sat Jul 22 18:35:01 +0000 2023
>Originator: Palle Lyckegaard
>Release: current
>Organization:
NetBSD
>Environment:
SunOS gcc106.fsffrance.org 5.11 11.4.57.144.3 sun4v sparc sun4v logical-domain
>Description:
The Makefile in usr.bin/xlint/lint1 has issues with the invocation of the 'sed -E' command on a Posix compliant system like Solaris 11.4.
The following error message in displayed:
sed -E -e 's,.*(....)/([0-9]{2})/0?([0-9]+).*,\2 \3\, \1,' -e 's,^01,January,' -e 's,^02,February,' -e 's,^03,March,' -e 's,^04,April,' -e 's,^05,May,' -e 's,^06,June,' -e 's,^07,July,' -e 's,^08,August,' -e 's,^09,September,' -e 's,^10,October,' -e 's,^11,November,' -e 's,^12,December,' -e 1q /export/home/palle/git/netbsd_src/usr.bin/xlint/lint1/err.c > lint.7.date
+ sed -E -e 's,.*(....)/([0-9]{2})/0?([0-9]+).*,\2 \3\, \1,' -e 's,^01,January,' -e 's,^02,February,' -e 's,^03,March,' -e 's,^04,April,' -e 's,^05,May,' -e 's,^06,June,' -e 's,^07,July,' -e 's,^08,August,' -e 's,^09,September,' -e 's,^10,October,' -e 's,^11,November,' -e 's,^12,December,' -e 1q /export/home/palle/git/netbsd_src/usr.bin/xlint/lint1/err.c
sed: illegal option -- E
Usage: sed [-n] script [file...]
sed [-n] [-e script]...[-f script_file]...[file...]
*** Failed target: lint.7.date
*** Failed command: sed -E -e 's,.*(....)/([0-9]{2})/0?([0-9]+).*,\2 \3\, \1,' -e 's,^01,January,' -e 's,^02,February,' -e 's,^03,March,' -e 's,^04,April,' -e 's,^05,May,' -e 's,^06,June,' -e 's,^07,July,' -e 's,^08,August,' -e 's,^09,September,' -e 's,^10,October,' -e 's,^11,November,' -e 's,^12,December,' -e 1q /export/home/palle/git/netbsd_src/usr.bin/xlint/lint1/err.c > lint.7.date
*** Error code 1
Using the '-E' option is not available on a proper POSIX.1-2008, SUSv4 compliant system.
>How-To-Repeat:
Issue a build.sh release on a Solaris 11.4 host system
>Fix:
Rework the 'sed' command to use basic regular expression instead.
The is perhaps too simplistic, but seems to make the job.
Here is the patch:
diff --git a/usr.bin/xlint/lint1/Makefile b/usr.bin/xlint/lint1/Makefile
index b6fba9292d42..6644c897471e 100644
--- a/usr.bin/xlint/lint1/Makefile
+++ b/usr.bin/xlint/lint1/Makefile
@@ -41,8 +41,8 @@ LINT1= ${TOOLDIR}/libexec/${MACHINE_GNU_PLATFORM}-lint1
LINT1?= ./${PROG}
${MAN}.date: err.c
- sed -E \
- -e 's,.*(....)/([0-9]{2})/0?([0-9]+).*,\2 \3\, \1,' \ + sed \
+ -e 's,.*\([0-9]\{4\}\)/\([0-9]\{2\}\)/\([0-9]\{2\}\).*,\2 \3\, \1,' \
-e 's,^01,January,' \
-e 's,^02,February,' \ -e 's,^03,March,' \
rillig@ seems to be the recept maintainer of lint
>Release-Note:
>Audit-Trail:
From: Luke Mewburn <luke@mewburn.net>
To: gnats-bugs@netbsd.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: bin/57533: usr.bin/xlint/lint1 fails to build on Solaris 11.4
host - basic/extended regex issue - Posix
Date: Sat, 22 Jul 2023 00:49:44 +1000
On 23-07-20 20:40, palle@lyckegaard.dk wrote:
| >Number: 57533
| >Category: bin
| >Synopsis: usr.bin/xlint/lint1 fails to build on Solaris 11.4 host - basic/extended regex issue - Posix
| The Makefile in usr.bin/xlint/lint1 has issues with the invocation of the 'sed -E' command on a Posix compliant system like Solaris 11.4.
|
| The following error message in displayed:
|
| sed -E -e 's,.*(....)/([0-9]{2})/0?([0-9]+).*,\2 \3\, \1,' -e 's,^01,January,' -e 's,^02,February,' -e 's,^03,March,' -e 's,^04,April,' -e 's,^05,May,' -e 's,^06,June,' -e 's,^07,July,' -e 's,^08,August,' -e 's,^09,September,' -e 's,^10,October,' -e 's,^11,November,' -e 's,^12,December,' -e 1q /export/home/palle/git/netbsd_src/usr.bin/xlint/lint1/err.c > lint.7.date
| + sed -E -e 's,.*(....)/([0-9]{2})/0?([0-9]+).*,\2 \3\, \1,' -e 's,^01,January,' -e 's,^02,February,' -e 's,^03,March,' -e 's,^04,April,' -e 's,^05,May,' -e 's,^06,June,' -e 's,^07,July,' -e 's,^08,August,' -e 's,^09,September,' -e 's,^10,October,' -e 's,^11,November,' -e 's,^12,December,' -e 1q /export/home/palle/git/netbsd_src/usr.bin/xlint/lint1/err.c
| sed: illegal option -- E
| Usage: sed [-n] script [file...]
| sed [-n] [-e script]...[-f script_file]...[file...]
That Makefile probably just needs to be adapted to ${TOOL_SED}.
I'll try that for you
Responsible-Changed-From-To: bin-bug-people->lukem
Responsible-Changed-By: lukem@NetBSD.org
Responsible-Changed-When: Fri, 21 Jul 2023 15:00:29 +0000
Responsible-Changed-Why:
From: "Luke Mewburn" <lukem@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/57533 CVS commit: src/usr.bin/xlint/lint1
Date: Fri, 21 Jul 2023 15:00:32 +0000
Module Name: src
Committed By: lukem
Date: Fri Jul 21 15:00:32 UTC 2023
Modified Files:
src/usr.bin/xlint/lint1: Makefile makeman
Log Message:
lint: use TOOL_SED instead of sed
Use ${TOOL_SED} instead of (the host) sed, as the
latter doesn't necessarily support the non-POSIX -E.
PR bin/57533
To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/usr.bin/xlint/lint1/Makefile
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/xlint/lint1/makeman
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: lukem@NetBSD.org
State-Changed-When: Fri, 21 Jul 2023 15:09:47 +0000
State-Changed-Why:
should be fixed now
From: Palle Lyckegaard <palle@lyckegaard.dk>
To: gnats-bugs@netbsd.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: bin/57533: usr.bin/xlint/lint1 fails to build on Solaris 11.4
host - basic/extended regex issue - Posix
Date: Sat, 22 Jul 2023 18:32:05 +0000 (UTC)
On Fri, 21 Jul 2023, Luke Mewburn wrote:
>
> That Makefile probably just needs to be adapted to ${TOOL_SED}.
> I'll try that for you
>
Seems to fix the issue - thanks :-)
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.