Package Details: lc0 0.30.0-1

Git Clone URL: https://aur.archlinux.org/lc0.git (read-only, click to copy)
Package Base: lc0
Description: UCI-compliant chess engine designed to play chess via neural network, specifically those of the LeelaChessZero project.
Upstream URL: https://lczero.org/
Keywords: chess engine lc0 lczero leela neural-network uci
Licenses: GPL3
Submitter: ivanmlerner
Maintainer: ivanmlerner
Last Packager: ivanmlerner
Votes: 5
Popularity: 0.013962
First Submitted: 2019-08-04 07:47 (UTC)
Last Updated: 2023-09-10 20:20 (UTC)

Pinned Comments

ivanmlerner commented on 2019-08-04 18:25 (UTC) (edited on 2023-09-10 20:23 (UTC) by ivanmlerner)

At least one backend is needed. The most common are listed as optional dependencies.

Latest Comments

1 2 3 4 Next › Last »

mrzeznicki commented on 2024-03-10 19:11 (UTC)

Currently, it does not build due to the changes in lc0-common. Apparently, the build process cannot just willy-nilly checkout the repo and hope it works out fine. It must be tied to a specific commit

mrzeznicki commented on 2023-11-04 14:52 (UTC)

If the package doesn't build for you after upgrading to cuda-12.3.0, you will have to apply the following patch:

@@ -21,11 +21,11 @@ MESON=$(PATH="${PATH}:${HOME}/.local/bin" command -v meson || :)
 MESON=${MESON:?"Could not find meson. Is it installed and in PATH?"}

 if [ -f "${BUILDDIR}/build.ninja" ]
 then
-  "${MESON}" configure "${BUILDDIR}" -Dbuildtype="${BUILDTYPE}" -Dprefix="${INSTALL_PREFIX:-/usr/local}" "$@"
+  "${MESON}" configure "${BUILDDIR}" -Dnvcc_ccbin="/opt/cuda/bin/g++" -Dbuildtype="${BUILDTYPE}" -Dprefix="${INSTALL_PREFIX:-/usr/local}" "$@"
 else
-  "${MESON}" "${BUILDDIR}" --buildtype "${BUILDTYPE}" --prefix "${INSTALL_PREFIX:-/usr/local}" "$@"
+  "${MESON}" "${BUILDDIR}" -Dnvcc_ccbin="/opt/cuda/bin/g++" --buildtype "${BUILDTYPE}" --prefix "${INSTALL_PREFIX:-/usr/local}" "$@"
 fi

 "${MESON}" compile -C "${BUILDDIR}"

MarsSeed commented on 2023-07-02 10:33 (UTC)

Please check the changes around Arch openblas and blas-openblas. You might need to switch depends from openblas to blas-openblas. Arch openblas package is incomplete, only blas-openblas carries the full OpenBlas Lapack suite.

Background:

Arch announced on June 14, 2023 a new blas-openblas repo package, which finally offers the full suite of OpenBLAS Lapack, with their blas implementation and corresponding cblas/lapacke interfaces.

mrzeznicki commented on 2023-05-22 15:59 (UTC)

@ivanmlerner Perhaps you could backport 37dbca48 to solve problems with building with GCC 13. I believe this is what @shahuda ran into.

shahuda commented on 2023-05-06 16:55 (UTC)

