NetBSD Problem Report #55081

From  Wed Mar 18 10:39:31 2020
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id 227A51A9213
	for <>; Wed, 18 Mar 2020 10:39:31 +0000 (UTC)
Message-Id: <>
Date: Wed, 18 Mar 2020 10:39:29 +0000 (UTC)
Subject: installmodules doesn't create all required directories
X-Send-Pr-Version: www-1.0

>Number:         55081
>Category:       toolchain
>Synopsis: installmodules doesn't create all required directories
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 18 10:40:01 +0000 2020
>Last-Modified:  Fri Jun 05 07:40:01 +0000 2020
>Originator:     Jared McNeill
>Release:        9.99.50
NetBSD nge 9.99.49 NetBSD 9.99.49 (GENERIC64) #0: Sun Mar 15 15:58:24 UTC 2020 evbarm
Running installmodules to an empty target directory does not create all required directories. sys/modules/xldscripts/Makefile attempts to install a file to ${target}/usr/libdata/ldscripts/ and fails:

#   install  /tmp/mod/usr/libdata/ldscripts/kmodule
/home/jmcneill/netbsd/cvs-src/obj/tooldir.NetBSD-9.99.49-evbarm/bin/aarch64--netbsd-install -U -M /tmp/mod/METALOG -D /tmp/mod -h sha256 -N /home/jmcneill/netbsd/cvs-src/etc -c -p -r  -o root  -g wheel  -m 444   kmodule /tmp/mod/usr/libdata/ldscripts/kmodule
aarch64--netbsd-install: /tmp/mod/usr/libdata/ldscripts/kmodule.inst.aD8ehP: mkstemp: No such file or directory

*** Failed target:  /tmp/mod/usr/libdata/ldscripts/kmodule
*** Failed command: /home/jmcneill/netbsd/cvs-src/obj/tooldir.NetBSD-9.99.49-evbarm/bin/aarch64--netbsd-install -U -M /tmp/mod/METALOG -D /tmp/mod -h sha256 -N /home/jmcneill/netbsd/cvs-src/etc -c -p -r -o root -g wheel -m 444 kmodule /tmp/mod/usr/libdata/ldscripts/kmodule
*** Error code 1
$ mkdir /tmp/mod
$ ./ -U -m evbarm64 -j4 installmodules=/tmp/mod

From: Christian Kujau <>
Subject: Re: toolchain/55081
Date: Fri, 5 Jun 2020 00:36:37 -0700 (PDT)

 Note that this only happens when not installing in "/", i.e. running 
 "installmodules" without "=/tmp/mod" is running just fine because 
 /usr/libdata/ldscripts already exists.


   mkdir -p /tmp/mod/usr/libdata/ldscripts

 ..but I guess this has to be included into share/mk/ 

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.