Re: Input requested on proposed chnages for Delve compilation issues on ppc64le
tshah <[email protected]>
| Newsgroups | gmane.linux.debian.ports.powerpc |
|---|---|
| Message-ID | <[email protected]> |
On 29/08/25 03:04, Hector Oron wrote: > Hello, El jue, 28 ago 2025, 22: 08, tshah <tshah@ linux. ibm. com> > escribió: 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 > > Hello, > > El jue, 28 ago 2025, 22:08, tshah <[email protected]> escribió: > > 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. > > This is strange, I am not sure why 2 separate dh_autobuild calls > should be needed. > > Proposed fix: > > I am thinking to add the build command based on the arch - > condition to avoid these errors in rules file. > > I do wonder if the first dh_autobuild call can be removed for all > arches and keep package building. I tried to check that way firstly, but due to cross compilation , I am not able to run dh_auto_test and its failing. Although, the dh_auto_build command was executed properly. But, I am not sure if the tags passed in the autobuild step does something arch specific in the background or not. So, I thought to keep it safe via conditions. I also see the dh_auto_test command being used twice. I think we can also change that. > > But, further during the build, I got one another below error in > dh_auto_test, > > ok github.com/go-delve/delve/service/test > <http://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 > <http://github.com/go-delve/delve/cmd/dlv> > github.com/go-delve/delve/cmd/dlv/cmds > <http://github.com/go-delve/delve/cmd/dlv/cmds> > github.com/go-delve/delve/cmd/dlv/cmds/helphelpers > <http://github.com/go-delve/delve/cmd/dlv/cmds/helphelpers> > github.com/go-delve/delve/pkg/astutil > <http://github.com/go-delve/delve/pkg/astutil> > github.com/go-delve/delve/pkg/config > <http://github.com/go-delve/delve/pkg/config> > github.com/go-delve/delve/pkg/dwarf > <http://github.com/go-delve/delve/pkg/dwarf> > github.com/go-delve/delve/pkg/dwarf/dwarfbuilder > <http://github.com/go-delve/delve/pkg/dwarf/dwarfbuilder> > github.com/go-delve/delve/pkg/dwarf/frame > <http://github.com/go-delve/delve/pkg/dwarf/frame> > github.com/go-delve/delve/pkg/dwarf/godwarf > <http://github.com/go-delve/delve/pkg/dwarf/godwarf> > github.com/go-delve/delve/pkg/dwarf/leb128 > <http://github.com/go-delve/delve/pkg/dwarf/leb128> > github.com/go-delve/delve/pkg/dwarf/line > <http://github.com/go-delve/delve/pkg/dwarf/line> > github.com/go-delve/delve/pkg/dwarf/loclist > <http://github.com/go-delve/delve/pkg/dwarf/loclist> > github.com/go-delve/delve/pkg/dwarf/op > <http://github.com/go-delve/delve/pkg/dwarf/op> > github.com/go-delve/delve/pkg/dwarf/reader > <http://github.com/go-delve/delve/pkg/dwarf/reader> > github.com/go-delve/delve/pkg/dwarf/regnum > <http://github.com/go-delve/delve/pkg/dwarf/regnum> > github.com/go-delve/delve/pkg/elfwriter > <http://github.com/go-delve/delve/pkg/elfwriter> > github.com/go-delve/delve/pkg/gobuild > <http://github.com/go-delve/delve/pkg/gobuild> > github.com/go-delve/delve/pkg/goversion > <http://github.com/go-delve/delve/pkg/goversion> > github.com/go-delve/delve/pkg/internal/gosym > <http://github.com/go-delve/delve/pkg/internal/gosym> > github.com/go-delve/delve/pkg/locspec > <http://github.com/go-delve/delve/pkg/locspec> > github.com/go-delve/delve/pkg/logflags > <http://github.com/go-delve/delve/pkg/logflags> > github.com/go-delve/delve/pkg/proc > <http://github.com/go-delve/delve/pkg/proc> > github.com/go-delve/delve/pkg/proc/amd64util > <http://github.com/go-delve/delve/pkg/proc/amd64util> > github.com/go-delve/delve/pkg/proc/core > <http://github.com/go-delve/delve/pkg/proc/core> > github.com/go-delve/delve/pkg/proc/core/minidump > <http://github.com/go-delve/delve/pkg/proc/core/minidump> > github.com/go-delve/delve/pkg/proc/debuginfod > <http://github.com/go-delve/delve/pkg/proc/debuginfod> > github.com/go-delve/delve/pkg/proc/evalop > <http://github.com/go-delve/delve/pkg/proc/evalop> > github.com/go-delve/delve/pkg/proc/fbsdutil > <http://github.com/go-delve/delve/pkg/proc/fbsdutil> > github.com/go-delve/delve/pkg/proc/gdbserial > <http://github.com/go-delve/delve/pkg/proc/gdbserial> > github.com/go-delve/delve/pkg/proc/internal/ebpf > <http://github.com/go-delve/delve/pkg/proc/internal/ebpf> > github.com/go-delve/delve/pkg/proc/linutil > <http://github.com/go-delve/delve/pkg/proc/linutil> > github.com/go-delve/delve/pkg/proc/macutil > <http://github.com/go-delve/delve/pkg/proc/macutil> > github.com/go-delve/delve/pkg/proc/native > <http://github.com/go-delve/delve/pkg/proc/native> > github.com/go-delve/delve/pkg/proc/test > <http://github.com/go-delve/delve/pkg/proc/test> > github.com/go-delve/delve/pkg/proc/winutil > <http://github.com/go-delve/delve/pkg/proc/winutil> > github.com/go-delve/delve/pkg/terminal > <http://github.com/go-delve/delve/pkg/terminal> > github.com/go-delve/delve/pkg/terminal/colorize > <http://github.com/go-delve/delve/pkg/terminal/colorize> > github.com/go-delve/delve/pkg/terminal/starbind > <http://github.com/go-delve/delve/pkg/terminal/starbind> > github.com/go-delve/delve/pkg/version > <http://github.com/go-delve/delve/pkg/version> > github.com/go-delve/delve/service > <http://github.com/go-delve/delve/service> > github.com/go-delve/delve/service/api > <http://github.com/go-delve/delve/service/api> > github.com/go-delve/delve/service/dap > <http://github.com/go-delve/delve/service/dap> > github.com/go-delve/delve/service/dap/daptest > <http://github.com/go-delve/delve/service/dap/daptest> > github.com/go-delve/delve/service/debugger > <http://github.com/go-delve/delve/service/debugger> > github.com/go-delve/delve/service/internal/sameuser > <http://github.com/go-delve/delve/service/internal/sameuser> > github.com/go-delve/delve/service/rpc2 > <http://github.com/go-delve/delve/service/rpc2> > github.com/go-delve/delve/service/rpccommon > <http://github.com/go-delve/delve/service/rpccommon> > github.com/go-delve/delve/service/test > <http://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") > } > > This is worth opening an issue upstream. Sure, I will open the issue and provide the fix as well. > > > > 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/ > <http://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 > <http://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 > > I suggest to document the issue upstream and add a comment stating > this is a workaround and add a pointer to the upstream issue. ohkay, sure. I will do that and add a link to the issue here. > > > > Please let me know your reviews and thoughts on this. > > Thanks very much for your work on this. > > Regards > >