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.000108
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 »

SleepyMario commented on 2024-07-23 02:44 (UTC)

Hello, there can be this problem on some installations (including mine):

/home/xxxxx/.cache/pikaur/build/lc0/PKGBUILD: line 52: gtester: command not found

It can be solved by adding core/glib2-devel as a build dependency.

mrzeznicki commented on 2024-07-10 15:21 (UTC)

@FabioLolix Yuu must pin it to the commit that corresponds to the tagged version. For instance, I can build it with the following change:

@@ -29,6 +29,8 @@

 noextract=('$_weights')

+_common='fafda0f'
+
 prepare() {
   cd "$srcdir/$pkgname-$_pkgver/libs"
   if [ -d ./lczero-common ]; then {
@@ -36,6 +38,9 @@ prepare() {
   }
   fi
   git clone https://github.com/LeelaChessZero/lczero-common.git
+
+  cd lczero-common/
+  git checkout $_common
 }

FabioLolix commented on 2024-06-06 15:11 (UTC) (edited on 2024-06-06 16:26 (UTC) by FabioLolix)

Confirming that this fail to build with devtools

[2/162] Generating 'liblc0_lib.so.p/proto/net.pb.h'
FAILED: liblc0_lib.so.p/proto/net.pb.h 
/build/lc0/src/lc0-0.30.0/scripts/compile_proto.py --proto_path=../../libs/lczero-common --cpp_out=liblc0_lib.so.p ../../libs/lczero-common/proto/net.proto
Expected field or type:
    required string key = 1;  // name of the policy head
    ^^^
Traceback (most recent call last):
  File "/build/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 833, in <module>
    proto_file = ProtoFileParser(Lexer(input.read()))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/build/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 744, in __init__
    self.ParseMessage(lexer)
  File "/build/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 764, in ParseMessage
    ProtoMessageParser(lexer, [self.types], [])
  File "/build/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 558, in __init__
    ProtoMessageParser(lexer, [self.types, *type_stack],
  File "/build/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 566, in __init__
    lexer.Error('Expected field or type')
  File "/build/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 142, in Error
    raise ValueError("Parse error: %s at line %d column %d." %
ValueError: Parse error: Expected field or type at line 144 column 4.
[3/162] Generating 'encoder_test.p/proto/net.pb.h'
FAILED: encoder_test.p/proto/net.pb.h 
/build/lc0/src/lc0-0.30.0/scripts/compile_proto.py --proto_path=../../libs/lczero-common --cpp_out=encoder_test.p ../../libs/lczero-common/proto/net.proto
Expected field or type:
    required string key = 1;  // name of the policy head
    ^^^
Traceback (most recent call last):
  File "/build/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 833, in <module>
    proto_file = ProtoFileParser(Lexer(input.read()))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/build/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 744, in __init__
    self.ParseMessage(lexer)
  File "/build/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 764, in ParseMessage
    ProtoMessageParser(lexer, [self.types], [])
  File "/build/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 558, in __init__
    ProtoMessageParser(lexer, [self.types, *type_stack],
  File "/build/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 566, in __init__
    lexer.Error('Expected field or type')
  File "/build/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 142, in Error
    raise ValueError("Parse error: %s at line %d column %d." %
ValueError: Parse error: Expected field or type at line 144 column 4.
[4/162] Generating 'lc0.p/proto/net.pb.h'
FAILED: lc0.p/proto/net.pb.h 
/build/lc0/src/lc0-0.30.0/scripts/compile_proto.py --proto_path=../../libs/lczero-common --cpp_out=lc0.p ../../libs/lczero-common/proto/net.proto
Expected field or type:
    required string key = 1;  // name of the policy head
    ^^^
Traceback (most recent call last):
  File "/build/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 833, in <module>
    proto_file = ProtoFileParser(Lexer(input.read()))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/build/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 744, in __init__
    self.ParseMessage(lexer)
  File "/build/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 764, in ParseMessage
    ProtoMessageParser(lexer, [self.types], [])
  File "/build/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 558, in __init__
    ProtoMessageParser(lexer, [self.types, *type_stack],
  File "/build/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 566, in __init__
    lexer.Error('Expected field or type')
  File "/build/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 142, in Error
    raise ValueError("Parse error: %s at line %d column %d." %
ValueError: Parse error: Expected field or type at line 144 column 4.
[5/162] Generating 'lc0.p/neural/onnx/onnx.pb.h'
ninja: build stopped: subcommand failed.
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja -C /build/lc0/src/lc0-0.30.0/build/release
==> ERROR: A failure occurred in build().

This pkgbuild git clone in prepare() instead of properly configuring the git submodule (which haven't been updated in 6 years and may be the build issue cause)

Update: configured to use the git submodule but fails with another error

binarydepth commented on 2024-06-06 15:04 (UTC) (edited on 2024-06-06 15:06 (UTC) by binarydepth)


[3/162] Generating 'encoder_test.p/proto/net.pb.h'
FAILED: encoder_test.p/proto/net.pb.h 
/home/binarydepth/.cache/yay/lc0/src/lc0-0.30.0/scripts/compile_proto.py --proto_path=../../libs/lczero-common --cpp_out=encoder_test.p ../../libs/lczero-common/proto/net.proto
Expected field or type:
    required string key = 1;  // name of the policy head
    ^^^
Traceback (most recent call last):
  File "/home/binarydepth/.cache/yay/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 833, in <module>
    proto_file = ProtoFileParser(Lexer(input.read()))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/binarydepth/.cache/yay/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 744, in __init__
    self.ParseMessage(lexer)
  File "/home/binarydepth/.cache/yay/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 764, in ParseMessage
    ProtoMessageParser(lexer, [self.types], [])
  File "/home/binarydepth/.cache/yay/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 558, in __init__
    ProtoMessageParser(lexer, [self.types, *type_stack],
  File "/home/binarydepth/.cache/yay/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 566, in __init__
    lexer.Error('Expected field or type')
  File "/home/binarydepth/.cache/yay/lc0/src/lc0-0.30.0/scripts/compile_proto.py", line 142, in Error
    raise ValueError("Parse error: %s at line %d column %d." %
ValueError: Parse error: Expected field or type at line 144 column 4.
[5/162] Generating 'lc0.p/neural/onnx/onnx.pb.h'
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: lc0-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
lc0 - exit status 4

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