Your message dated Sat, 20 Sep 2025 04:35:10 +0000
with message-id <[email protected]>
and subject line Bug#1114841: fixed in golang-1.24 1.24.4-4
has caused the Debian Bug report #1114841,
regarding golang-1.24: backport fix cgo on riscv64 when building with gcc-15
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1114841: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1114841
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: golang-1.24
Version: 1.24.4-3
Severity: important
Tags: patch
X-Debbugs-Cc: [email protected], Meng Zhuo <[email protected]>
User: [email protected]
Usertags: riscv64
Control: affects -1 src:glow 
Control: affects -1 src:gocryptfs

Hi,

Recently some go-* packages has ftbfs issue, like gocryptfs[0], glow[1]:

```
# github.com/rfjakob/gocryptfs/internal/ctlsocksrv.test
loadelf: $WORK/b132/_pkg_.a(_x001.o): 190878: sym#47 (".LVUS0"): ignoring 
symbol in section 8 (".debug_loclists") (type 0)
panic: unexpected empty container symbol

goroutine 1 [running]:
cmd/link/internal/loader.(*Loader).AddInteriorSym(0x3f7417e008, 0x2e99f, 
0x2e9b3)
        cmd/link/internal/loader/loader.go:1745 +0x238
cmd/link/internal/loader.(*SymbolBuilder).AddInteriorSym(...)
        cmd/link/internal/loader/symbolbuilder.go:202
cmd/link/internal/loadelf.Load(0x3f7417e008, 0x55da40, 0xb2, 0x3f7402c550, 
{0x3f7810aee7, 0x3}, 0xdc0, {0x3f746b4930, 0x2d}, 0x4)
        cmd/link/internal/loadelf/ldelf.go:633 +0x3518
cmd/link/internal/ld.ldobj.func1(0x3f741c4200, 0xc0eefc90dd5e1e7c?, 
{0x3f7810aee7?, 0x1?}, 0x4000?, {0x3f746b4930?, 0x0?})
        cmd/link/internal/ld/lib.go:2278 +0xa8
cmd/link/internal/ld.hostobjs(0x3f741c4200)
        cmd/link/internal/ld/lib.go:1241 +0x14c
cmd/link/internal/ld.(*Link).loadlib(0x3f741c4200)
        cmd/link/internal/ld/lib.go:615 +0x534
cmd/link/internal/ld.Main(_, {0x8, 0x20, 0x1, 0x2, 0x1, 0x1, {0x0, 0x0, 0x0}, 
...})
        cmd/link/internal/ld/main.go:360 +0x11c4
main.main()
```

This is due to gcc-15 has some changes and golang upstream has
backported some commits to 1.24 branch but it seems this[2] was
missing.

I have tested both build for gocryptfs and glow with the commit[2],
they are okay. thanks for Meng zhuo's pointer.

Yeah, this upload need to fix #1112166 issue first.

[0]: 
https://buildd.debian.org/status/fetch.php?pkg=gocryptfs&arch=riscv64&ver=2.6.1-1&stamp=1757333291&raw=0
[1]: 
https://buildd.debian.org/status/fetch.php?pkg=glow&arch=riscv64&ver=2.1.1-1&stamp=1757466612&raw=0
[2]: https://go-review.googlesource.com/c/go/+/668276
[3]: https://bugs.debian.org/1112166

-- 
Regards,
--
  Bo YU

