Problems installing chess engine, github

Hello,

After the normal procedure of downloading and extracting it, I installed in MXLinux the LeelaChess engine for Scid_vs_pc from github:

I can’t get it to install on Manjaro or here on Endeavouros and I don’t see what I could be doing wrong.

The version in question is v0.26.1 and the file is marked as:

Source code (zip)

I installed eigen from octopi that was not installed, also meson … Any other ideas ?.

Check the link here:

I don’t know what to say to this, it is installed and runnig in my MXLinux without anything else except the normal follow up for this kind of installations on Scid …

Captura de pantalla

Captura de pantalla-1

Not sure if this solves your issue but lc0 is available in aur

$ yay -Ss LeelaChess
aur/lc0 0.26.1-1 (+0 0.00) 
    UCI-compliant chess engine designed to play chess via neural network, specifically those of the LeelaChessZero project.

So try install like this yay -S lc0
I gave it shot, but didn’t proceed beyond the first stage, see screenshot below

$ yay -S lc0
:: There are 4 providers available for opencl-driver:
:: Repositoryextra
    1) opencl-mesa 2) opencl-nvidia :: Repositorycommunity
    3) beignet 4) intel-compute-runtime 

Enter a number (default=1): ^C
[keos@keos-pc ~]$ LANG=C yay -S lc0
:: There are 4 providers available for opencl-driver:
:: Repositoryextra
    1) opencl-mesa 2) opencl-nvidia :: Repositorycommunity
    3) beignet 4) intel-compute-runtime 

Enter a number (default=1): 1
:: Checking for conflicts...
:: Checking for inner conflicts...
[Repo:5]  ocl-icd-2.2.12-4  libclc-0.2.0+589+9aa6f35-2  compiler-rt-10.0.1-1  clang-10.0.1-1  opencl-mesa-20.1.6-1
[Repo Make:2]  opencl-headers-2:2.2.20170516-3  gtest-1.10.0-1
[Aur:1]  lc0-0.26.1-1

==> Remove make dependencies after install? [y/N] 

[keos@keos-pc ~]$ LANG=C yay -S lc0
:: There are 4 providers available for opencl-driver:
:: Repositoryextra
    1) opencl-mesa 2) opencl-nvidia :: Repositorycommunity
    3) beignet 4) intel-compute-runtime 

Enter a number (default=1): 1
:: Checking for conflicts...
:: Checking for inner conflicts...
[Repo:5]  ocl-icd-2.2.12-4  libclc-0.2.0+589+9aa6f35-2  compiler-rt-10.0.1-1  clang-10.0.1-1  opencl-mesa-20.1.6-1
[Repo Make:2]  opencl-headers-2:2.2.20170516-3  gtest-1.10.0-1
[Aur:1]  lc0-0.26.1-1

