NetBSD Problem Report #50606

From www@NetBSD.org  Sat Jan  2 05:00:15 2016
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 "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 646587ACAA
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  2 Jan 2016 05:00:15 +0000 (UTC)
Message-Id: <20160102050014.5CC437ACB5@mollari.NetBSD.org>
Date: Sat,  2 Jan 2016 05:00:14 +0000 (UTC)
From: netbsd.org@yegle.net
Reply-To: netbsd.org@yegle.net
To: gnats-bugs@NetBSD.org
Subject: lang/python35: depends on textproc/gsed
X-Send-Pr-Version: www-1.0

>Number:         50606
>Category:       pkg
>Synopsis:       lang/python35: depends on textproc/gsed
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 02 05:05:00 +0000 2016
>Closed-Date:    Mon May 30 03:24:13 +0000 2016
>Last-Modified:  Mon May 30 03:24:13 +0000 2016
>Originator:     yegle
>Release:        
>Organization:
>Environment:
Darwin yegle-laptop.local 15.2.0 Darwin Kernel Version 15.2.0: Fri Nov 13 19:56:56 PST 2015; root:xnu-3248.20.55~2/RELEASE_X86_64 x86_64
>Description:
Using pkgsrc on OS X 10.11. It looks like the installing of lang/python35 depends on textproc/gsed, and the default sed in OS X (/usr/bin/sed) will fail in trying to replace the interpreter:

+ for f in 'Lib/*.py' 'Lib/*/*.py' 'Lib/*/*/*.py' 'Lib/*/*/*/*.py'
+ '[' -f Lib/test/badsyntax_pep3120.py ']'
+ /usr/bin/sed -e '1s|^#![[:space:]]*\(/usr/bin/env[[:space:]][[:space:]]*\)\{0,1\}.*python[^ ]*|#!/Users/yegle/pkg/bin/python3.5|'
sed: RE error: illegal byte sequence
*** Error code 1

Stop.
bmake[1]: stopped in /Users/yegle/pkgsrc/lang/python35


Indeed if I run the following command over the file in question I get the same error:

$ /usr/bin/sed -e '1s|^#![[:space:]]*\(/usr/bin/env[[:space:]][[:space:]]*\)\{0,1\}.*python[^ ]*|#!/Users/yegle/pkg/bin/python3.5|' Lib/test/badsyntax_pep3120.py
sed: RE error: illegal byte sequence

But `gsed` works fine:

$ gsed -e '1s|^#![[:space:]]*\(/usr/bin/env[[:space:]][[:space:]]*\)\{0,1\}.*python[^ ]*|#!/Users/yegle/pkg/bin/python3.5|' Lib/test/badsyntax_pep3120.py
print("b&#65533;se")

I'm new to pkgsrc and have no idea how to specify the sed used during installing.
>How-To-Repeat:
1. cd $PKGSRCDIR/lang/python35
2. bmake install
>Fix:

>Release-Note:

>Audit-Trail:
From: Yuchen Ying <me@yegle.net>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/50606: lang/python35: depends on textproc/gsed
Date: Fri, 1 Jan 2016 21:10:39 -0800

 The workaround seems to be:
 1. Install textproc/gsed
 2. cd lang/python35
 3. bmake install SED=gsed

From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/50606: lang/python35: depends on textproc/gsed
Date: Sat, 2 Jan 2016 10:23:27 +0100

 Does adding

 USE_TOOLS+=	gsed

 to the pkgsrc Makefile work for you?
  Thomas

From: Benny Siegert <bsiegert@gmail.com>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org, 
	netbsd.org@yegle.net
Subject: Re: pkg/50606: lang/python35: depends on textproc/gsed
Date: Sat, 2 Jan 2016 10:30:47 +0100

 This is actually a general problem with the default sed in Mac OS X.
 When did you run bootstrap? Something was added a few months ago that
 adds overrides to the mk.conf.

 My /opt/pkg/etc/mk.conf on Mac OS contains the lines:

 TOOLS_PLATFORM.awk?=            /opt/pkg/bin/nawk
 TOOLS_PLATFORM.sed?=            /opt/pkg/bin/nbsed

 Please check if you have these lines in the file, add them if missing,
 then retry.

From: Yuchen Ying <me@yegle.net>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org, 
	netbsd.org@yegle.net
Subject: Re: pkg/50606: lang/python35: depends on textproc/gsed
Date: Sat, 2 Jan 2016 11:46:37 -0800

 Ah right. Re-bootstrap does solve the problem. I think I bootstrapped
 <1month ago so this must be some recent change.

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 30 May 2016 03:24:13 +0000
State-Changed-Why:
problem was already fixed but required re-bootstrap.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.