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

Help to build golang-github-boltdb-bolt on riscv64



Hi,
There are several packages ftbfs issue on riscv64 due to golang-github-boltdb-bolt:
https://udd.debian.org/cgi-bin/ftbfs.cgi?arch=riscv64 
e.g: the vuls build log:
https://buildd.debian.org/status/fetch.php?pkg=vuls&arch=riscv64&ver=0.6.1-3&stamp=1650290490&raw=0  
```
golang.org/x/crypto/curve25519/internal/field
# github.com/boltdb/bolt
src/github.com/boltdb/bolt/db.go:101:13: undeclared name maxMapSize for array length
src/github.com/boltdb/bolt/db.go:317:12: undefined: maxMapSize
src/github.com/boltdb/bolt/db.go:335:10: undefined: maxMapSize
src/github.com/boltdb/bolt/db.go:336:8: undefined: maxMapSize
src/github.com/boltdb/bolt/db.go:795:2: pos declared but not used
src/github.com/boltdb/bolt/bolt_unix.go:62:15: undeclared name maxMapSize for array length
src/github.com/boltdb/bolt/bucket.go:135:15: undefined: brokenUnaligned
src/github.com/boltdb/bolt/freelist.go:166:2: idx declared but not used
src/github.com/boltdb/bolt/freelist.go:169:19: undeclared name maxAllocSize for array length
src/github.com/boltdb/bolt/freelist.go:176:14: undeclared name maxAllocSize for array length
src/github.com/boltdb/bolt/freelist.go:166:2: too many errors
...
```
The fact is that the github.com/boltdb/bolt is public archive(This is another process to replace it with https://github.com/etcd-io/bbolt)

Now I patched for golang-github-boltdb-bolt to build on riscv64 from bbolt but got error:
 ```
Command: dpkg-buildpackage --sanitize-env -us -uc -b -rfakeroot
dpkg-buildpackage: info: source package golang-github-boltdb-bolt
dpkg-buildpackage: info: source version 1.3.1-7
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Nilesh Patra <npatra974@gmail.com>
 dpkg-source --before-build .
dpkg-buildpackage: info: host architecture riscv64
 debian/rules clean
dh clean --buildsystem=golang --with=golang
   dh_auto_clean -O--buildsystem=golang
   dh_autoreconf_clean -O--buildsystem=golang
   dh_clean -O--buildsystem=golang
 debian/rules binary
dh binary --buildsystem=golang --with=golang
   dh_update_autotools_config -O--buildsystem=golang
   dh_autoreconf -O--buildsystem=golang
   dh_auto_configure -O--buildsystem=golang
   dh_auto_build -O--buildsystem=golang
found packages bolt (bolt_linux.go) and bbolt (bolt_riscv64.go) in /<<PKGBUILDDIR>>/obj-riscv64-linux-gnu/src/github.com/boltdb/bolt
        cd obj-riscv64-linux-gnu && go install -trimpath -v -p 4
package .: no Go files in /<<PKGBUILDDIR>>/obj-riscv64-linux-gnu
dh_auto_build: error: cd obj-riscv64-linux-gnu && go install -trimpath -v -p 4 returned exit code 1
make: *** [debian/rules:7: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
```
I am unfamiliar with the golang (build)packaging mechanism so please give any help to fix it ;)

BR,
Bo

Attachment: 0005-add-support-riscv64.patch
Description: Binary data


Reply to: