zahak icon indicating copy to clipboard operation
zahak copied to clipboard

Compile issues on RPi 32 bit since commit d46bc7b2d176f7efc71eaaedd9aefa8850ab5efa

Open ScallyBag opened this issue 2 years ago • 4 comments

Hi Amanj,

Since commit d46bc7b2d176f7efc71eaaedd9aefa8850ab5efa I cannot compile Zahak without removing the -mavx from the CFLAGS in fathom.go

Al@RPi4-SSD:~/Engine-Source/zahak-nnue $ make -j5 go clean ./... rm -f engine/nn.go CC=cc CGO_ENABLED="1" go run -gcflags "-B" -ldflags "-X 'main.netPath=default.nn' -X 'main.Version=3253478557873477dc3908536cc02ca9e1a6b447'" netgen/nn.go mkdir -p bin CC=cc CGO_ENABLED="1" go build -gcflags "-B" -o bin ./...

github.com/amanjpro/zahak/fathom

cc: error: unrecognized command line option '-mavx'; did you mean '-marm'? make: *** [Makefile:31: build] Error 2

———-

Al@RPi4-SSD:~/Engine-Source/zahak-nnue $ make cross-build -j5 go clean ./... rm -f engine/nn.go mkdir -p bin echo "!!!! WARNING !!!! Cross build will not support Syzygy Probing" !!!! WARNING !!!! Cross build will not support Syzygy Probing CC=cc CGO_ENABLED="1" go run -ldflags "-X 'main.netPath=default.nn' -X 'main.Version=7.1'" netgen/nn.go CC=cc CGO_ENABLED="1" GOOS=linux GOARCH=arm go build -gcflags "-B" -o bin ./... && mv bin/zahak bin/zahak-linux-arm32

github.com/amanjpro/zahak/fathom

cc: error: unrecognized command line option '-mavx'; did you mean '-marm'? make: *** [Makefile:62: cross-build] Error 2 Al@RPi4-SSD:~/Engine-Source/zahak-nnue $

———-

However when I remove this flag, I can compile for 32 bit ONLY, I get these errors on trying the cross-build make

Al@RPi4-SSD:~/Engine-Source/zahak-nnue $ make cross-build -j5 go clean ./... rm -f engine/nn.go mkdir -p bin echo "!!!! WARNING !!!! Cross build will not support Syzygy Probing" !!!! WARNING !!!! Cross build will not support Syzygy Probing CC=cc CGO_ENABLED="1" go run -ldflags "-X 'main.netPath=default.nn' -X 'main.Version=7.1'" netgen/nn.go CC=cc CGO_ENABLED="1" GOOS=linux GOARCH=arm go build -gcflags "-B" -o bin ./... && mv bin/zahak bin/zahak-linux-arm32 CC=cc CGO_ENABLED="1" GOOS=linux GOARCH=arm64 go build -gcflags "-B" -o bin ./... && mv bin/zahak bin/zahak-linux-arm64

runtime/cgo

In file included from _cgo_export.c:4: cgo-gcc-export-header-prolog:25:14: error: size of array ‘_check_for_64_bit_pointer_matching_GoInt’ is negative make: *** [Makefile:63: cross-build] Error 2

———-

Thanks,

Al.

ScallyBag avatar Oct 16 '21 09:10 ScallyBag