diff -Nru golang-1.24-1.24.4/debian/changelog 
golang-1.24-1.24.4/debian/changelog
--- golang-1.24-1.24.4/debian/changelog 2025-08-19 05:22:03.000000000 +0000
+++ golang-1.24-1.24.4/debian/changelog 2025-09-10 08:13:48.000000000 +0000
@@ -1,3 +1,11 @@
+golang-1.24 (1.24.4-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix cgo on riscv64 link issue. (Closes: #-1)
+  * workaround to skip tsan test on riscv64. (Closes: #1112166)
+
+ -- Bo YU <[email protected]>  Wed, 10 Sep 2025 16:13:48 +0800
+
 golang-1.24 (1.24.4-3) unstable; urgency=medium
 
   * Set better CC defaults around arm* (native for arm*, armhf for others)
diff -Nru golang-1.24-1.24.4/debian/patches/0003-Fix-cgo-on-rv64-gcc-15.patch 
golang-1.24-1.24.4/debian/patches/0003-Fix-cgo-on-rv64-gcc-15.patch
--- golang-1.24-1.24.4/debian/patches/0003-Fix-cgo-on-rv64-gcc-15.patch 
1970-01-01 00:00:00.000000000 +0000
+++ golang-1.24-1.24.4/debian/patches/0003-Fix-cgo-on-rv64-gcc-15.patch 
2025-09-10 08:13:26.000000000 +0000
@@ -0,0 +1,64 @@
+From 12e5efd71011fbb5816a1d815e91b5c865fa9a83 Mon Sep 17 00:00:00 2001
+From: Mark Ryan <[email protected]>
+Date: Fri, 25 Apr 2025 17:23:49 +0200
+Subject: [PATCH] cmd/link: fix cgo on riscv64 when building with gcc-15
+
+It's not currently possible to build cgo programs that are partially
+compiled with gcc-15 on riscv64 using the internal linker. There are
+two reasons for this.
+
+1. When gcc-15 compiles _cgo_export.c, which contains no actual code,
+   for a riscv64 target, it emits a label in the .text section called
+   .Letext0. This label is referred to by another section, .debug_line,
+   and an entry is generated in the symbol table for it. The Go linker
+   panics when processing the .Letext0 symbol in _cgo_export.o, as it
+   occurs in an empty section.
+2. GCC-15 is generating additional debug symbols with the .LVUS
+   prefix, e.g., .LVUS33, that need to be ignored.
+
+We fix the issue by removing the check in
+cmd/link/internal/loader/loader.go that panics if we encounter a
+symbol in an empty section (the comments preceding this check suggest
+it's safe to remove it) and by adding .LVUS to the list of symbol
+prefixes to ignore.
+
+Fixes #72840
+
+Change-Id: I00658b6bdd01606dde1581b5bc2f42edfc37de82
+Reviewed-on: https://go-review.googlesource.com/c/go/+/668276
+Auto-Submit: Dmitri Shuralyov <[email protected]>
+LUCI-TryBot-Result: Go LUCI 
<[email protected]>
+Reviewed-by: Dmitri Shuralyov <[email protected]>
+Reviewed-by: Joel Sing <[email protected]>
+Reviewed-by: Carlos Amedee <[email protected]>
+Reviewed-by: Meng Zhuo <[email protected]>
+---
+
+--- a/src/cmd/link/internal/loadelf/ldelf.go
++++ b/src/cmd/link/internal/loadelf/ldelf.go
+@@ -609,7 +609,7 @@
+                               continue
+                       }
+ 
+-                      if strings.HasPrefix(elfsym.name, ".LASF") || 
strings.HasPrefix(elfsym.name, ".LLRL") || strings.HasPrefix(elfsym.name, 
".LLST") {
++                      if strings.HasPrefix(elfsym.name, ".LASF") || 
strings.HasPrefix(elfsym.name, ".LLRL") || strings.HasPrefix(elfsym.name, 
".LLST") || strings.HasPrefix(elfsym.name, ".LVUS") {
+                               // gcc on s390x and riscv64 does this.
+                               continue
+                       }
+--- a/src/cmd/link/internal/loader/loader.go
++++ b/src/cmd/link/internal/loader/loader.go
+@@ -1736,14 +1736,6 @@
+ // expected to have the actual content/payload) and then a set of
+ // interior loader.Sym's that point into a portion of the container.
+ func (l *Loader) AddInteriorSym(container Sym, interior Sym) {
+-      // Container symbols are expected to have content/data.
+-      // NB: this restriction may turn out to be too strict (it's possible
+-      // to imagine a zero-sized container with an interior symbol pointing
+-      // into it); it's ok to relax or remove it if we counter an
+-      // oddball host object that triggers this.
+-      if l.SymSize(container) == 0 && len(l.Data(container)) == 0 {
+-              panic("unexpected empty container symbol")
+-      }
+       // The interior symbols for a container are not expected to have
+       // content/data or relocations.
+       if len(l.Data(interior)) != 0 {
diff -Nru 
golang-1.24-1.24.4/debian/patches/0003-Skip-flasky-TestAsan-on-riscv64.patch 
golang-1.24-1.24.4/debian/patches/0003-Skip-flasky-TestAsan-on-riscv64.patch
--- 
golang-1.24-1.24.4/debian/patches/0003-Skip-flasky-TestAsan-on-riscv64.patch    
    1970-01-01 00:00:00.000000000 +0000
+++ 
golang-1.24-1.24.4/debian/patches/0003-Skip-flasky-TestAsan-on-riscv64.patch    
    2025-09-10 08:13:48.000000000 +0000
@@ -0,0 +1,51 @@
+Description: skip tsan test on riscv64
+ Race detector on riscv64 is not support yet, this is usually no problem on 
Debian
+ building because it will be skipped automatically. But others package updated
+ recently lead to the test failed.
+Author: Bo YU <[email protected]>
+Origin: upstream, https://github.com/golang/go/issues/64345
+Bug: https://bugs.debian.org/1112166
+Last-Update: 2025-08-30
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/cmd/cgo/internal/testsanitizers/tsan_test.go
++++ b/src/cmd/cgo/internal/testsanitizers/tsan_test.go
+@@ -11,6 +11,7 @@
+       "os/exec"
+       "strings"
+       "testing"
++      "runtime"
+ )
+ 
+ func TestTSAN(t *testing.T) {
+@@ -29,6 +30,10 @@
+       if !compilerRequiredTsanVersion(goos, goarch) {
+               t.Skipf("skipping on %s/%s; compiler version for -tsan option 
is too old.", goos, goarch)
+       }
++      if runtime.GOARCH == "riscv64" {
++              t.Skipf("skipping; flaky on %s", runtime.GOARCH)
++      }
++
+ 
+       t.Parallel()
+       requireOvercommit(t)
+--- a/src/cmd/cgo/internal/testsanitizers/cshared_test.go
++++ b/src/cmd/cgo/internal/testsanitizers/cshared_test.go
+@@ -14,6 +14,7 @@
+       "os/exec"
+       "strings"
+       "testing"
++      "runtime"
+ )
+ 
+ func TestShared(t *testing.T) {
+@@ -65,6 +66,9 @@
+                       t.Logf("skipping %s test on %s/%s; compiler version too 
old for -tsan.", name, GOOS, GOARCH)
+                       continue
+               }
++              if runtime.GOARCH == "riscv64" {
++                      t.Skipf("skipping; flaky on %s", runtime.GOARCH)
++              }
+ 
+               t.Run(name, func(t *testing.T) {
+                       t.Parallel()
diff -Nru golang-1.24-1.24.4/debian/patches/series 
golang-1.24-1.24.4/debian/patches/series
--- golang-1.24-1.24.4/debian/patches/series    2025-08-08 02:26:49.000000000 
+0000
+++ golang-1.24-1.24.4/debian/patches/series    2025-09-10 08:13:48.000000000 
+0000
@@ -1,2 +1,4 @@
 0001-Skip-flaky-TestCrashDumpsAllThreads-on-mips64le.patch
 0002-Skip-flaky-TestCrashDumpsAllThreads-on-s390x.patch
+0003-Skip-flasky-TestAsan-on-riscv64.patch
+0003-Fix-cgo-on-rv64-gcc-15.patch
diff -Nru golang-1.24-1.24.4/debian/patches/series.orig 
golang-1.24-1.24.4/debian/patches/series.orig
--- golang-1.24-1.24.4/debian/patches/series.orig       1970-01-01 
00:00:00.000000000 +0000
+++ golang-1.24-1.24.4/debian/patches/series.orig       2025-09-10 
08:13:15.000000000 +0000
@@ -0,0 +1,3 @@
+0001-Skip-flaky-TestCrashDumpsAllThreads-on-mips64le.patch
+0002-Skip-flaky-TestCrashDumpsAllThreads-on-s390x.patch
+0003-Fix-cgo-on-rv64-gcc-15.patch

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: golang-1.24
Source-Version: 1.24.4-4
Done: Bo YU <[email protected]>

We believe that the bug you reported is fixed in the latest version of
golang-1.24, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Bo YU <[email protected]> (supplier of updated golang-1.24 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Fri, 19 Sep 2025 21:09:50 -0700
Source: golang-1.24
Architecture: source
Version: 1.24.4-4
Distribution: unstable
Urgency: medium
Maintainer: Debian Go Compiler Team <[email protected]>
Changed-By: Bo YU <[email protected]>
Closes: 1112166 1114841
Changes:
 golang-1.24 (1.24.4-4) unstable; urgency=medium
 .
   * Skip failing TSAN tests on riscv64 (Closes: #1112166)
   * Fix cgo on riscv64 internal linker issue (Closes: #1114841)
Checksums-Sha1:
 ac5bf6739946b8789c33ef8f8a09dcd0d984359c 2923 golang-1.24_1.24.4-4.dsc
 aa4e6654b0c2295a408a5176499a7dbf54367239 45344 
golang-1.24_1.24.4-4.debian.tar.xz
 f8710672cdb536772a1a3880c98ff16ec921def1 5486 
golang-1.24_1.24.4-4_source.buildinfo
Checksums-Sha256:
 29ffc85c1e64a2b9412d3e2319d1c4a80d63953a6807b4c1f76f32938fe807d1 2923 
golang-1.24_1.24.4-4.dsc
 6dacc7ea0da1ae0da306b6a056b26fbe1a28a7c76370c007f3cd645a8ded7137 45344 
golang-1.24_1.24.4-4.debian.tar.xz
 6f53976ba4688ca14fcf1906949e96fbc52a10d820dc94a21d2ef2f6bbfe0d72 5486 
golang-1.24_1.24.4-4_source.buildinfo
Files:
 16b314a4350b2791b4f8084d942a47c9 2923 golang optional golang-1.24_1.24.4-4.dsc
 47af70e847cda9795576a7948de7b696 45344 golang optional 
golang-1.24_1.24.4-4.debian.tar.xz
 ecd315f6ad376b896afb59ee7f8c73b8 5486 golang optional 
golang-1.24_1.24.4-4_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJGBAEBCgAwFiEEtC9oGQB/APiONk/UA2qcJb81fdQFAmjOKVISHHRpYW5vbkBk
ZWJpYW4ub3JnAAoJEANqnCW/NX3UqNEP/2VJCXfUIpoca0u/f6OKAJL0PSRb0i7q
ZrhHZA+LsrmfJUXxVfvujYc7/DrHHShIn/Ou3tnnRFl9JpCcAKmI2Uz9onSeeyBB
RS8d4d33sxdgiUl8kZpGHYtlTDYUVVb5Rj0HxuRNTQnCvNxS25OG+4bp0VCBjHKH
ySIQiOzcdYMXECxpTmuwX52FGqmwYxr3EJY08yg2HMjnfiHEUgEOyISqJfsp1Xba
dju4Nlv3uj0jZBzBt9GLd4Tq1qfI58i6MOaTpGuAbvlSXVHEAgIamHCVNOvyzPcr
Y/MTVmUSuhkSUTX98+Tlx9SwFpvAA4ylRCkI9LIWJzxqjS7yju6X15vmzQgBxXei
ptH6pSt5p8s7efSzXsF7NX7cQBY32sbGUp0UurOKwX6x2d4WvzXAFV2VWTsjeuea
k20aCrvmY2orZjk82g9r2RR47y5tf+hkgwyIyWloyXgPsrsPq5747sUC1LlobUcz
+WSHao9CyaBhuF2HAKfrt8I4pWglTWFogTakt8EwJOrgM2UfFRQMRMrF761P/fxl
sYxeKIwZj+Pdy9evxBx7ygTNPyWicG+PxOfj+luuVJwUbEKZ1zVVL+w1f47XSm2V
WbitkxGeC/kV/nQXeqiR6ewvvAXnsIxF2UD6XQCLcRC8kgVrDsoIrJS9d4ynSpqL
YQPkabxXzSr1
=/i7K
-----END PGP SIGNATURE-----

Attachment: pgpyFWYiKHaFD.pgp
Description: PGP signature


--- End Message ---

Reply via email to