karalabe / xgo

Go CGO cross compiler
MIT License
2.14k stars 279 forks source link

Dependency error while cross compiling for darwin #59

Open pawanrawal opened 8 years ago

pawanrawal commented 8 years ago

Hi

I am trying to cross compile for darwin and I get a dependency error. My guess is because the dependency doesn't exist in the Docker image. Should I modify the docker image to install the dependency?

This is the command I am running and the missing dependency is rocksdb. xgo -targets=darwin-10.9/386 --go=1.6.2 github.com/dgraph-io/dgraph/cmd/dgraph

Supplying rocksdb in deps flag doesn't work either because rocksdb don't have a configure script though they have a make file.

xgo -targets=darwin-10.9/386 --go=1.6.2 --deps=https://github.com/facebook/rocksdb/archive/v4.2.tar.gz github.com/dgraph-io/dgraph/cmd/dgraph

Any ideas on what could I do to make this work?

durandj commented 6 years ago

I had a similar issue and to get around it I created my own Docker image that extends the official xgo image and used that instead. You can specify an image with the -image parameter.