NetBSD Problem Report #56001

From  Sun Feb 21 01:37:25 2021
Return-Path: <>
Received: from ( [])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id CFFDC1A921F
	for <>; Sun, 21 Feb 2021 01:37:24 +0000 (UTC)
Message-Id: <>
Date: Sun, 21 Feb 2021 01:37:23 +0000 (UTC)
Subject: lang/rakudo: [macOS Big Sur] `post-install` fails due to illegal option `-i` in call to `sed`
X-Send-Pr-Version: www-1.0

>Number:         56001
>Category:       pkg
>Synopsis:       lang/rakudo: [macOS Big Sur] `post-install` fails due to illegal option `-i` in call to `sed`
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 21 01:40:00 +0000 2021
>Last-Modified:  Sun Feb 21 12:15:01 +0000 2021
>Originator:     Dean Matzkov
>Release:        pkgsrc-2020Q4
Darwin MBP.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
lang/rakudo fails to insall on macOS Big Sur due to the `sed` command within `post-install`, as such:

sed -i "s,/usr/bin/env raku,/opt/pkg/bin/raku," /Volumes/Devel/pkgscrc_stuff/work/2020Q4/lang/rakudo/work.x86_64/rakudo-2020.10/tools/install-dist.p6                                sed: illegal option -- i
usage:  sed [-aEn] script [file ...]                                                                                                                                                         sed [-aEn] [-e script] ... [-f script_file] ... [file ...]
*** Error code 1


The offending line is this line in rakudo's pkgsrc Makefile:

sed -i "s,/usr/bin/env raku,${PREFIX}/bin/raku," ${WRKSRC}/tools/install-dist.p6

This error occurs because on macOS Big Sur, the system-supplied /usr/bin/sed does not support the `-i` flag.
1. Run macOS Big Sur.
2. cd $pkgsrc/lang/rakudo && bmake install

Perhaps it should explicitly use gsed instead, as it supports the `-i` flag.

From: "Nia Alarie" <>
Subject: PR/56001 CVS commit: pkgsrc/lang/rakudo
Date: Sun, 21 Feb 2021 12:13:07 +0000

 Module Name:	pkgsrc
 Committed By:	nia
 Date:		Sun Feb 21 12:13:07 UTC 2021

 Modified Files:
 	pkgsrc/lang/rakudo: Makefile

 Log Message:
 rakudo: Avoid non-portable usage of sed -i

 PR pkg/56001

 To generate a diff of this commit:
 cvs rdiff -u -r1.14 -r1.15 pkgsrc/lang/rakudo/Makefile

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

NetBSD Home
NetBSD PR Database Search

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