Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile issues on RPi 32 bit since commit d46bc7b2d176f7efc71eaaedd9aefa8850ab5efa #148

Open
ScallyBag opened this issue Oct 16, 2021 · 4 comments

Comments

@ScallyBag
Copy link
Contributor

Hi Amanj,

Since commit d46bc7b 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.

@amanjpro
Copy link
Owner

Ah... I can disable Syzygy in RPi builds, after all Syzygy is useless under RPi, due to the slow disk access

@ScallyBag
Copy link
Contributor Author

Ok if you think that helps. however I use 3-4-5 piece syzygy tables on all engines that support it. My RPi systems run from SSD drives with M.2 drives as backups.

@amanjpro
Copy link
Owner

Ok, then I can literally copy fathom.go one to compile for avx, the other not
depending if it is targeting RPi or not

@amanjpro
Copy link
Owner

I'll fix that in version 8.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants