Closed botherder closed 3 years ago
The object files that were produced by the Go compiler (e.g. /tmp/go-link-888075984/000000.o
) are for i386 and can't be linked with external objects and libraries that have been built for x86-64. You need to build both YARA and the Go bits for the same architecture: This is done for YARA by selecting the right compiler and passing the right prefix to configure --host=…
. And it is done for the Go code by setting both GOOS
and GOARCH
.
32bit: --host=i686-w64-mingw32
CC=i686-w64-mingw32-gcc
GOOS=windows
GOARCH=386
64bit: --host=x86_64-w64-mingw32
CC=x86_64-w64-mingw32-gcc
GOOS=windows`GOARCH=amd64
I have some suggestions on how to improve the Makefile (and cut down the necessary build instructions in the process). Are you interested in a PR?
@hillu Yes of course! That'd be greatly appreciated.
Currently building 64bit Windows binary raises some issues with architecture differences with Go's linker.
Need to find the appropriate procedure to build 64bit successfully.