FireFather / sf-nnue-aio

Optimized Nodchip NNUE (efficiently updateable neural network)
GNU General Public License v3.0
26 stars 2 forks source link

Compile source on Mac #1

Closed ArminHHJ closed 2 years ago

ArminHHJ commented 4 years ago

I download the source sf-nnue-07-27-2020-PO start terminal and use this command:

make build ARCH=x86-64-bmi2

I got some errors. Could you help about it?

response in terminal: make: [.depend] Error 1 (ignored)

Config: debug: 'no' sanitize: 'no' optimize: 'yes' arch: 'x86_64' bits: '64' kernel: 'Darwin' os: '' prefetch: 'yes' popcnt: 'yes' sse: 'yes' ssse3: 'yes' sse41: 'yes' sse42: 'yes' avx2: 'yes' pext: 'yes'

Flags: CXX: g++ CXXFLAGS: -Wall -Wcast-qual -fno-exceptions -std=c++17 -pedantic -Wextra -Wshadow -m64 -arch x86_64 -mmacosx-version-min=10.9 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -msse -DUSE_POPCNT -DUSE_AVX2 -mavx2 -DUSE_SSE42 -msse4.2 -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -DUSE_PEXT -mbmi2 -flto LDFLAGS: -m64 -static -arch x86_64 -mmacosx-version-min=10.9 -lpthread -Wall -Wcast-qual -fno-exceptions -std=c++17 -pedantic -Wextra -Wshadow -m64 -arch x86_64 -mmacosx-version-min=10.9 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -msse -DUSE_POPCNT -DUSE_AVX2 -mavx2 -DUSE_SSE42 -msse4.2 -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -DUSE_PEXT -mbmi2 -flto

Testing config sanity. If this fails, try 'make help' ...

/Library/Developer/CommandLineTools/usr/bin/make ARCH=x86-64-bmi2 COMP=gcc all g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -pedantic -Wextra -Wshadow -m64 -arch x86_64 -mmacosx-version-min=10.9 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -msse -DUSE_POPCNT -DUSE_AVX2 -mavx2 -DUSE_SSE42 -msse4.2 -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -DUSE_PEXT -mbmi2 -flto -c -o benchmark.o benchmark.cpp In file included from benchmark.cpp:26: In file included from ./position.h:29: In file included from ./bitboard.h:25: ./types.h:58:32: warning: unknown warning group '-Wunused-but-set-variable', ignored [-Wunknown-warning-option]

pragma GCC diagnostic ignored "-Wunused-but-set-variable"

                           ^

./types.h:61:32: warning: unknown warning group '-Wclass-memaccess', ignored [-Wunknown-warning-option]

pragma GCC diagnostic ignored "-Wclass-memaccess"

                           ^

./types.h:63:32: warning: unknown warning group '-Wmisleading-indentation', ignored [-Wunknown-warning-option]

pragma GCC diagnostic ignored "-Wmisleading-indentation"

                           ^

In file included from benchmark.cpp:26: In file included from ./position.h:34: In file included from ./eval/nnue/nnue_accumulator.h:5: In file included from ./eval/nnue/nnue_architecture.h:9: In file included from ./eval/nnue/architectures/halfkp_256x2-32-32.h:5: ./eval/nnue/architectures/../features/feature_set.h:92:26: error: use of undeclared identifier 'PIECE_NUMBER_KING' ...dp.pieceNo[0] == PIECE_NUMBER_KING + perspective; ^ ./eval/nnue/architectures/../features/feature_set.h:96:26: error: use of undeclared identifier 'PIECE_NUMBER_KING' ...dp.pieceNo[0] == PIECE_NUMBER_KING + ~perspective; ^ ./eval/nnue/architectures/../features/feature_set.h:99:46: error: use of undeclared identifier 'PIECE_NUMBER_KING' ...reset[perspective] = dp.pieceNo[0] >= PIECE_NUMBER_KING; ^ In file included from benchmark.cpp:26: In file included from ./position.h:34: In file included from ./eval/nnue/nnue_accumulator.h:5: In file included from ./eval/nnue/nnue_architecture.h:9: In file included from ./eval/nnue/architectures/halfkp_256x2-32-32.h:6: ./eval/nnue/architectures/../features/half_kp.h:26:65: error: use of undeclared identifier 'fe_end' ...static_cast(SQUARE_NB) * static_cast(fe_end); ^ ./eval/nnue/architectures/../features/half_kp.h:28:55: error: use of undeclared identifier 'PIECE_NUMBER_KING' ...static constexpr IndexType kMaxActiveDimensions = PIECE_NUMBER_KING; ^ ./eval/nnue/architectures/../features/half_kp.h:43:45: error: unknown type name 'BonaPiece' ...static IndexType MakeIndex(Square sq_k, BonaPiece p); ^ ./eval/nnue/architectures/../features/half_kp.h:48:6: error: unknown type name 'BonaPiece' BonaPiece pieces, Square sq_t... ^ 3 warnings and 7 errors generated. make[1]: [benchmark.o] Error 1 make: *** [build] Error 2 Armins-MacBook-Pro:src armin$