PKGBUILDs up to date nothing new to review fetching devel info... ==> Making package: lc0 0.29.0-1 (Sat May 6 11:51:04 2023) ==> Retrieving sources... -> Found lc0 -> Found lc0-0.29.0.tar.gz -> Found weights_hanse-69722-vf2.gz ==> Validating source files with sha256sums... lc0 ... Passed lc0-0.29.0.tar.gz ... Passed weights_hanse-69722-vf2.gz ... Passed ==> Making package: lc0 0.29.0-1 (Sat May 6 11:51:05 2023) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Retrieving sources... -> Found lc0 -> Found lc0-0.29.0.tar.gz -> Found weights_hanse-69722-vf2.gz ==> Validating source files with sha256sums... lc0 ... Passed lc0-0.29.0.tar.gz ... Passed weights_hanse-69722-vf2.gz ... Passed ==> Removing existing $srcdir/ directory... ==> Extracting sources... -> Extracting lc0-0.29.0.tar.gz with bsdtar bsdtar: Failed to set default locale -> Extracting weights_hanse-69722-vf2.gz with gzip ==> Starting prepare()... Cloning into 'lczero-common'... remote: Enumerating objects: 169, done. remote: Counting objects: 100% (29/29), done. remote: Compressing objects: 100% (18/18), done. remote: Total 169 (delta 6), reused 24 (delta 4), pack-reused 140 Receiving objects: 100% (169/169), 33.73 KiB | 1.30 MiB/s, done. Resolving deltas: 100% (50/50), done. ==> Sources are ready. lc0-0.29.0-1: parsing pkg list... ==> Making package: lc0 0.29.0-1 (Sat May 6 11:51:07 2023) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> WARNING: Using existing $srcdir/ tree ==> Removing existing $pkgdir/ directory... ==> Starting build()... ~/.cache/paru/clone/lc0/src/lc0-0.29.0 ~/.cache/paru/clone/lc0/src/lc0-0.29.0 The Meson build system Version: 1.1.0 Source dir: /home/shahuda/.cache/paru/clone/lc0/src/lc0-0.29.0 Build dir: /home/shahuda/.cache/paru/clone/lc0/src/lc0-0.29.0/build/release Build type: native build Project name: lc0 Project version: undefined C++ compiler for the host machine: c++ (gcc 13.1.1 "c++ (GCC) 13.1.1 20230429") C++ linker for the host machine: c++ ld.bfd 2.40.0 Host machine cpu family: x86_64 Host machine cpu: x86_64 Has header "optional" : YES Has header "string_view" : YES Has header "charconv" : YES Compiler for C++ supports arguments -march=native: YES Program scripts/compile_proto.py found: YES (/home/shahuda/.cache/paru/clone/lc0/src/lc0-0.29.0/scripts/compile_proto.py) Program git found: YES (/usr/bin/git) WARNING: You should add the boolean check kwarg to the run_command call. It currently defaults to false, but it will default to true in future releases of meson. See also: https://github.com/mesonbuild/meson/issues/9300 Message: Using build identifier "git.3e0a33b". Configuring build_id.h using configuration Run-time dependency threads found: YES Library dl found: YES Found pkg-config: /usr/bin/pkg-config (1.8.1) Found CMake: /usr/bin/cmake (3.26.3) Run-time dependency tensorflow_cc found: NO (tried pkgconfig and cmake) Run-time dependency accelerate found: NO (tried pkgconfig and cmake) Library mkl_rt found: NO Library mklml found: NO Library dnnl found: NO Library openblas.dll found: NO Library openblas found: NO Run-time dependency eigen3 found: YES 3.4.0 Program ispc found: NO Library OpenCL found: YES Run-time dependency opencl found: NO Has header "CL/opencl.h" : YES Library cublas found: YES Library cudnn found: YES Library cudart found: YES Program nvcc found: YES (/opt/cuda/bin/nvcc) Run-time dependency appleframeworks found: NO (tried framework) Run-time dependency zlib found: YES 1.2.13 WARNING: find_library('libatomic') starting in "lib" only works by accident and is not portable Library libatomic found: YES Run-time dependency GTest found: YES 1.13.0 Build targets in project: 10

lc0 undefined

User defined options buildtype: release prefix : /usr/local

Found ninja-1.11.1.git.kitware.jobserver-1 at /usr/bin/ninja WARNING: Running the setup command as meson [options] instead of meson setup [options] is ambiguous and deprecated. [47/172] Compiling C++ object lc0.p/src_utils_configfile.cc.o FAILED: lc0.p/src_utils_configfile.cc.o c++ -Ilc0.p -I. -I../.. -I../../src -I/usr/include -I/opt/cuda/include -I../../src/neural/cuda -flto=auto -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c++17 -O3 -march=native -DUSE_CUDNN -DNO_PEXT -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -isystem/usr/include/eigen3 -pthread -isystem../../third_party -MD -MQ lc0.p/src_utils_configfile.cc.o -MF lc0.p/src_utils_configfile.cc.o.d -o lc0.p/src_utils_configfile.cc.o -c ../../src/utils/configfile.cc In file included from ../../src/utils/configfile.cc:34: ../../src/utils/filesystem.h:45:1: error: ‘uint64_t’ does not name a type 45 | uint64_t GetFileSize(const std::string& filename); | ^~~~~~~~ ../../src/utils/filesystem.h:1:1: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’? +++ |+#include <cstdint> 1 | /* [60/172] Generating cuda fp16 code with a custom command ninja: build stopped: subcommand failed. ==> ERROR: A failure occurred in build(). Aborting... error: failed to build 'lc0-0.29.0-1': error: packages failed to build: lc0-0.29.0-1

