Package Details: lc0 0.31.2-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: GPL-3.0-or-later
Submitter: ivanmlerner
Maintainer: ivanmlerner
Last Packager: ivanmlerner
Votes: 5
Popularity: 0.000022
First Submitted: 2019-08-04 07:47 (UTC)
Last Updated: 2025-03-06 23:36 (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 »

samuelhautamaki commented on 2025-03-06 20:26 (UTC)

This package does not seem to build, could the maintainer for this package correct the issues with the pkgbuild so that it works?

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.