dmytroleonenko commented 4 years ago

on linux it fails at include <filesystem>

ArminHHJ commented 4 years ago

You can help?

Some weeks bevor the compiling was ok. This is the message when starting the complied binary in Terminal:

Second compile Stockfish NNUE run (halfkp-256x2-32-32) 140720 x64 bmi2 by T. Romstad, M. Costalba, J. Kiiski, G. Linscott, Hisayori Noda

You see it worked :)

Today I do a new compile. Also an error: Short log: evaluate.cpp:898:11: error: use of undeclared identifier 'NNUE' return NNUE::evaluate(pos); ^ 2 warnings and 1 error generated. make[1]: [evaluate.o] Error 1 make: [build] Error 2

Long Log: Armins-MacBook-Pro:src armin$ make build ARCH=x86-64-bmi2

Config: debug: 'no' sanitize: 'no' optimize: 'yes' arch: 'x86_64' bits: '64' kernel: 'Darwin' os: '' prefetch: 'yes' popcnt: 'yes' sse: 'yes' ssse3: 'yes' sse41: 'yes' sse42: 'yes' avx2: 'yes' pext: 'yes'

Flags: CXX: g++ CXXFLAGS: -Wall -Wno-unknown-pragmas -Wcast-qual -fno-exceptions -std=c++17 -pedantic -Wextra -Wshadow -m64 -arch x86_64 -mmacosx-version-min=10.9 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -msse -DUSE_POPCNT -DUSE_AVX2 -mavx2 -DUSE_SSE42 -msse4.2 -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -DUSE_PEXT -mbmi2 -flto LDFLAGS: -m64 -static -arch x86_64 -mmacosx-version-min=10.9 -lpthread -Wall -Wno-unknown-pragmas -Wcast-qual -fno-exceptions -std=c++17 -pedantic -Wextra -Wshadow -m64 -arch x86_64 -mmacosx-version-min=10.9 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -msse -DUSE_POPCNT -DUSE_AVX2 -mavx2 -DUSE_SSE42 -msse4.2 -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -DUSE_PEXT -mbmi2 -flto

Testing config sanity. If this fails, try 'make help' ...

/Library/Developer/CommandLineTools/usr/bin/make ARCH=x86-64-bmi2 COMP=gcc all g++ -Wall -Wno-unknown-pragmas -Wcast-qual -fno-exceptions -std=c++17 -pedantic -Wextra -Wshadow -m64 -arch x86_64 -mmacosx-version-min=10.9 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -msse -DUSE_POPCNT -DUSE_AVX2 -mavx2 -DUSE_SSE42 -msse4.2 -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -DUSE_PEXT -mbmi2 -flto -c -o benchmark.o benchmark.cpp In file included from benchmark.cpp:26: In file included from ./position.h:30: In file included from ./bitboard.h:26: ./types.h:59:32: warning: unknown warning group '-Wunused-but-set-variable', ignored [-Wunknown-warning-option]

pragma GCC diagnostic ignored "-Wunused-but-set-variable"

                           ^

./types.h:62:32: warning: unknown warning group '-Wclass-memaccess', ignored [-Wunknown-warning-option]

pragma GCC diagnostic ignored "-Wclass-memaccess"

                           ^

