Multiple "identifier _Ctype_struct_[...] may conflict with identifiers generated by cgo" errors when building packetbeat with go.1.12.
mtorromeo opened this issue · 4 comments
mtorromeo commented
The following errors were introduced in beats release 6.6.1 with #10477.
go build -i -ldflags "-X github.com/elastic/beats/libbeat/version.buildTime=2019-03-04T08:34:22Z -X github.com/elastic/beats/libbeat/version.commit=6.6.1"
# github.com/elastic/beats/vendor/github.com/tsg/gopacket/pcap
../vendor/github.com/tsg/gopacket/pcap/pcap.go:173:7: identifier "_Ctype_struct_bpf_program" may conflict with identifiers generated by cgo
../vendor/github.com/tsg/gopacket/pcap/pcap.go:385:13: identifier "_Ctype_struct_pcap_stat" may conflict with identifiers generated by cgo
../vendor/github.com/tsg/gopacket/pcap/pcap.go:446:10: identifier "_Ctype_struct_bpf_program" may conflict with identifiers generated by cgo
../vendor/github.com/tsg/gopacket/pcap/pcap.go:489:21: identifier "_Ctype_struct_bpf_program" may conflict with identifiers generated by cgo
../vendor/github.com/tsg/gopacket/pcap/pcap.go:552:34: identifier "_Ctype_struct_pcap_addr" may conflict with identifiers generated by cgo
../vendor/github.com/tsg/gopacket/pcap/pcap.go:555:56: identifier "_Ctype_struct_pcap_addr" may conflict with identifiers generated by cgo
../vendor/github.com/tsg/gopacket/pcap/pcap.go:821:13: identifier "_Ctype_struct_pcap_pkthdr" may conflict with identifiers generated by cgo
make: *** [../libbeat/scripts/Makefile:100: packetbeat] Error 2
The issue is present in the vendored tsg/gopacket but is already fixed in google/gopacket#589.
leopucci commented
Winner winner... pull request for dinner =)
leopucci commented
Library already fixed
tsg/gopacket@dd3d0e4
tsg/gopacket#18
botelastic commented
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
botelastic commented
This issue doesn't have a Team:<team>
label.