Source: rootlesskit
Version: 2.0.2-2
Severity: normal
Tags: ftbfs
User: debian-loonga...@lists.debian.org
Usertags: loong64

Hi maintainers,

Compiling the rootlesskit failed for loong64 in the Debian Package Auto-Building environment.
The error log is as follows,
```
# github.com/u-root/uio/uio
src/github.com/u-root/uio/uio/buffer.go:176:19: undefined: ubinary.NativeEndian
```
The full log can be found at https://buildd.debian.org/status/logs.php?pkg=rootlesskit&ver=2.0.2-2&arch=loong64.

After analyzing, I found the arch=all package golang-github-u-root-uio-dev (version: 0.0~git20220204.dac05f7-2) lacks loong64 support. For example,
```
// +build 386 amd64 arm arm64 mipsle mips64le ppc64le riscv riscv64
package ubinary
import (
        "encoding/binary"
)
// NativeEndian is $GOARCH's implementation of byte order.
var NativeEndian = binary.LittleEndian
```
I have submitted bug for golang-github-u-root-uio (version: 0.0~git20220204.dac05f7-2) before, please check https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1074256.

Based on the attached patch in bugid 1074256, I added loong64 support to golang-github-u-root-uio (golang-github-u-root-uio-dev was built and installed), and then built rootlesskit successfully on local ENV.
```
dpkg-deb: building package 'rootlesskit' in '../rootlesskit_2.0.2-2_loong64.deb'. dpkg-deb: building package 'rootlesskit-dbgsym' in '../rootlesskit-dbgsym_2.0.2-2_loong64.deb'. dpkg-deb: building package 'golang-github-rootless-containers-rootlesskit-dev' in '../golang-github-rootless-containers-rootlesskit-dev_2.0.2-2_all.deb'.  dpkg-genbuildinfo --build=binary -O../rootlesskit_2.0.2-2_loong64.buildinfo
 dpkg-genchanges --build=binary -O../rootlesskit_2.0.2-2_loong64.changes
```

In summary, compile the rootlesskit failed for loong64, due to golang-github-u-root-uio (arch=all) lacks loong64 support.

- For golang-github-u-root-uio
In fact, github.com/u-root/uio/ubinary folder was removed in upstream, please check https://github.com/u-root/uio/pull/20.
Maybe there are 2 methods,
1. Add loong64 support in Debian golang-github-u-root-uio source package.
2. Or update upstream.

Thanks,
Dandan Zhang

Reply via email to