2 warnings generated. g++ -Wall -Wno-unknown-pragmas -Wcast-qual -fno-exceptions -std=c++17 -pedantic -Wextra -Wshadow -m64 -arch x86_64 -mmacosx-version-min=10.9 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -msse -DUSE_POPCNT -DUSE_AVX2 -mavx2 -DUSE_SSE42 -msse4.2 -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -DUSE_PEXT -mbmi2 -flto -c -o bitbase.o bitbase.cpp In file included from bitbase.cpp:25: In file included from ./bitboard.h:26: ./types.h:59:32: warning: unknown warning group '-Wunused-but-set-variable', ignored [-Wunknown-warning-option]

pragma GCC diagnostic ignored "-Wunused-but-set-variable"

                           ^

./types.h:62:32: warning: unknown warning group '-Wclass-memaccess', ignored [-Wunknown-warning-option]

pragma GCC diagnostic ignored "-Wclass-memaccess"

                           ^

2 warnings generated. g++ -Wall -Wno-unknown-pragmas -Wcast-qual -fno-exceptions -std=c++17 -pedantic -Wextra -Wshadow -m64 -arch x86_64 -mmacosx-version-min=10.9 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -msse -DUSE_POPCNT -DUSE_AVX2 -mavx2 -DUSE_SSE42 -msse4.2 -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -DUSE_PEXT -mbmi2 -flto -c -o bitboard.o bitboard.cpp In file included from bitboard.cpp:24: In file included from ./bitboard.h:26: ./types.h:59:32: warning: unknown warning group '-Wunused-but-set-variable', ignored [-Wunknown-warning-option]

pragma GCC diagnostic ignored "-Wunused-but-set-variable"

                           ^

./types.h:62:32: warning: unknown warning group '-Wclass-memaccess', ignored [-Wunknown-warning-option]

pragma GCC diagnostic ignored "-Wclass-memaccess"

                           ^

2 warnings generated. g++ -Wall -Wno-unknown-pragmas -Wcast-qual -fno-exceptions -std=c++17 -pedantic -Wextra -Wshadow -m64 -arch x86_64 -mmacosx-version-min=10.9 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -msse -DUSE_POPCNT -DUSE_AVX2 -mavx2 -DUSE_SSE42 -msse4.2 -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -DUSE_PEXT -mbmi2 -flto -c -o endgame.o endgame.cpp In file included from endgame.cpp:23: In file included from ./bitboard.h:26: ./types.h:59:32: warning: unknown warning group '-Wunused-but-set-variable', ignored [-Wunknown-warning-option]

pragma GCC diagnostic ignored "-Wunused-but-set-variable"

                           ^

./types.h:62:32: warning: unknown warning group '-Wclass-memaccess', ignored [-Wunknown-warning-option]

pragma GCC diagnostic ignored "-Wclass-memaccess"

                           ^

2 warnings generated. g++ -Wall -Wno-unknown-pragmas -Wcast-qual -fno-exceptions -std=c++17 -pedantic -Wextra -Wshadow -m64 -arch x86_64 -mmacosx-version-min=10.9 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -msse -DUSE_POPCNT -DUSE_AVX2 -mavx2 -DUSE_SSE42 -msse4.2 -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -DUSE_PEXT -mbmi2 -flto -c -o evaluate.o evaluate.cpp In file included from evaluate.cpp:28: In file included from ./bitboard.h:26: ./types.h:59:32: warning: unknown warning group '-Wunused-but-set-variable', ignored [-Wunknown-warning-option]

pragma GCC diagnostic ignored "-Wunused-but-set-variable"

                           ^

./types.h:62:32: warning: unknown warning group '-Wclass-memaccess', ignored [-Wunknown-warning-option]

pragma GCC diagnostic ignored "-Wclass-memaccess"

                           ^

evaluate.cpp:898:11: error: use of undeclared identifier 'NNUE' return NNUE::evaluate(pos); ^ 2 warnings and 1 error generated. make[1]: [evaluate.o] Error 1 make: [build] Error 2

Am 30.07.2020 um 22:09 schrieb Dima Leonenko notifications@github.com:

on linux it fails at include

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/FireFather/sf-nnue/issues/1#issuecomment-666659547, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKHJTQJWOUMU2TZWHF7JNDTR6HHRJANCNFSM4PKYGRWQ.