[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Compilation error on Go Generate



Hi,

On Fri, Feb 16, 2024 at 07:15:00PM -0800, Loren M. Lang wrote:
> I am trying to packagize pwru for Debian and it uses a generate stage to
> build some eBPF filters by compiling them into an object and embedding
> them into Go. The upstream owner provides a Makefile to handle the whole
> build, but I am trying to break it up and use dh-golang with it's
> built-in support for go generate. However, I am getting some kind of
> strange build failure I can't understand. When adding this to d/rules:
> 
> export DH_GOLANG_GO_GENERATE := 1
> 
> During the build, it fails with this output:
> 
> dh_auto_build -O--builddirectory=_build -O--buildsystem=golang
>    cd _build && go generate -v github.com/cilium/pwru
> 	   github.com/cilium/pwru/internal/byteorder
> 	   github.com/cilium/pwru/internal/libpcap
> 	   github.com/cilium/pwru/internal/pwru
> 	   src/github.com/cilium/pwru/build.go
> Generating for amd64                   
> Compiled /srv/build/pwru/clean/pwru/_build/src/github.com/cilium/pwru/kprobepwru_bpfel_x86.o
> Error: can't write /srv/build/pwru/clean/pwru/_build/src/github.com/cilium/pwru/kprobepwru_bpfel_x86.go:
>    can't load BPF from ELF: load data sections: data section .bss: can't get contents: unexpected read from SHT_NOBITS section
> exit status 1

Weird and interesting. Can you push your source package somewhere where this happens?

Best,
Nilesh

Attachment: signature.asc
Description: PGP signature


Reply to: