LeelaChessZero / lc0

The rewritten engine, originally for tensorflow. Now all other backends have been ported here.
GNU General Public License v3.0
2.4k stars 525 forks source link

ninja: build stopped: subcommand failed. #316

Closed SleepyMario closed 6 years ago

SleepyMario commented 6 years ago

Hello, could someone please give me some feedback on what's wrong? This is on Gentoo. Thanks a lot :-)


$ ./build.sh The Meson build system Version: 0.46.1 Source dir: /home/ashwin/github/lc0 Build dir: /home/ashwin/github/lc0/build/release Build type: native build Project name: lc0 Native C++ compiler: c++ (gcc 7.3.0 "c++ (Gentoo 7.3.0-r3 p1.4) 7.3.0") Build machine cpu family: x86_64 Build machine cpu: x86_64 Library libprotobuf found: YES Program protoc found: YES (/usr/bin/protoc) Library pthread found: YES Library dl found: YES Library libtensorflow_cc found: YES Library libprotobuf found: YES Found pkg-config: /usr/bin/pkg-config (0.29.2) Dependency Accelerate found: NO Library mkl_rt found: NO Library openblas.dll found: NO Library openblas found: YES Has header "openblas_config.h": NO Has header "openblas_config.h": YES Program ispc found: NO Library OpenCL found: YES Native dependency OpenCL found: YES 2.1 Library cublas found: NO Library cudnn found: NO Library cudart found: NO Program /usr/local/cuda-9.2/bin/nvcc found: NO Program /usr/local/cuda-9.1/bin/nvcc found: NO Program nvcc found: NO Native dependency zlib found: YES 1.2.11 Dependency GTest found: YES (prebuilt) Build targets in project: 5 Found ninja-1.8.2 at /usr/bin/ninja ~/github/lc0/build/release ~/github/lc0 [1/210] Generating ''. [2/210] Generating ''. [3/210] Generating ''. [4/210] Generating ''. [5/210] Generating ''. [6/210] Compiling C++ object 'lc0@exe/src_version.cc.o'. [7/210] Compiling C++ object 'hashcat_test@exe/src_version.cc.o'. [8/210] Compiling C++ object 'hashcat_test@exe/src_utils_random.cc.o'. [9/210] Compiling C++ object 'hashcat_test@exe/src_chess_bitboard.cc.o'. [10/210] Compiling C++ object 'hashcat_test@exe/src_utils_hashcat_test.cc.o'. [11/210] Compiling C++ object 'lc0@exe/src_chess_position.cc.o'. [12/210] Compiling C++ object 'lc0@exe/src_chess_bitboard.cc.o'. [13/210] Compiling C++ object 'lc0@exe/src_main.cc.o'. [14/210] Compiling C++ object 'lc0@exe/src_chess_board.cc.o'. [15/210] Compiling C++ object 'lc0@exe/src_neural_encoder.cc.o'. [16/210] Compiling C++ object 'lc0@exe/meson-generated_proto_net.pb.cc.o'. [17/210] Compiling C++ object 'lc0@exe/src_neural_cache.cc.o'. [18/210] Compiling C++ object 'lc0@exe/src_neural_factory.cc.o'. [19/210] Compiling C++ object 'hashcat_test@exe/meson-generated_proto_net.pb.cc.o'. [20/210] Compiling C++ object 'lc0@exe/src_mcts_node.cc.o'. [21/210] Compiling C++ object 'lc0@exe/src_neural_network_st_batch.cc.o'. [22/210] Compiling C++ object 'hashcat_test@exe/src_engine.cc.o'. [23/210] Compiling C++ object 'lc0@exe/src_chess_uciloop.cc.o'. [24/210] Compiling C++ object 'lc0@exe/src_neural_network_random.cc.o'. ../../src/neural/network_random.cc: In member function ‘virtual void lczero::RandomNetworkComputation::AddInput(lczero::InputPlanes&&)’: ../../src/neural/network_random.cc:45:63: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] reinterpret_cast<const std::uint32_t>(&plane.value); ^ [25/210] Compiling C++ object 'lc0@exe/src_neural_network_mux.cc.o'. [26/210] Compiling C++ object 'lc0@exe/src_engine.cc.o'. [27/210] Compiling C++ object 'lc0@exe/src_neural_writer.cc.o'. [28/210] Compiling C++ object 'lc0@exe/src_neural_loader.cc.o'. [29/210] Compiling C++ object 'lc0@exe/src_utils_commandline.cc.o'. [30/210] Compiling C++ object 'lc0@exe/src_utils_histogram.cc.o'. [31/210] Compiling C++ object 'lc0@exe/src_neural_network_check.cc.o'. [32/210] Compiling C++ object 'lc0@exe/src_mcts_search.cc.o'. [33/210] Compiling C++ object 'lc0@exe/src_utils_transpose.cc.o'. [34/210] Compiling C++ object 'lc0@exe/src_selfplay_game.cc.o'. [35/210] Compiling C++ object 'lc0@exe/src_utils_random.cc.o'. [36/210] Compiling C++ object 'lc0@exe/src_selfplay_loop.cc.o'. [37/210] Compiling C++ object 'lc0@exe/src_utils_filesystem.posix.cc.o'. [38/210] Compiling C++ object 'lc0@exe/src_neural_blas_batchnorm.cc.o'. [39/210] Compiling C++ object 'lc0@exe/src_utils_string.cc.o'. [40/210] Compiling C++ object 'lc0@exe/src_neural_blas_convolution1.cc.o'. [41/210] Compiling C++ object 'lc0@exe/src_utils_configfile.cc.o'. [42/210] Compiling C++ object 'lc0@exe/src_utils_optionsdict.cc.o'. [43/210] Compiling C++ object 'lc0@exe/src_neural_blas_fully_connected_layer.cc.o'. [44/210] Compiling C++ object 'lc0@exe/src_neural_blas_winograd_convolution3.cc.o'. [45/210] Compiling C++ object 'lc0@exe/src_utils_optionsparser.cc.o'. [46/210] Compiling C++ object 'lc0@exe/src_neural_blas_network_blas.cc.o'. [47/210] Compiling C++ object 'lc0@exe/src_neural_opencl_OpenCL.cc.o'. FAILED: lc0@exe/src_neural_opencl_OpenCL.cc.o c++ -Ilc0@exe -I. -I../.. -I/usr/local/include/ -I../../src -I/opt/OpenBLAS/include/ -I/usr/include/ -fdiagnostics-color=always -DNDEBUG -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++14 -O3 -Wextra -pedantic -march=native -DUSE_OPENBLAS -MD -MQ 'lc0@exe/src_neural_opencl_OpenCL.cc.o' -MF 'lc0@exe/src_neural_opencl_OpenCL.cc.o.d' -o 'lc0@exe/src_neural_opencl_OpenCL.cc.o' -c ../../src/neural/opencl/OpenCL.cc In file included from ../../src/neural/opencl/OpenCL.h:31:0, from ../../src/neural/opencl/OpenCL.cc:33: ../../src/neural/opencl/cl2.hpp: In constructor ‘cl::Image1D::Image1D(const cl::Context&, cl_mem_flags, cl::ImageFormat, cl::size_type, void, cl_int)’: ../../src/neural/opencl/cl2.hpp:4273:9: error: braces around scalar initializer for type ‘cl_mem {aka _cl_mem}’ }; ^ ../../src/neural/opencl/cl2.hpp: In constructor ‘cl::Image1DBuffer::Image1DBuffer(const cl::Context&, cl_mem_flags, cl::ImageFormat, cl::size_type, const cl::Buffer&, cl_int)’: ../../src/neural/opencl/cl2.hpp:4362:9: error: braces around scalar initializer for type ‘cl_mem {aka _cl_mem}’ }; ^ ../../src/neural/opencl/cl2.hpp: In constructor ‘cl::Image1DArray::Image1DArray(const cl::Context&, cl_mem_flags, cl::ImageFormat, cl::size_type, cl::size_type, cl::size_type, void, cl_int)’: ../../src/neural/opencl/cl2.hpp:4450:9: error: braces around scalar initializer for type ‘cl_mem {aka _cl_mem}’ }; ^ ../../src/neural/opencl/cl2.hpp: In constructor ‘cl::Image2D::Image2D(const cl::Context&, cl_mem_flags, cl::ImageFormat, cl::size_type, cl::size_type, cl::size_type, void, cl_int)’: ../../src/neural/opencl/cl2.hpp:4565:13: error: braces around scalar initializer for type ‘cl_mem {aka _cl_mem}’ }; ^ ../../src/neural/opencl/cl2.hpp: In constructor ‘cl::Image2DArray::Image2DArray(const cl::Context&, cl_mem_flags, cl::ImageFormat, cl::size_type, cl::size_type, cl::size_type, cl::size_type, cl::size_type, void, cl_int)’: ../../src/neural/opencl/cl2.hpp:4883:9: error: braces around scalar initializer for type ‘cl_mem {aka _cl_mem}’ }; ^ ../../src/neural/opencl/cl2.hpp: In constructor ‘cl::Image3D::Image3D(const cl::Context&, cl_mem_flags, cl::ImageFormat, cl::size_type, cl::size_type, cl::size_type, cl::size_type, cl::size_type, void, cl_int)’: ../../src/neural/opencl/cl2.hpp:4998:13: error: braces around scalar initializer for type ‘cl_mem {aka _cl_mem}’ }; ^ ../../src/neural/opencl/cl2.hpp: At global scope: ../../src/neural/opencl/cl2.hpp:5857:63: warning: ignoring attributes on template argument ‘cl_int {aka int}’ [-Wignored-attributes] typename std::enable_if<!std::is_pointer::value, cl_int>::type ^ ../../src/neural/opencl/cl2.hpp:6157:22: warning: ignoring attributes on template argument ‘cl_int {aka int}’ [-Wignored-attributes] vector binaryStatus = NULL, ^ [48/210] Compiling C++ object 'lc0@exe/src_neural_opencl_network_opencl.cc.o'. FAILED: lc0@exe/src_neural_opencl_network_opencl.cc.o c++ -Ilc0@exe -I. -I../.. -I/usr/local/include/ -I../../src -I/opt/OpenBLAS/include/ -I/usr/include/ -fdiagnostics-color=always -DNDEBUG -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++14 -O3 -Wextra -pedantic -march=native -DUSE_OPENBLAS -MD -MQ 'lc0@exe/src_neural_opencl_network_opencl.cc.o' -MF 'lc0@exe/src_neural_opencl_network_opencl.cc.o.d' -o 'lc0@exe/src_neural_opencl_network_opencl.cc.o' -c ../../src/neural/opencl/network_opencl.cc In file included from ../../src/neural/opencl/OpenCL.h:31:0, from ../../src/neural/opencl/network_opencl.cc:25: ../../src/neural/opencl/cl2.hpp: In constructor ‘cl::Image1D::Image1D(const cl::Context&, cl_mem_flags, cl::ImageFormat, cl::size_type, void, cl_int)’: ../../src/neural/opencl/cl2.hpp:4273:9: error: braces around scalar initializer for type ‘cl_mem {aka _cl_mem}’ }; ^ ../../src/neural/opencl/cl2.hpp: In constructor ‘cl::Image1DBuffer::Image1DBuffer(const cl::Context&, cl_mem_flags, cl::ImageFormat, cl::size_type, const cl::Buffer&, cl_int)’: ../../src/neural/opencl/cl2.hpp:4362:9: error: braces around scalar initializer for type ‘cl_mem {aka _cl_mem}’ }; ^ ../../src/neural/opencl/cl2.hpp: In constructor ‘cl::Image1DArray::Image1DArray(const cl::Context&, cl_mem_flags, cl::ImageFormat, cl::size_type, cl::size_type, cl::size_type, void, cl_int)’: ../../src/neural/opencl/cl2.hpp:4450:9: error: braces around scalar initializer for type ‘cl_mem {aka _cl_mem}’ }; ^ ../../src/neural/opencl/cl2.hpp: In constructor ‘cl::Image2D::Image2D(const cl::Context&, cl_mem_flags, cl::ImageFormat, cl::size_type, cl::size_type, cl::size_type, void, cl_int)’: ../../src/neural/opencl/cl2.hpp:4565:13: error: braces around scalar initializer for type ‘cl_mem {aka _cl_mem}’ }; ^ ../../src/neural/opencl/cl2.hpp: In constructor ‘cl::Image2DArray::Image2DArray(const cl::Context&, cl_mem_flags, cl::ImageFormat, cl::size_type, cl::size_type, cl::size_type, cl::size_type, cl::size_type, void, cl_int)’: ../../src/neural/opencl/cl2.hpp:4883:9: error: braces around scalar initializer for type ‘cl_mem {aka _cl_mem}’ }; ^ ../../src/neural/opencl/cl2.hpp: In constructor ‘cl::Image3D::Image3D(const cl::Context&, cl_mem_flags, cl::ImageFormat, cl::size_type, cl::size_type, cl::size_type, cl::size_type, cl::size_type, void, cl_int)’: ../../src/neural/opencl/cl2.hpp:4998:13: error: braces around scalar initializer for type ‘cl_mem {aka _cl_mem}’ }; ^ ../../src/neural/opencl/cl2.hpp: At global scope: ../../src/neural/opencl/cl2.hpp:5857:63: warning: ignoring attributes on template argument ‘cl_int {aka int}’ [-Wignored-attributes] typename std::enable_if<!std::is_pointer::value, cl_int>::type ^ ../../src/neural/opencl/cl2.hpp:6157:22: warning: ignoring attributes on template argument ‘cl_int {aka int}’ [-Wignored-attributes] vector binaryStatus = NULL, ^ [49/210] Compiling C++ object 'chessboard_test@exe/src_version.cc.o'. [50/210] Compiling C++ object 'lc0@exe/src_neural_opencl_OpenCLTuner.cc.o'. FAILED: lc0@exe/src_neural_opencl_OpenCLTuner.cc.o c++ -Ilc0@exe -I. -I../.. -I/usr/local/include/ -I../../src -I/opt/OpenBLAS/include/ -I/usr/include/ -fdiagnostics-color=always -DNDEBUG -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++14 -O3 -Wextra -pedantic -march=native -DUSE_OPENBLAS -MD -MQ 'lc0@exe/src_neural_opencl_OpenCLTuner.cc.o' -MF 'lc0@exe/src_neural_opencl_OpenCLTuner.cc.o.d' -o 'lc0@exe/src_neural_opencl_OpenCLTuner.cc.o' -c ../../src/neural/opencl/OpenCLTuner.cc In file included from ../../src/neural/opencl/OpenCL.h:31:0, from ../../src/neural/opencl/OpenCLTuner.cc:30: ../../src/neural/opencl/cl2.hpp: In constructor ‘cl::Image1D::Image1D(const cl::Context&, cl_mem_flags, cl::ImageFormat, cl::size_type, void, cl_int)’: ../../src/neural/opencl/cl2.hpp:4273:9: error: braces around scalar initializer for type ‘cl_mem {aka _cl_mem}’ }; ^ ../../src/neural/opencl/cl2.hpp: In constructor ‘cl::Image1DBuffer::Image1DBuffer(const cl::Context&, cl_mem_flags, cl::ImageFormat, cl::size_type, const cl::Buffer&, cl_int)’: ../../src/neural/opencl/cl2.hpp:4362:9: error: braces around scalar initializer for type ‘cl_mem {aka _cl_mem}’ }; ^ ../../src/neural/opencl/cl2.hpp: In constructor ‘cl::Image1DArray::Image1DArray(const cl::Context&, cl_mem_flags, cl::ImageFormat, cl::size_type, cl::size_type, cl::size_type, void, cl_int)’: ../../src/neural/opencl/cl2.hpp:4450:9: error: braces around scalar initializer for type ‘cl_mem {aka _cl_mem}’ }; ^ ../../src/neural/opencl/cl2.hpp: In constructor ‘cl::Image2D::Image2D(const cl::Context&, cl_mem_flags, cl::ImageFormat, cl::size_type, cl::size_type, cl::size_type, void, cl_int)’: ../../src/neural/opencl/cl2.hpp:4565:13: error: braces around scalar initializer for type ‘cl_mem {aka _cl_mem}’ }; ^ ../../src/neural/opencl/cl2.hpp: In constructor ‘cl::Image2DArray::Image2DArray(const cl::Context&, cl_mem_flags, cl::ImageFormat, cl::size_type, cl::size_type, cl::size_type, cl::size_type, cl::size_type, void, cl_int)’: ../../src/neural/opencl/cl2.hpp:4883:9: error: braces around scalar initializer for type ‘cl_mem {aka _cl_mem}’ }; ^ ../../src/neural/opencl/cl2.hpp: In constructor ‘cl::Image3D::Image3D(const cl::Context&, cl_mem_flags, cl::ImageFormat, cl::size_type, cl::size_type, cl::size_type, cl::size_type, cl::size_type, void, cl_int)’: ../../src/neural/opencl/cl2.hpp:4998:13: error: braces around scalar initializer for type ‘cl_mem {aka _cl_mem}’ }; ^ ../../src/neural/opencl/cl2.hpp: At global scope: ../../src/neural/opencl/cl2.hpp:5857:63: warning: ignoring attributes on template argument ‘cl_int {aka int}’ [-Wignored-attributes] typename std::enable_if<!std::is_pointer::value, cl_int>::type ^ ../../src/neural/opencl/cl2.hpp:6157:22: warning: ignoring attributes on template argument ‘cl_int {aka int}’ [-Wignored-attributes] vector binaryStatus = NULL, ^ [51/210] Compiling C++ object 'lc0@exe/src_selfplay_tournament.cc.o'. [52/210] Compiling C++ object 'lc0@exe/src_syzygy_syzygy.cc.o'. [53/210] Compiling C++ object 'chessboard_test@exe/src_chess_board_test.cc.o'. [54/210] Compiling C++ object 'chessboard_test@exe/meson-generated_proto_net.pb.cc.o'. [55/210] Compiling C++ object 'chessboard_test@exe/src_selfplay_tournament.cc.o'. [56/210] Compiling C++ object 'chessboard_test@exe/src_engine.cc.o'. ninja: build stopped: subcommand failed.

borg323 commented 6 years ago

Can you try replacing cl2.hpp found in src/neural/openc with the original file from https://github.com/KhronosGroup/OpenCL-CLHPP/releases/download/v2.0.10/cl2.hpp

SleepyMario commented 6 years ago

That indeed did the trick. Should I close this issue now?

dubslow commented 6 years ago

That sounds like a bug in our file. Better leave this open until we have a fix for it. (I suspect it was something to do with the reformatting -- @frpays any thoughts?)

borg323 commented 6 years ago

I am preparing a patch that fixes various build issues. In this case I think we should be using the unmodified version from Khronos Group.

borg323 commented 6 years ago

fixed by https://github.com/LeelaChessZero/lc0/commit/3287af2fbdb10472ba1d696bf9a3653693fdb69f