Port-alpha archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Building pkgsrc fails by strange awk behavior?



Hello,

I recently installed NetBSD/alpha-10.0_RC1 on QEMU(-8.0.2 from pkgsrc,
the host machine is NetBSD/amd64-10.0_BETA + pkgsrc-2023Q2).
The alpha installation went fine, so then I extracted and built
pkgsrc(-2023Q4), but several strange errors occured:

 :
 checksum: distinfo file missing: /export/pkgsrc/shells/tcsh/distinfo
 ERROR: Make sure the Makefile and checksum file (/usr/pkgsrc/shells/tcsh/distinfo)
 ERROR: are up to date.  If you want to override this check, type
 ERROR: "/usr/bin/make NO_CHECKSUM=yes [other args]".
 *** Error code 1

Where I (often) use /usr/pkgsrc -> /export/pkgsrc symlink.  And
of course /usr/pkgsrc/shells/tcsh/distinfo exists as a regular file.

The top message is output by pkgsrc/mk/checksum/checksum.awk.
 83:	cmd = sprintf("test -f %s", distinfo)
 84:	if (system(cmd) != 0) {
 85:		err(sprintf("%s: distinfo file missing: %s", progname,
 86:		    distinfo))

I found the return value of system(cmd) was 4611686018427387904 (=2^62)!
So this is the minimum code to reproduce the problem:

 alpha# uname -srm
 NetBSD 10.0_RC1 alpha
 alpha# test foo ; echo $?
 0
 alpha# awk 'BEGIN { print(system("test foo")); }'
 4611686018427387904
 alpha#

Of course it should print 0.

 amd64# uname -srm
 NetBSD 10.0_BETA amd64
 amd64# test foo ; echo $?
 0
 amd64# awk 'BEGIN { print(system("test foo")); }'
 0
 amd64#

What's happened? or can anyone reproduce it?
---
Tetsuya Isaki <isaki%pastel-flower.jp@localhost / isaki%NetBSD.org@localhost>


Home | Main Index | Thread Index | Old Index