Open irish-bug opened 4 years ago
Yep I'm seeing this now too - thanks for hunting this down. If you want, feel free to clone, patch, and submit a PR. Otherwise I'll roll your changes up this week.
djfritz: I tried, but I get
remote: Permission to sandia-minimega/discovery.git denied to irish-bug.
Cloning latest version of discovery with go version 1.12.1 gave the following errors.
$ ./all.bash BUILD PACKAGES (linux) annotate collect discovery disctl lddhcpdlogs ldesnet ldnmap ldpcap vendor/github.com/google/gopacket/pcap ../../vendor/github.com/google/gopacket/pcap/pcap.go:202:7: identifier "_Ctype_struct_bpf_program" may conflict with identifiers generated by cgo ../../vendor/github.com/google/gopacket/pcap/pcap.go:482:13: identifier "_Ctype_struct_pcap_stat" may conflict with identifiers generated by cgo ../../vendor/github.com/google/gopacket/pcap/pcap.go:527:49: identifier "_Ctype_struct_bpf_program" may conflict with identifiers generated by cgo ../../vendor/github.com/google/gopacket/pcap/pcap.go:550:10: identifier "_Ctype_struct_bpf_program" may conflict with identifiers generated by cgo ../../vendor/github.com/google/gopacket/pcap/pcap.go:583:41: identifier "_Ctype_struct_bpf_insn" may conflict with identifiers generated by cgo ../../vendor/github.com/google/gopacket/pcap/pcap.go:655:66: identifier "_Ctype_struct_bpf_program" may conflict with identifiers generated by cgo ../../vendor/github.com/google/gopacket/pcap/pcap.go:668:19: identifier "_Ctype_struct_bpf_insn" may conflict with identifiers generated by cgo ../../vendor/github.com/google/gopacket/pcap/pcap.go:795:34: identifier "_Ctype_struct_pcap_addr" may conflict with identifiers generated by cgo ../../vendor/github.com/google/gopacket/pcap/pcap.go:798:56: identifier "_Ctype_struct_pcap_addr" may conflict with identifiers generated by cgo ldrouterconfig minemiter trim
TESTING ? pkg/commands [no test files] goos: linux goarch: amd64 pkg: pkg/minigraph BenchmarkBigGraph-2 1000000 1964 ns/op PASS ok pkg/minigraph 2.011s ? pkg/latlon [no test files] ? pkg/discovery [no test files] pkg/minilog ./minilog.go:268:2: missing ... in args forwarded to printf-like function FAIL pkg/minilog [build failed] PASS ok pkg/p0f 0.009s ? cmds/collect [no test files] ? cmds/ldnmap [no test files] ? cmds/disctl [no test files] ? cmds/ldrouterconfig [no test files] vendor/github.com/google/gopacket/pcap ../../vendor/github.com/google/gopacket/pcap/pcap.go:202:7: identifier "_Ctype_struct_bpf_program" may conflict with identifiers generated by cgo ../../vendor/github.com/google/gopacket/pcap/pcap.go:482:13: identifier "_Ctype_struct_pcap_stat" may conflict with identifiers generated by cgo ../../vendor/github.com/google/gopacket/pcap/pcap.go:527:49: identifier "_Ctype_struct_bpf_program" may conflict with identifiers generated by cgo ../../vendor/github.com/google/gopacket/pcap/pcap.go:550:10: identifier "_Ctype_struct_bpf_program" may conflict with identifiers generated by cgo ../../vendor/github.com/google/gopacket/pcap/pcap.go:583:41: identifier "_Ctype_struct_bpf_insn" may conflict with identifiers generated by cgo ../../vendor/github.com/google/gopacket/pcap/pcap.go:655:66: identifier "_Ctype_struct_bpf_program" may conflict with identifiers generated by cgo ../../vendor/github.com/google/gopacket/pcap/pcap.go:668:19: identifier "_Ctype_struct_bpf_insn" may conflict with identifiers generated by cgo ../../vendor/github.com/google/gopacket/pcap/pcap.go:795:34: identifier "_Ctype_struct_pcap_addr" may conflict with identifiers generated by cgo ../../vendor/github.com/google/gopacket/pcap/pcap.go:798:56: identifier "_Ctype_struct_pcap_addr" may conflict with identifiers generated by cgo FAIL cmds/ldpcap [build failed] ? cmds/discovery [no test files] ? cmds/lddhcpdlogs [no test files] cmds/trim ./main.go:292:5: Fatalln call has possible formatting directive %v ? cmds/annotate [no test files] ? cmds/ldesnet [no test files] ? cmds/minemiter [no test files]
Discovered this problem is already fixed in https://github.com/google/gopacket/pull/589
I removed the gopacket directory bundled with discovery and replaced by cloning latest version of gopacket from https://github.com/google/gopacket/
This removed the above errors, but one more error existed ./main.go:210:14: Error call has arguments but no formatting directives added %v where missing from that line and ldpcap built successfully.
Was not able to push these changes myself.