Package Details: stockfish 1:17-1

Git Clone URL: https://aur.archlinux.org/stockfish.git (read-only, click to copy)
Package Base: stockfish
Description: A strong UCI chess engine
Upstream URL: https://stockfishchess.org/
Keywords: chess uci
Licenses: GPL-3.0
Submitter: None
Maintainer: niklasf
Last Packager: niklasf
Votes: 161
Popularity: 1.75
First Submitted: 2009-12-18 06:41 (UTC)
Last Updated: 2024-09-07 06:27 (UTC)

Latest Comments

1 2 3 4 5 6 .. 9 Next › Last »

calvinmwadime commented on 2024-09-06 22:17 (UTC) (edited on 2024-09-06 22:37 (UTC) by calvinmwadime)

Hello, I was playing around with stockfish, and noticed that there is a new update upstream released a few hours ago. Here is a link to github update with the patch . Most specifically, the commit to use is this .

niklasf commented on 2024-06-04 17:50 (UTC)

@HurricanePootis: Thanks, fixed.

HurricanePootis commented on 2024-06-04 05:48 (UTC)

This package does not comply with an SPDX compliant license(), nor does it list gcc-libs as a depend. Besides that, it's a swag package. I have left a patch below:

diff --git a/PKGBUILD b/PKGBUILD
index f361d4e..7c514d5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,8 +16,8 @@ epoch=1
 pkgdesc="A strong UCI chess engine"
 arch=('x86_64' 'i686' 'armv7h' 'aarch64')
 url="https://stockfishchess.org/"
-license=('GPL3')
-depends=('glibc')
+license=('GPL-3.0-or-later')
+depends=('glibc' 'gcc-libs')
 # Check EvalFileDefaultName{Big,Small} in src/evaluate.h and change accordingly
 _net_name_big=('b1a57edbea57')
 _net_name_small=('baff1ede1f90')

niklasf commented on 2024-04-29 20:46 (UTC)

@bagasdotme: Thanks, applied.

@xiota: Unfortunately Stockfish-specific arguments/flags are required. The performance difference increased a lot after neural networks were introduced. For example, x86-64-bmi2 vs x86-64 is usually more than twice as fast in terms of nps.

bagasdotme commented on 2024-04-29 02:45 (UTC) (edited on 2024-04-29 02:45 (UTC) by bagasdotme)

@niklasf: Instead of downloading default neural nets when building (and thus require wget/curl in depends array, you can list them in sources array), just like in berserk PKGBUILD:

diff --git a/PKGBUILD b/PKGBUILD
index 0203dd4baf..a39c3b39d4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,15 +10,29 @@

 pkgname=stockfish
 pkgver=16.1
-pkgrel=1
+pkgrel=2
 epoch=1
 pkgdesc="A strong UCI chess engine"
 arch=('x86_64' 'i686' 'armv7h' 'aarch64')
 url="https://stockfishchess.org/"
 license=('GPL3')
 depends=('glibc')
-source=("$pkgname-$pkgver.zip::https://github.com/official-stockfish/Stockfish/archive/sf_$pkgver.zip")
-sha512sums=('bfaa5c644d2acb8538b1a2c72fdf58c6b0ba6cbb3a4e1a335391faa1529f1069eca888295bd4eef0e887860185a3e0e18529ab609829738c420a0c810be5cca4')
+# Neural nets used for this particular release, to evaluate positions. Each
+# release may use different ones, thus check EvalFileDefaultName{Big,Small} macros
+# in src/evaluate.h and change accordingly.
+_net_name_big=('b1a57edbea57')
+_net_name_small=('baff1ede1f90')
+source=("$pkgname-$pkgver.zip::https://github.com/official-stockfish/Stockfish/archive/sf_$pkgver.zip"
+  "https://tests.stockfishchess.org/api/nn/nn-${_net_name_big}.nnue"
+  "https://tests.stockfishchess.org/api/nn/nn-${_net_name_small}.nnue")
+sha512sums=('bfaa5c644d2acb8538b1a2c72fdf58c6b0ba6cbb3a4e1a335391faa1529f1069eca888295bd4eef0e887860185a3e0e18529ab609829738c420a0c810be5cca4'
+            'de2141ba301dd4da0cfa5d3a8f3574fa0ac9b24915fa1802654ad8baf274157feb1fd0ce96aae3893b789a1bb1df8eccdb4a5a331756802bebde3c4d1db5f1de'
+            '56358da4810a2bf5b903668d8243ec888a0a64302a893207074b3f1644c9877ddd4557303f025eabcc6e0f7b31af42c1265ba2fd34209df9dd0ea205d4f4a8e9')
+
+prepare() {
+  ln -sf "${srcdir}/nn-${_net_name_big}.nnue" "Stockfish-sf_${pkgver}/src"
+  ln -sf "${srcdir}/nn-${_net_name_small}.nnue" "Stockfish-sf_${pkgver}/src"
+}

 build() {
   cd "Stockfish-sf_${pkgver}/src"

xiota commented on 2024-04-01 15:55 (UTC)

CPU detection is unnecessary when FLAGS are set correctly in makepkg.conf (user responsibility).

From benchmarks I ran a while back, the performance benefit wasn't very big, about the same as using clang instead of gcc.

niklasf commented on 2024-02-26 18:43 (UTC)

@xiota: Sorry, I understand that doing build-time CPU feature detection is essentially broken, but the regression on modern hardware would be so huge that I don't just want to remove it without replacement. Maybe we could build for all applicable targets and have a small wrapper script doing feature detection at runtime?

xiota commented on 2023-12-31 20:55 (UTC) (edited on 2023-12-31 21:14 (UTC) by xiota)

Please remove CPU detection code. It produces binaries that crash when used on a different computer. I understand that the upstream Makefile also tries to detect CPU.

Here is a PKGBUILD that bypasses CPU detection and respects CXXFLAGS set in makepkg.conf

niklasf commented on 2022-09-07 20:27 (UTC)

@buzo: Thanks. Removed those.

@SandaruKasa: There is now an official solution (https://github.com/official-stockfish/Stockfish/commit/a4d18d23a9f7626234fcfbb6b23b3d0b8d1a9441). So I backported this, replacing the workaround.

buzo commented on 2022-08-29 18:20 (UTC) (edited on 2022-08-29 18:21 (UTC) by buzo)

niklasf, thanks for maintaining this!

By the way, you don't need to specify curl or sed in makedepends: sed is part of base-devel, see here. And curl is a dependency of pacman, which is in base.