==> Remove make dependencies after install? [y/N] y
  1 lc0                              (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
:: PKGBUILD up to date, Skipping (1/1): lc0
  1 lc0                              (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
:: (1/1) Parsing SRCINFO: lc0
[sudo] password for keos: 
resolving dependencies...
looking for conflicting packages...

Packages (7) clang-10.0.1-1  compiler-rt-10.0.1-1  gtest-1.10.0-1
             libclc-0.2.0+589+9aa6f35-2  ocl-icd-2.2.12-4
             opencl-headers-2:2.2.20170516-3  opencl-mesa-20.1.6-1

Total Download Size:    50.86 MiB
Total Installed Size:  276.07 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 ocl-icd-2.2.12-4...    52.1 KiB   554 KiB/s 00:00 [----------------------] 100%
 libclc-0.2.0+589...     6.8 MiB  1192 KiB/s 00:06 [----------------------] 100%
 compiler-rt-10.0...     2.5 MiB   992 KiB/s 00:03 [----------------------] 100%
 clang-10.0.1-1-x...    36.5 MiB   713 KiB/s 00:52 [----------------------] 100%
 opencl-mesa-20.1...     4.6 MiB   788 KiB/s 00:06 [----------------------] 100%
 opencl-headers-2...    73.0 KiB   912 KiB/s 00:00 [----------------------] 100%
 gtest-1.10.0-1-x...   314.9 KiB   858 KiB/s 00:00 [----------------------] 100%
(7/7) checking keys in keyring                     [----------------------] 100%
(7/7) checking package integrity                   [----------------------] 100%
(7/7) loading package files                        [----------------------] 100%
(7/7) checking for file conflicts                  [----------------------] 100%
:: Processing package changes...
(1/7) installing ocl-icd                           [----------------------] 100%
Optional dependencies for ocl-icd
    opencl-driver: packaged opencl driver [pending]
(2/7) installing libclc                            [----------------------] 100%
(3/7) installing compiler-rt                       [----------------------] 100%
(4/7) installing clang                             [----------------------] 100%
Optional dependencies for clang
    openmp: OpenMP support in clang with -fopenmp
    python: for scan-view and git-clang-format [installed]
    llvm: referenced by some clang headers
(5/7) installing opencl-mesa                       [----------------------] 100%
Optional dependencies for opencl-mesa
    opencl-headers: headers necessary for OpenCL development [pending]
(6/7) installing opencl-headers                    [----------------------] 100%
(7/7) installing gtest                             [----------------------] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
==> Making package: lc0 0.26.1-1 (Sun Aug 30 14:46:29 2020)
==> Retrieving sources...
  -> Found lc0
  -> Downloading lc0-0.26.1.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   127  100   127    0     0    520      0 --:--:-- --:--:-- --:--:--   520
100  442k    0  442k    0     0   575k      0 --:--:-- --:--:-- --:--:--  575k
  -> Downloading lczero-common-master.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   136  100   136    0     0    555      0 --:--:-- --:--:-- --:--:--   555
100  2390  100  2390    0     0   4818      0 --:--:-- --:--:-- --:--:--  4818
  -> Downloading weights_run1_42850.pb.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:02:10 --:--:--     0
curl: (28) Failed to connect to data.lczero.org port 80: Connection timed out
Warning: Transient problem: timeout Will retry in 3 seconds. 3 retries left.
  0     0    0     0    0     0      0      0 --:--:--  0:02:10 --:--:--     0
curl: (28) Failed to connect to data.lczero.org port 80: Connection timed out
Warning: Transient problem: timeout Will retry in 3 seconds. 2 retries left.
  0     0    0     0    0     0      0      0 --:--:--  0:02:10 --:--:--     0
curl: (28) Failed to connect to data.lczero.org port 80: Connection timed out
Warning: Transient problem: timeout Will retry in 3 seconds. 1 retries left.
  0     0    0     0    0     0      0      0 --:--:--  0:02:10 --:--:--     0
curl: (28) Failed to connect to data.lczero.org port 80: Connection timed out
==> ERROR: Failure while downloading http://data.lczero.org/files/networks/00af53b081e80147172e6f281c01daf5ca19ada173321438914c730370aa4267
    Aborting...
[sudo] password for keos: 
checking dependencies...
:: opencl-mesa optionally requires opencl-headers: headers necessary for OpenCL development

Packages (2) gtest-1.10.0-1  opencl-headers-2:2.2.20170516-3

Total Removed Size:  2.24 MiB

:: Do you want to remove these packages? [Y/n] 
:: Processing package changes...
(1/2) removing gtest                               [----------------------] 100%
(2/2) removing opencl-headers                      [----------------------] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[keos@keos-pc ~]$

==> ERROR: Failure while downloading http://data.lczero.org/files/networks/00af53b081e80147172e6f281c01daf5ca19ada173321438914c730370aa4267
    Aborting...

Are you going to cross-post regularly?

If so, I’d recommend you pick one forum so you don’t split effort, and then people on one or the other get the full picture rather than just the part you show them.

6 Likes

what’s wrong? im trying to find help. Are you not too in the two forum?.

This file is no longer available from that location. The default neural network file 703350.pb.gz is available in the Windows zip file though. You’ll need to extract in and update the PKGBUILD to use it. If that’s a bit too complicated for you, stick to Stockfish. For all intents and purposes any chess engine for the average chess player is going to be more than useful enough and you wouldn’t be able to appreciate the difference between stockfish and lc0.

EDIT:

To explain a bit more thoroughly, you’ll need to download one of the windows zip files from this page: https://lczero.org/play/download/

Inside the zip file is 703350.pb.gz, this is the file you’re currently having issues downloading. You’ll need to place this in the same folder as the PKGBUILD and use its filename instead of the URL in there. From there, rerun makepkg -s. Somewhat in the middle of something at the moment, but if someone has the time to give more of a play by play it might help Keos.

1 Like

As you said … for the average player. Of course!. But is it my case?.

Are you one of the top 100 GMs? :joy: If so, I’d love a game and be more than happy to walk you through the entire process :slight_smile:

when I was twelve years old I was already giving chess simultans in the capital of my country …

1 Like

Cool, what’s your FIDE rating? :slight_smile:

EDIT: Joking aside when I have time I’ll post more detailed instructions.

it was 2400 in usa around 1990 probably, now i’m 67 years old and don’t play chess any more … hight blood pression … etc.

2 Likes

OK my friend, after taking a few mins to look around I found an alternative download to the weight file and updated the PKGBUILD. Use the following and you should be right. I was able to build lc0 without a problem

# Maintainer: Ivan Marquesi Lerner <ivanmlerner@protonmail.com>

pkgname=lc0
pkgver=0.26.1
pkgrel=1
_run="run1"
_nnid=42850
pkgdesc="UCI-compliant chess engine designed to play chess via neural network, \
		       specifically those of the LeelaChessZero project."
arch=('x86_64')

url="https://lczero.org/"
license=('GPL3')

depends=('ocl-icd' 'zlib' 'opencl-driver')
makedepends=('meson' 'eigen' 'opencl-headers')
checkdepends=('gtest')
optdepends=("cudnn: Neural network library for use with nvidia GPUs")

install=lc0.install
source=("$pkgname"
	"$pkgname-$pkgver.tar.gz::https://github.com/LeelaChessZero/$pkgname/archive/v$pkgver.tar.gz"
	"lczero-common-master.tar.gz::https://github.com/LeelaChessZero/lczero-common/archive/master.tar.gz"
	"weights_${_run}_${_nnid}.pb.gz::https://training.lczero.org/get_network?sha=00af53b081e80147172e6f281c01daf5ca19ada173321438914c730370aa4267")
md5sums=('8ef8809da2c627dd2472859b157bb408'
         '89cb56d60740c622db63f4daeef4b70f'
         'e8eda64758da58c6a82126b9dc7c69ff'
         'e7c9e1abec8d859ffdbc89e18340c254')
noextract=('weights_${_run}_${_nnid}.pb.gz')

prepare() {
  cp -PRu "$srcdir/lczero-common-master/proto" "$srcdir/$pkgname-$pkgver/libs/lczero-common/"
  rm -dr "$srcdir/lczero-common-master"
  rm -f  "$srcdir/$pkgname-$pkgver/build-cl.cmd"
  rm -f  "$srcdir/$pkgname-$pkgver/build-cuda-ninja.cmd"
  rm -f  "$srcdir/$pkgname-$pkgver/build-cuda.cmd"
  rm -f  "$srcdir/$pkgname-pkgver/install_openSUSE_lc0.sh"
  rm -f  "$srcdir/$pkgname-pkgver/windows_build.md"
}

build() {
  cd "$pkgname-$pkgver"
  sh build.sh 
}

check() {
  cd "$pkgname-$pkgver/build/release"
  gtester chessboard_test
  gtester encoder_test
  gtester hashcat_test
  gtester optionsparser_test
  gtester position_test
  gtester syzygy_test
}

package() {
  install -Dm755 "$srcdir/$pkgname" "$pkgdir/usr/bin/$pkgname"
  install -Dm755 "$srcdir/$pkgname-$pkgver/build/release/$pkgname" "$pkgdir/usr/lib/$pkgname/$pkgname"
  install -Dm644 "$srcdir/weights_${_run}_${_nnid}.pb.gz" "$pkgdir/usr/lib/$pkgname/weights_${_run}_${_nnid}.pb.gz"
}

1 Like

No, i can’t understand this, you forgot this is a ‘newbie’ room … means around 800 Elo.

Just for you my friend, here’s the package already built: http://www.alenbasic.com/lc0-0.26.1-1-x86_64.pkg.tar.zst

Once you have downloaded that file from a terminal in the directory you downloaded it to, you can install it with sudo pacman -U lc0-0.26.1-1-x86_64.pkg.tar.zst

it was right to the dowloads section but it can’t be extracted

and later by the terminal:

keos@keos-pc ~]$ sudo pacman -U lc0-0.26.1-1-x86_64.pkg.tar.zst
[sudo] password for keos: 
loading packages...
error: 'lc0-0.26.1-1-x86_64.pkg.tar.zst': could not find or read package
[keos@keos-pc ~]$ 



i tried again with another aplication/option by right click … and it says the extraction was completed (it create a new file at the download section: ‘usr’).
Then i apply again the command but:

[keos@keos-pc ~]$ sudo pacman -U lc0-0.26.1-1-x86_64.pkg.tar.zst
[sudo] password for keos: 
loading packages...
error: 'lc0-0.26.1-1-x86_64.pkg.tar.zst': could not find or read package
[keos@keos-pc ~]$ 

It looks like you’re in your home folder… try this:

Open a terminal and do the following:

cd Descargas
ls

if you see lc0-0.26.1-1-x86_64.pkg.tar.zst then run sudo pacman -U lc0-0.26.1-1-x86_64.pkg.tar.zst

EDIT: updated command based on your locale.

First, let me show you this; ‘Descargas’ means Download:

Screenshot_2020-09-02_10-04-55

[keos@keos-pc ~]$ cd Descargas
[keos@keos-pc Descargas]$ ls
Arena-NNUE                 Hermann25-64.tar.gz
Arena-NNUE.7z              arasan-linux-binaries-22.1
Caissabase_2019_09_08      arasan-linux-binaries-22.1.tar.gz
Caissabase_2019_09_08.zip  lc0-0.26.1-1-x86_64.pkg.tar.zst
Hermann25-64               usr
[keos@keos-pc Descargas]$