Hello
While debugging the build failure on ppc64le, I found that the
main issue behind the build failure error was because of 2
seperate calls to dh_autobuild in debian/rules of delve package.
The first one (generic was causing this issue because of no tags
been passed). As a temporary workaround for testing, I commented
that and the build was able to move forward without the error.
Proposed fix:
I am thinking to add the build command based on the arch -
condition to avoid these errors in rules file.
But, further during the build, I got one another below error in
dh_auto_test,
ok
github.com/go-delve/delve/service/test 121.628s
FAIL
dh_auto_test: error: cd obj-powerpc64le-linux-gnu && go
test -vet=off -v -p 8 -tags exp.linuxppc64le,exp.linuxriscv64
github.com/go-delve/delve/cmd/dlv
github.com/go-delve/delve/cmd/dlv/cmds
github.com/go-delve/delve/cmd/dlv/cmds/helphelpers
github.com/go-delve/delve/pkg/astutil
github.com/go-delve/delve/pkg/config
github.com/go-delve/delve/pkg/dwarf
github.com/go-delve/delve/pkg/dwarf/dwarfbuilder
github.com/go-delve/delve/pkg/dwarf/frame
github.com/go-delve/delve/pkg/dwarf/godwarf
github.com/go-delve/delve/pkg/dwarf/leb128
github.com/go-delve/delve/pkg/dwarf/line
github.com/go-delve/delve/pkg/dwarf/loclist
github.com/go-delve/delve/pkg/dwarf/op
github.com/go-delve/delve/pkg/dwarf/reader
github.com/go-delve/delve/pkg/dwarf/regnum
github.com/go-delve/delve/pkg/elfwriter
github.com/go-delve/delve/pkg/gobuild
github.com/go-delve/delve/pkg/goversion
github.com/go-delve/delve/pkg/internal/gosym
github.com/go-delve/delve/pkg/locspec
github.com/go-delve/delve/pkg/logflags
github.com/go-delve/delve/pkg/proc
github.com/go-delve/delve/pkg/proc/amd64util
github.com/go-delve/delve/pkg/proc/core
github.com/go-delve/delve/pkg/proc/core/minidump
github.com/go-delve/delve/pkg/proc/debuginfod
github.com/go-delve/delve/pkg/proc/evalop
github.com/go-delve/delve/pkg/proc/fbsdutil
github.com/go-delve/delve/pkg/proc/gdbserial
github.com/go-delve/delve/pkg/proc/internal/ebpf
github.com/go-delve/delve/pkg/proc/linutil
github.com/go-delve/delve/pkg/proc/macutil
github.com/go-delve/delve/pkg/proc/native
github.com/go-delve/delve/pkg/proc/test
github.com/go-delve/delve/pkg/proc/winutil
github.com/go-delve/delve/pkg/terminal
github.com/go-delve/delve/pkg/terminal/colorize
github.com/go-delve/delve/pkg/terminal/starbind
github.com/go-delve/delve/pkg/version
github.com/go-delve/delve/service
github.com/go-delve/delve/service/api
github.com/go-delve/delve/service/dap
github.com/go-delve/delve/service/dap/daptest
github.com/go-delve/delve/service/debugger
github.com/go-delve/delve/service/internal/sameuser
github.com/go-delve/delve/service/rpc2
github.com/go-delve/delve/service/rpccommon
github.com/go-delve/delve/service/test returned exit code 1
make[1]: *** [debian/rules:23: override_dh_auto_test] Error 25
make[1]: Leaving directory
'/home/debian/delve-test/delve-1.24.0'
make: *** [debian/rules:9: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess
returned exit status 2
debuild: fatal error at line 1185:
dpkg-buildpackage -us -uc -ui -b failed
I suspect it was because there were some tests which are just for
amd64 and it was failing due to a ppc64le arch. For that, I have
created the below patch.
--- delve-1.24.0.orig/pkg/proc/core/core_test.go
+++ delve-1.24.0/pkg/proc/core/core_test.go
@@ -249,6 +249,9 @@ func logRegisters(t *testing.T, regs pro
}
func TestCore(t *testing.T) {
+ if runtime.GOARCH != "amd64" {
+ t.Skip("TestCore only supported on amd64")
+ }
if runtime.GOOS != "linux" || runtime.GOARCH == "386" {
t.Skip("unsupported")
}
@@ -409,6 +412,9 @@ func TestCoreFpRegisters(t *testing.T) {
}
func TestCoreWithEmptyString(t *testing.T) {
+ if runtime.GOARCH != "amd64" {
+ t.Skip("TestCore only supported on amd64")
+ }
if runtime.GOOS != "linux" || runtime.GOARCH == "386" {
t.Skip("unsupported")
}
Further, I got one more issue in the dh_auto_install stage because
of multiple package names
within the same folder, so it throws this error.
obj-powerpc64le-linux-gnu/src/github.com/go-delve/delve/service/debugger/debugger.go:31:2:
found packages native (dump_linux.go) and
your_linux_architecture_is_not_supported_by_delve
(support_sentinel_linux.go) in
/build/reproducible-path/delve-1.24.0/obj-powerpc64le-linux-gnu/src/github.com/go-delve/delve/pkg/proc/nativedh_golang:
error: go list -f '{{ range .Deps }}{{.}}
{{ end }}' returned exit code 1
make: *** [debian/rules:10: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess
returned exit status 2
I tried to check and make some alterations in the
support_sentinel_linux.go file but no success. Its strange even
though it has proper conditions , this file is getting created.
So, For that, I have thought of a workaround to remove this file
manually in configure stage in rules file.
override_dh_auto_configure:
if [ "$(DEB_HOST_ARCH)" = "ppc64el" ]; then \
rm -f pkg/proc/native/support_sentinel_linux.go ; \
fi
dh_auto_configure
Please let me know your reviews and thoughts on this.