I am trying to create an unprocessed (and possibly deterministic) build process for an application written in Go.
The idea is to create a Docker file that sets all the necessary conditions so that it can share the build process with others and does not require a real installation of Windows.
However, I was stuck trying to create a library with C bindings.
I get this very non descriptive error
C:\godev\src\github.com\obscuren\secp256k1-go>go build --work
WORK=C:\users\root\Temp\go-build287695705
copying $WORK\_\C_\godev\src\github.com\obscuren\secp256k1-go\_obj\_cgo_defun.8 to $WORK\_\C_\godev\src\github.com\obscuren\secp256k1-go.a: write $WORK\_\C_\godev\src\github.com\obscuren\secp256k1-go.a: Access denied.
The full log with -x can be found here .
I can build this library on OS X and a “real” Windows installation is just fine.
Any help would be appreciated.
Edit:
Using the OneofOne outline also gives me some errors.
pkg/runtime/cgo/cgo.go:26:46: fatal error: sys/types.h: No such file or directory.
compilation terminated.
- Go. , gcc-multilib. .
gcc: error: unrecognized command line option ‘-mthreads’
Google , . , - .
2:
, ,
apt-get install gcc-multilib
apt-get install gcc-mingw-w64
GOOS=windows GOARCH=386 CGO_ENABLED=1 CXX_FOR_TARGET=i686-w64-mingw32-g++ CC_FOR_TARGET=i686-w64-mingw32-gcc ./make.bash
.:)