Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem of cross compile gopacket in mips #33

Open
superironbird opened this issue Jul 9, 2019 · 0 comments
Open

problem of cross compile gopacket in mips #33

superironbird opened this issue Jul 9, 2019 · 0 comments

Comments

@superironbird
Copy link

I got a problem of cross compiling program based on gopacket :
the env of go is-------->
GOARCH="mips"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="mips-linux-gcc"
GOGCCFLAGS="-fPIC -mabi=32 -march=mips32 -pthread -fmessage-length=0"
CXX="mips-linux-g++"
CGO_ENABLED="1"
CGO_CFLAGS="-I/usr/include"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-L/root/Desktop/libpcap-1.9.0"
PKG_CONFIG="pkg-config"

the result of it is:

runtime/cgo

cc1: warnings being treated as errors
In file included from gcc_libinit.c:8:
/usr/include/pthread.h:675: Warning:‘regparm’ attribute directive ignored
/usr/include/pthread.h:687: Warning:‘regparm’ attribute directive ignored
/usr/include/pthread.h:732: Warning:‘regparm’ attribute directive ignored

I change the include path to "-I/root/Desktop/libpcap-1.9.0" ,the result is:
loading DWARF type: decoding dwarf section info at offset 0x157: unexpected opcode

I have no idea about that.Can u help me?: )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant