Source: golang-github-boltdb-bolt
Version: 1.3.1-7
Severity: normal
Tags: patch
User: debian-loonga...@lists.debian.org
Usertags: loong64

Dear maintainers,

The golang-github-boltdb-bolt source package lacks loong64 architecture support. Compiling the vuls package failed for loong64 in the Debian Package Auto-Building environment.
Build failed 9 times.

The build log can be found at https://buildd.debian.org/status/logs.php?pkg=vuls&ver=0.6.1-5&arch=loong64. After analyzing, the reported error is related to bolt project, please see the below info,
```
# github.com/boltdb/bolt
src/github.com/boltdb/bolt/db.go:101:13: undefined array length maxMapSize or missing type constraint
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
```

- Add loong64 support to bolt
The golang-github-boltdb-bolt package is belong to all arch package.
Please take care of the support for others architectures.
I have added loong64 support to bolt project (Archived, can not submit pull-request). Please check https://github.com/boltdb/bolt/compare/master...Dandan336:bolt:master.
You can also consider the patch I attached.

- The bolt upstream have been archived by the owner
The golang-github-boltdb-bolt package's Homepage (https://github.com/boltdb/bolt) has been archived by the owner.
Please consider to change one active Homepage.

Your opinions are welcome.

Thanks
Dandan Zhang

Description: Add loong64 support 
Last-Update: 2024-07-11

--- /dev/null
+++ golang-github-boltdb-bolt-1.3.1/bolt_loong64.go
@@ -0,0 +1,12 @@
+// +build loong64
+
+package bolt
+
+// maxMapSize represents the largest mmap size supported by Bolt.
+const maxMapSize = 0xFFFFFFFFFFFF // 256TB
+
+// maxAllocSize is the size used when creating array pointers.
+const maxAllocSize = 0x7FFFFFFF
+
+// Are unaligned load/stores broken on this arch?
+var brokenUnaligned = false

Reply via email to