Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

gox build go-ethereum #127

Open
LowLowCoder-Mel opened this issue Mar 12, 2019 · 7 comments
Open

gox build go-ethereum #127

LowLowCoder-Mel opened this issue Mar 12, 2019 · 7 comments

Comments

@LowLowCoder-Mel
Copy link

LowLowCoder-Mel commented Mar 12, 2019

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
Copy link

me too

@cmingxu
Copy link

cmingxu commented Apr 25, 2019

+1

1 similar comment
@vinceau
Copy link

vinceau commented Apr 30, 2019

+1

@cmingxu
Copy link

cmingxu commented May 1, 2019

Problem solved, make sure CGOENABLE=1

@LowLowCoder-Mel
Copy link
Author

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
Copy link

lvvthinh commented Jun 27, 2019

@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
Copy link

/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’?

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

No branches or pull requests

6 participants