holyArch commented on 2022-12-19 16:40 (UTC)

@ivanmlerner Only now I've read your comment about lc0 not working with openblas from Community.

ivanmlerner commented on 2022-12-16 01:42 (UTC)

@holyArch What package are you using for openblas?

holyArch commented on 2022-12-14 18:37 (UTC) (edited on 2022-12-14 18:42 (UTC) by holyArch)


(1/1) Arming ConditionNeedsUpdate...
==> Making package: lc0 0.29.0-1
==> Retrieving sources...
  -> Found lc0
  -> Downloading lc0-0.29.0.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  562k    0  562k    0     0   343k      0 --:--:--  0:00:01 --:--:-- 1428k
  -> Downloading weights_hanse-69722-vf2.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  130M  100  130M    0     0  8938k      0  0:00:14  0:00:14 --:--:-- 11.0M
==> Validating source files with sha256sums...
    lc0 ... Passed
    lc0-0.29.0.tar.gz ... Passed
    weights_hanse-69722-vf2.gz ... Passed
 -> meson not satisfied, flushing install queue
==> Making package: lc0 0.29.0-1
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found lc0
  -> Found lc0-0.29.0.tar.gz
  -> Found weights_hanse-69722-vf2.gz
==> Validating source files with sha256sums...
    lc0 ... Passed
    lc0-0.29.0.tar.gz ... Passed
    weights_hanse-69722-vf2.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting lc0-0.29.0.tar.gz with bsdtar
  -> Extracting weights_hanse-69722-vf2.gz with gzip
==> Starting prepare()...
Cloning into 'lczero-common'...
remote: Enumerating objects: 165, done.
remote: Counting objects: 100% (25/25), done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 165 (delta 5), reused 14 (delta 3), pack-reused 140
Receiving objects: 100% (165/165), 32.70 KiB | 697.00 KiB/s, done.
Resolving deltas: 100% (49/49), done.
==> Sources are ready.
==> Making package: lc0 0.29.0-1
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting build()...
~/.cache/yay/lc0/src/lc0-0.29.0 ~/.cache/yay/lc0/src/lc0-0.29.0
The Meson build system
Version: 0.64.1
Source dir: /home/holyarch/.cache/yay/lc0/src/lc0-0.29.0
Build dir: /home/holyarch/.cache/yay/lc0/src/lc0-0.29.0/build/release
Build type: native build
Project name: lc0
Project version: undefined
C++ compiler for the host machine: c++ (gcc 12.2.0 "c++ (GCC) 12.2.0")
C++ linker for the host machine: c++ ld.bfd 2.39.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Has header "optional" : YES 
Has header "string_view" : YES 
Has header "charconv" : YES 
Compiler for C++ supports arguments -march=native: YES 
Program scripts/compile_proto.py found: YES (/home/holyarch/.cache/yay/lc0/src/lc0-0.29.0/scripts/compile_proto.py)
Program git found: YES (/usr/bin/git)
WARNING: You should add the boolean check kwarg to the run_command call.
         It currently defaults to false,
         but it will default to true in future releases of meson.
         See also: https://github.com/mesonbuild/meson/issues/9300
Message: Using build identifier "git.3e0a33b".
Configuring build_id.h using configuration
Run-time dependency threads found: YES
Library dl found: YES
Found pkg-config: /usr/bin/pkg-config (1.8.0)
Found CMake: /usr/bin/cmake (3.25.1)
Run-time dependency tensorflow_cc found: NO (tried pkgconfig and cmake)
Run-time dependency accelerate found: NO (tried pkgconfig and cmake)
Library mkl_rt found: NO
Library mklml found: NO
Library dnnl found: NO
Library openblas.dll found: NO
Library openblas found: YES
Has header "openblas_config.h" : YES 
Run-time dependency eigen3 found: YES 3.4.0
Program ispc found: NO
Library OpenCL found: YES
Run-time dependency opencl found: NO 
Has header "CL/opencl.h" : YES 
Library cublas found: NO
Library cudnn found: NO
Library cudart found: NO
Program nvcc /usr/local/cuda/bin/nvcc /opt/cuda/bin/nvcc found: NO
Run-time dependency appleframeworks found: NO (tried framework)
Run-time dependency zlib found: YES 1.2.13
WARNING: find_library('libatomic') starting in "lib" only works by accident and is not portable
Library libatomic found: YES
Run-time dependency GTest found: YES 1.12.1
Build targets in project: 8

