mitchellh / gox

A dead simple, no frills Go cross compile tool
Mozilla Public License 2.0
4.6k stars 355 forks source link

gox build go-ethereum #127

Open LowLowCoder-Mel opened 5 years ago

LowLowCoder-Mel commented 5 years ago

OS: MacOS cmd: gox --osarch="linux/amd64" .

Error:

Number of parallel builds: 3
linux/amd64: github.com/ethereum/go-ethereum/cmd/geth

1 errors occurred:
 linux/amd64 error: exit status 2
Stderr: go build github.com/ethereum/go-ethereum/crypto/secp256k1: build constraints exclude all Go files in /Users/zhangxuesong/go/src/github.com/ethereum/go-ethereum/crypto/secp256k1
github.com/ethereum/go-ethereum/vendor/gopkg.in/olebedev/go-duktape.v3
../../vendor/gopkg.in/olebedev/go-duktape.v3/conts.go:14:11: undefined: Type
../../vendor/gopkg.in/olebedev/go-duktape.v3/timers.go:11:10: undefined: Context
../../vendor/gopkg.in/olebedev/go-duktape.v3/timers.go:30:10: undefined: Context
../../vendor/gopkg.in/olebedev/go-duktape.v3/timers.go:37:20: undefined: Context
../../vendor/gopkg.in/olebedev/go-duktape.v3/timers.go:63:22: undefined: Context
../../vendor/gopkg.in/olebedev/go-duktape.v3/timers.go:71:21: undefined: Context
../../vendor/gopkg.in/olebedev/go-duktape.v3/timers.go:108:10: undefined: Context
../../vendor/gopkg.in/olebedev/go-duktape.v3/timers.go:121:10: undefined: Context
../../vendor/gopkg.in/olebedev/go-duktape.v3/timers.go:129:10: undefined: Context
../../vendor/gopkg.in/olebedev/go-duktape.v3/utils.go:5:10: undefined: Context
../../vendor/gopkg.in/olebedev/go-duktape.v3/utils.go:5:10: too many errors
github.com/ethereum/go-ethereum/rpc
../../rpc/endpoints.go:96:19: undefined: ipcListen
../../rpc/ipc.go:50:16: undefined: newIPCConnection

I have downloaded into the vendor library from the internet

shiyuntao commented 5 years ago

me too

cmingxu commented 5 years ago

+1

vinceau commented 5 years ago

+1

cmingxu commented 5 years ago

Problem solved, make sure CGOENABLE=1

LowLowCoder-Mel commented 5 years ago

Problem solved, make sure CGOENABLE=1 cmd: gox -cgo=1 --osarch="linux/amd64" . I run in the cmd/geth/ directory will be an anothor error. run path: ~/go/src/github.com/ethereum/go-ethereum/cmd/geth

errors:

Number of parallel builds: 3

-->     linux/amd64: github.com/ethereum/go-ethereum/cmd/geth

1 errors occurred:
--> linux/amd64 error: exit status 2
Stderr: # os/user
/usr/local/go/src/os/user/getgrouplist_unix.go:16:35: warning: passing 'gid_t *' (aka 'unsigned int *') to parameter of type 'int *' converts between pointers to integer types with different sign [-Wpointer-sign]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/unistd.h:653:43: note: passing argument to parameter here
# github.com/ethereum/go-ethereum/vendor/github.com/karalabe/hid
In file included from ../../vendor/github.com/karalabe/hid/hid_enabled.go:26:
In file included from ../../vendor/github.com/karalabe/hid/libusb/libusb/os/linux_usbfs.c:43:
../../vendor/github.com/karalabe/hid/libusb/libusb/os/linux_usbfs.h:24:10: fatal error: 'linux/types.h' file not found
#include <linux/types.h>
         ^~~~~~~~~~~~~~~
1 error generated.
lvvthinh commented 5 years ago

@zhang6321615 Try to get newest GO111MODULE=off go get -u github.com/karalabe/hid then cp -r $GOPATH/src/github.com/karalabe/ vendor/github.com/

muziling commented 3 years ago
/root/go/bin/gox -cgo -osarch="windows/amd64" ./...
Number of parallel builds: 3

-->   windows/amd64: github.com/ethereum/go-ethereum/tests/fuzzers/vflux/debug
-->   windows/amd64: github.com/ethereum/go-ethereum/cmd/faucet
-->   windows/amd64: github.com/ethereum/go-ethereum/cmd/checkpoint-admin
-->   windows/amd64: github.com/ethereum/go-ethereum/p2p/simulations/examples
-->   windows/amd64: github.com/ethereum/go-ethereum/cmd/geth
-->   windows/amd64: github.com/ethereum/go-ethereum/cmd/p2psim
-->   windows/amd64: github.com/ethereum/go-ethereum/cmd/puppeth
-->   windows/amd64: github.com/ethereum/go-ethereum/cmd/rlpdump
-->   windows/amd64: github.com/ethereum/go-ethereum/cmd/abigen
-->   windows/amd64: github.com/ethereum/go-ethereum/cmd/abidump
-->   windows/amd64: github.com/ethereum/go-ethereum/cmd/bootnode
-->   windows/amd64: github.com/ethereum/go-ethereum/cmd/devp2p
-->   windows/amd64: github.com/ethereum/go-ethereum/cmd/clef
-->   windows/amd64: github.com/ethereum/go-ethereum/cmd/ethkey
-->   windows/amd64: github.com/ethereum/go-ethereum/tests/fuzzers/les/debug
-->   windows/amd64: github.com/ethereum/go-ethereum/tests/fuzzers/difficulty/debug
-->   windows/amd64: github.com/ethereum/go-ethereum/tests/fuzzers/rangeproof/debug
-->   windows/amd64: github.com/ethereum/go-ethereum/tests/fuzzers/stacktrie/debug
-->   windows/amd64: github.com/ethereum/go-ethereum/cmd/evm

18 errors occurred:
--> windows/amd64 error: exit status 2
Stderr: # runtime/cgo
gcc: error: unrecognized command line option ‘-mthreads’; did you mean ‘-pthread’?

--> windows/amd64 error: exit status 2
Stderr: # runtime/cgo
gcc: error: unrecognized command line option ‘-mthreads’; did you mean ‘-pthread’?