google / google/gopacket

Problems building for 32bit mips linux on Windows/Ubuntu environment

Open
#865 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
6.8k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Hi,

I'm currently trying to compile a Go application using GoPacket on my machine for running on my router. Unfortunately the machine is too small to run the go compilation on it, so I would like to compile the binary on my development machine and then install only the resulting binary on the device (This should work)

Unfortunately when compiling the application with: GOOS=linux;GOARCH=mips;GOMIPS=softfloat
I'm getting the following errors from the compiler:

`# github.com/google/gopacket/pcap
C:\Users\cdutz\go\pkg\mod\github.com\google\gopacket@v1.1.19\pcap\pcap.go:30:22: undefined: pcapErrorNotActivated
C:\Users\cdutz\go\pkg\mod\github.com\google\gopacket@v1.1.19\pcap\pcap.go:52:17: undefined: pcapTPtr
C:\Users\cdutz\go\pkg\mod\github.com\google\gopacket@v1.1.19\pcap\pcap.go:64:10: undefined: pcapPkthdr
C:\Users\cdutz\go\pkg\mod\github.com\google\gopacket@v1.1.19\pcap\pcap.go:103:6: undefined: pcapBpfProgram
C:\Users\cdutz\go\pkg\mod\github.com\google\gopacket@v1.1.19\pcap\pcap.go:110:7: undefined: pcapPkthdr
C:\Users\cdutz\go\pkg\mod\github.com\google\gopacket@v1.1.19\pcap\pcap.go:268:33: undefined: pcapErrorActivated
C:\Users\cdutz\go\pkg\mod\github.com\google\gopacket@v1.1.19\pcap\pcap.go:269:33: undefined: pcapWarningPromisc
C:\Users\cdutz\go\pkg\mod\github.com\google\gopacket@v1.1.19\pcap\pcap.go:270:33: undefined: pcapErrorNoSuchDevice
C:\Users\cdutz\go\pkg\mod\github.com\google\gopacket@v1.1.19\pcap\pcap.go:271:33: undefined: pcapErrorDenied
C:\Users\cdutz\go\pkg\mod\github.com\google\gopacket@v1.1.19\pcap\pcap.go:272:33: undefined: pcapErrorNotUp
C:\Users\cdutz\go\pkg\mod\github.com\google\gopacket@v1.1.19\pcap\pcap.go:272:33: too many errors
`

It seems as if on windows systems these constants are defined by the files defs_windows_386.go or defs_windows_amd64.go while on Linux (Ubuntu) it seems to be using pcap_unix.go. I would have expected it to use the same in case of my mips linux.

Am I missing anything that would enable me to compile this application?

Your help would be greatly appreciated.

Chris

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.