lc0 undefined

  User defined options
    buildtype: release
    prefix   : /usr/local

Found ninja-1.11.1 at /usr/bin/ninja
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
[70/164] Compiling C++ object lc0.p/src_neural_opencl_network_opencl.cc.o
In file included from /usr/include/CL/cl.h:20,
                 from /usr/include/CL/opencl.h:24,
                 from ../../third_party/cl2.hpp:506,
                 from ../../src/neural/opencl/OpenCL.h:39,
                 from ../../src/neural/opencl/network_opencl.cc:28:
/usr/include/CL/cl_version.h:22:104: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |                                                                                                        ^
[72/164] Compiling C++ object lc0.p/src_neural_opencl_OpenCL.cc.o
In file included from /usr/include/CL/cl.h:20,
                 from /usr/include/CL/opencl.h:24,
                 from ../../third_party/cl2.hpp:506,
                 from ../../src/neural/opencl/OpenCL.h:39,
                 from ../../src/neural/opencl/OpenCL.cc:35:
/usr/include/CL/cl_version.h:22:104: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |                                                                                                        ^
[75/164] Compiling C++ object lc0.p/src_neural_opencl_OpenCLTuner.cc.o
In file included from /usr/include/CL/cl.h:20,
                 from /usr/include/CL/opencl.h:24,
                 from ../../third_party/cl2.hpp:506,
                 from ../../src/neural/opencl/OpenCL.h:39,
                 from ../../src/neural/opencl/OpenCLTuner.h:29,
                 from ../../src/neural/opencl/OpenCLTuner.cc:22:
/usr/include/CL/cl_version.h:22:104: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |                                                                                                        ^
[76/164] Compiling C++ object lc0.p/src_neural_opencl_OpenCLBuffers.cc.o
In file included from /usr/include/CL/cl.h:20,
                 from /usr/include/CL/opencl.h:24,
                 from ../../third_party/cl2.hpp:506,
                 from ../../src/neural/opencl/OpenCL.h:39,
                 from ../../src/neural/opencl/OpenCLBuffers.h:37,
                 from ../../src/neural/opencl/OpenCLBuffers.cc:22:
