Source: golang-ginkgo
Version: 1.2.0-1

It failed to build on arm64:

https://buildd.debian.org/status/package.php?p=golang-ginkgo&suite=sid

The error was:

src/github.com/onsi/ginkgo/internal/remote/output_interceptor_unix.go:34: 
undefined: syscall.Dup2
src/github.com/onsi/ginkgo/internal/remote/output_interceptor_unix.go:35: 
undefined: syscall.Dup2

On arm64 there is no dup2 system call; there's only dup3:
dup2(oldfd, newfd) is equivalent to dup3(oldfd, newfd, 0)
unless oldfd == newfd.

I don't know whether you can use dup3 on all the architectures you
care about or whether there's a Go package that already provides a
Dup2 wrapper that works on all architectures. If you're not interested
in errors and don't care about the performance cost of an additional
system call then you could probably just call Dup2 and Dup3: one will
do what you want and the other won't do any damage even if both are
implemented, as far as I can tell.

Reply via email to