NetBSD Problem Report #57801

From www@netbsd.org  Fri Dec 29 05:15:27 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 33AAE1A923A
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 29 Dec 2023 05:15:27 +0000 (UTC)
Message-Id: <20231229051526.3070D1A923C@mollari.NetBSD.org>
Date: Fri, 29 Dec 2023 05:15:26 +0000 (UTC)
From: simmonds@polymorphism.ca
Reply-To: simmonds@polymorphism.ca
To: gnats-bugs@NetBSD.org
Subject: lang/nim fails to build package due to pax on macOS
X-Send-Pr-Version: www-1.0

>Number:         57801
>Category:       pkg
>Synopsis:       lang/nim fails to build package due to pax on macOS
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 29 05:20:00 +0000 2023
>Originator:     Colin Simmonds
>Release:        pkgsrc git trunk latest
>Organization:
>Environment:
Darwin meiling.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000 arm64 arm Darwin
>Description:
trying to build and install lang/nim on a Mac, I encountered the following error in the install step:

$ sudo bmake install
....
cd /Users/colin/tmp/pkgsrc-work/lang/nim/work/nim-2.0.0/nimsuggest && /bin/pax -r -w . /Users/colin/tmp/pkgsrc-work/lang/nim/work/.destdir/opt/pkg/nim/nimsuggest
pax: Cannot access destination directory /Users/colin/tmp/pkgsrc-work/lang/nim/work/.destdir/opt/pkg/nim/nimsuggest <No such file or directory>

It looks like the version of pax installed in Darwin by default will not create the destination directory if it does not already exist. I couldn't find a version number for the binary, and it appears to be based on a version from FreeBSD.
>How-To-Repeat:
$ cd lang/nim
$ bmake
$ sudo bmake install

>Fix:
The package builds successfully if I force it to use the NetBSD version of pax from the archivers/pax package:

$ sudo PAX=/opt/pkg/bin/nbpax bmake install

NetBSD Home
NetBSD PR Database Search

(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.