/usr/include/CL/cl_version.h:22:104: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |                                                                                                        ^
[94/164] Linking target lc0
FAILED: lc0 
c++  -o lc0 lc0.p/src_main.cc.o lc0.p/src_utils_protomessage.cc.o lc0.p/src_benchmark_backendbench.cc.o lc0.p/src_benchmark_benchmark.cc.o lc0.p/src_chess_bitboard.cc.o lc0.p/src_chess_board.cc.o lc0.p/src_chess_position.cc.o lc0.p/src_chess_uciloop.cc.o lc0.p/src_engine.cc.o lc0.p/src_lc0ctl_describenet.cc.o lc0.p/src_lc0ctl_leela2onnx.cc.o lc0.p/src_lc0ctl_onnx2leela.cc.o lc0.p/src_mcts_node.cc.o lc0.p/src_mcts_params.cc.o lc0.p/src_mcts_search.cc.o lc0.p/src_mcts_stoppers_alphazero.cc.o lc0.p/src_mcts_stoppers_common.cc.o lc0.p/src_mcts_stoppers_factory.cc.o lc0.p/src_mcts_stoppers_legacy.cc.o lc0.p/src_mcts_stoppers_simple.cc.o lc0.p/src_mcts_stoppers_smooth.cc.o lc0.p/src_mcts_stoppers_stoppers.cc.o lc0.p/src_mcts_stoppers_timemgr.cc.o lc0.p/src_neural_cache.cc.o lc0.p/src_neural_decoder.cc.o lc0.p/src_neural_encoder.cc.o lc0.p/src_neural_factory.cc.o lc0.p/src_neural_loader.cc.o lc0.p/src_neural_network_check.cc.o lc0.p/src_neural_network_demux.cc.o lc0.p/src_neural_network_legacy.cc.o lc0.p/src_neural_network_mux.cc.o lc0.p/src_neural_network_random.cc.o lc0.p/src_neural_network_record.cc.o lc0.p/src_neural_network_rr.cc.o lc0.p/src_neural_network_trivial.cc.o lc0.p/src_neural_onnx_adapters.cc.o lc0.p/src_neural_onnx_builder.cc.o lc0.p/src_neural_onnx_converter.cc.o lc0.p/src_selfplay_game.cc.o lc0.p/src_selfplay_loop.cc.o lc0.p/src_selfplay_tournament.cc.o lc0.p/src_syzygy_syzygy.cc.o lc0.p/src_trainingdata_reader.cc.o lc0.p/src_trainingdata_trainingdata.cc.o lc0.p/src_trainingdata_writer.cc.o lc0.p/src_utils_commandline.cc.o lc0.p/src_utils_configfile.cc.o lc0.p/src_utils_esc_codes.cc.o lc0.p/src_utils_files.cc.o lc0.p/src_utils_histogram.cc.o lc0.p/src_utils_logging.cc.o lc0.p/src_utils_numa.cc.o lc0.p/src_utils_optionsdict.cc.o lc0.p/src_utils_optionsparser.cc.o lc0.p/src_utils_random.cc.o lc0.p/src_utils_string.cc.o lc0.p/src_utils_weights_adapter.cc.o lc0.p/src_utils_fp16_utils.cc.o lc0.p/src_version.cc.o lc0.p/src_utils_filesystem.posix.cc.o lc0.p/src_neural_blas_convolution1.cc.o lc0.p/src_neural_blas_fully_connected_layer.cc.o lc0.p/src_neural_blas_se_unit.cc.o lc0.p/src_neural_blas_network_blas.cc.o lc0.p/src_neural_blas_winograd_convolution3.cc.o lc0.p/src_neural_opencl_network_opencl.cc.o lc0.p/src_neural_opencl_OpenCL.cc.o lc0.p/src_neural_opencl_OpenCLTuner.cc.o lc0.p/src_neural_opencl_OpenCLBuffers.cc.o lc0.p/src_neural_shared_activation.cc.o lc0.p/src_neural_shared_winograd_filter.cc.o -flto -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -pthread -Wl,--start-group /usr/lib/libopenblas.so /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../lib/libOpenCL.so /usr/lib/libz.so /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../lib/libatomic.so -Wl,--end-group
/usr/bin/ld: /tmp/ccbRjxOW.ltrans14.ltrans.o: in function `lczero::Convolution1<false>::Forward(unsigned long, unsigned long, unsigned long, float const*, float const*, float*)':
<artificial>:(.text+0x2141): undefined reference to `cblas_sgemm'
/usr/bin/ld: /tmp/ccbRjxOW.ltrans14.ltrans.o: in function `lczero::WinogradConvolution3<false>::Forward(unsigned long, unsigned long, unsigned long, float const*, float const*, float*)':
<artificial>:(.text+0x228b): undefined reference to `cblas_sgemm'
/usr/bin/ld: /tmp/ccbRjxOW.ltrans14.ltrans.o: in function `lczero::FullyConnectedLayer<false>::Forward1D(unsigned long, unsigned long, unsigned long, float const*, float const*, float const*, lczero::ActivationFunction, float*)':
<artificial>:(.text+0x287e): undefined reference to `cblas_sgemm'
/usr/bin/ld: <artificial>:(.text+0x28cc): undefined reference to `cblas_sgemv'
/usr/bin/ld: /tmp/ccbRjxOW.ltrans14.ltrans.o: in function `lczero::(anonymous namespace)::BlasComputation<false>::ComputeBlocking()':
<artificial>:(.text+0x7854): undefined reference to `cblas_sdot'
/usr/bin/ld: <artificial>:(.text+0x80bd): undefined reference to `cblas_sgemm'
/usr/bin/ld: <artificial>:(.text+0x8244): undefined reference to `cblas_sgemm'
/usr/bin/ld: <artificial>:(.text+0x8a38): undefined reference to `cblas_sgemm'
collect2: error: ld returned 1 exit status
[96/164] Compiling C++ object liblc0_lib.so.p/src_mcts_stoppers_simple.cc.o
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().
    Aborting...

mrzeznicki commented on 2022-11-15 23:06 (UTC)

There is one more place where /bin/sh shebang is used incorrectly. It's lc0 (pushd does not need to work under /bin/sh - it's bash-ism). So perhaps lc0 should directly use #!/bin/bash