truechain / truechain-consensus-core

TrueChain Consensus Protocol: Minerva
Apache License 2.0
161 stars 70 forks source link

use xgo for cross compile #27

Closed arcolife closed 6 years ago

arcolife commented 6 years ago

Failed to produce darwin binary with hmake build, because a vendor dep uses libsecp256k1 which in turn depends on import "C" in golang from under secp256.go

photo6210981550418405391

screenshot courtesy: @hixichen

So now, we have 2 options:

  1. Cross compile from linux to darwin https://github.com/karalabe/xgo
  2. Compile natively
hixichen commented 6 years ago

What is our current status: we are packaging go binary into docker-based image and using runnint container to compile the code.

What is the issue:

The docker-based image is based on ubuntu, need cross compile for darwin since cgo was imported

hixichen commented 6 years ago

please check https://github.com/truechain/truechain-consensus-core/pull/62