[DRE-maint] Bug#1105021: gitlab-shell: undefined errors on github.com/tklauser/go-sysconf
zhangdandan
zhangdandan at loongson.cn
Sat May 10 04:17:32 BST 2025
Source: gitlab-shell
Version: 14.35.0+ds1-2
Severity: normal
Tags: patch
User: debian-loongarch at lists.debian.org
Usertags: loong64
Dear maintainers,
Compiling the gitlab-shell failed for loong64 in the Debian Package
Auto-Building environment.
The error log is as follows,
```
#
gitlab.com/gitlab-org/gitlab-shell/v14/vendor/github.com/tklauser/go-sysconf
src/gitlab.com/gitlab-org/gitlab-shell/v14/vendor/github.com/tklauser/go-sysconf/sysconf_generic.go:20:10:
undefined: _BC_BASE_MAX
src/gitlab.com/gitlab-org/gitlab-shell/v14/vendor/github.com/tklauser/go-sysconf/sysconf_generic.go:22:10:
undefined: _BC_DIM_MAX
src/gitlab.com/gitlab-org/gitlab-shell/v14/vendor/github.com/tklauser/go-sysconf/sysconf_generic.go:24:10:
undefined: _BC_SCALE_MAX
src/gitlab.com/gitlab-org/gitlab-shell/v14/vendor/github.com/tklauser/go-sysconf/sysconf_generic.go:26:10:
undefined: _BC_STRING_MAX
src/gitlab.com/gitlab-org/gitlab-shell/v14/vendor/github.com/tklauser/go-sysconf/sysconf_generic.go:28:10:
undefined: _COLL_WEIGHTS_MAX
src/gitlab.com/gitlab-org/gitlab-shell/v14/vendor/github.com/tklauser/go-sysconf/sysconf_generic.go:30:10:
undefined: _EXPR_NEST_MAX
src/gitlab.com/gitlab-org/gitlab-shell/v14/vendor/github.com/tklauser/go-sysconf/sysconf_generic.go:32:10:
undefined: _HOST_NAME_MAX
src/gitlab.com/gitlab-org/gitlab-shell/v14/vendor/github.com/tklauser/go-sysconf/sysconf_generic.go:34:10:
undefined: _LINE_MAX
src/gitlab.com/gitlab-org/gitlab-shell/v14/vendor/github.com/tklauser/go-sysconf/sysconf_generic.go:36:10:
undefined: _LOGIN_NAME_MAX
src/gitlab.com/gitlab-org/gitlab-shell/v14/vendor/github.com/tklauser/go-sysconf/sysconf_generic.go:40:10:
undefined: _RE_DUP_MAX
src/gitlab.com/gitlab-org/gitlab-shell/v14/vendor/github.com/tklauser/go-sysconf/sysconf_generic.go:40:10:
too many errors
```
The full build log can be found at
https://buildd.debian.org/status/fetch.php?pkg=gitlab-shell&arch=loong64&ver=14.35.0%2Bds1-2&stamp=1742468622&raw=0.
After analyzing, I found that go.mod is ignored and only use system file.
Consistent build phenomena for gitlab and gitlab-shell.
Please consider the patch I attached.
- For gitlab-shell(attached patch gitlab-shell-update-go.mod.patch)
optional: need to update github.com/tklauser/go-sysconf's version in
go.mod and go.sum.
loong64 was supported in release
https://github.com/tklauser/go-sysconf/blob/v0.3.15.
- For gitaly(attached patch
gitaly-update-tklauser-go-sysconf-for-loong64.patch)
use vendor in gitaly source package.
github.com/tklauser/go-sysconf v0.3.10 is too old which do not support
loong64.
need to add loong64
support(vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_loong64.go)
to verdor directory in gitaly source package. Or update upstream for gitaly.
Based on my local gitlay(re-install golang-gitlab-gitlab-org-gitaly-dev
with loong64 support in my system), gitlab-shell was built successfully
on locally.
All in all, please add loong64 support in gitaly first(use upstream
v0.3.15 or add extra patch).
Then, please consider regenerating go.mod and go.sum for gitaly and
gitlab-shell source package.
Your opinions are welcome.
Best regards,
Dandan Zhang
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gitaly-update-tklauser-go-sysconf-for-loong64.patch
Type: text/x-patch
Size: 7673 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-ruby-extras-maintainers/attachments/20250510/090de590/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gitlab-shell-update-go.mod.patch
Type: text/x-patch
Size: 3608 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-ruby-extras-maintainers/attachments/20250510/090de590/attachment-0001.bin>
More information about the Pkg-ruby-extras-maintainers
mailing list