Package Details: stockfish 1:15-1

Git Clone URL: https://aur.archlinux.org/stockfish.git (read-only, click to copy)
Package Base: stockfish
Description: A strong chess engine written by Tord Romstad, Marco Costalba, Joona Kiiski
Upstream URL: https://stockfishchess.org/
Licenses: GPL3
Submitter: None
Maintainer: bulletmark
Last Packager: bulletmark
Votes: 142
Popularity: 1.87
First Submitted: 2009-12-18 06:41 (UTC)
Last Updated: 2022-04-23 20:24 (UTC)

Latest Comments

Peter2469 commented on 2021-08-24 14:57 (UTC)

@apetresc Thank you for correcting me; So if the package version changes would the PKGBUILD also be changed unless stated otherwise?

apetresc commented on 2021-08-24 13:39 (UTC)

@Peter2469 Not exactly; if Stockfish 15 comes out then the package version changes, and pkgrel goes back down to 1. pkgrel is meant to increment for non-upstream changes within a release (for things like fixing PKGBUILDs).

Peter2469 commented on 2021-08-24 11:17 (UTC)

@bulletmark, That is true I would assume if pkgrel gets bumped it is if Stockfish 15 comes out?

bulletmark commented on 2021-08-24 04:12 (UTC)

@Peter2469, yes I know there would be others. To be clear, I didn't bump the pkgrel because there is no point forcing all existing users to see an update (e.g via yay) when none of them are aarch64 users. This change only affects new aarch64 users, who are yet to install it.

Peter2469 commented on 2021-08-24 04:04 (UTC)

@bulletmark, I have tested it and can confirm that it works fine; there would be many other people like me with the pinephone or devices with the same architecture so adding the option may be an idea but understandable at this current circumstance.

bulletmark commented on 2021-08-24 03:46 (UTC)

@Peter2469, I added that change and I'll have to trust it works. Did not change the pkgrel because only affects you. Please confirm ok.

Peter2469 commented on 2021-08-24 01:44 (UTC) (edited on 2021-08-24 01:45 (UTC) by Peter2469)

Hello, I edited the PKGBUILD to add support to aarch64 which my pinephone uses. I tried to do armv8-a which is the microarchitecture but it didn't want to build.

The arch would support "aarch64" and you just need to add 2 lines

elif [[ "$CARCH" == "aarch64" ]]; then
    _arch=armv8

setone commented on 2021-07-17 13:18 (UTC)

Thank you @bulletmark, that does seem to work. Successfully ran

./stockfish bench 16 1 13 default depth mixed

bulletmark commented on 2021-07-17 01:46 (UTC)

@setone, yes that check is primitive and my fix here is primitive as well but should work. Can you please try it: http://ix.io/3tdC

setone commented on 2021-07-16 20:00 (UTC) (edited on 2021-07-16 20:03 (UTC) by setone)

Hello, I have an older AMD processor:

Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         40 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  4
  On-line CPU(s) list:   0-3
Vendor ID:               AuthenticAMD
  Model name:            AMD A8-3820 APU with Radeon(tm) HD Graphics
    CPU family:          18
    Model:               1
    Thread(s) per core:  1
    Core(s) per socket:  4
    Socket(s):           1
    Stepping:            0
    Frequency boost:     enabled
    CPU max MHz:         2500.0000
    CPU min MHz:         800.0000
    BogoMIPS:            5002.60
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_api
                         cid pni cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt cpb hw_pstate vmmcall arat npt lbrv svm_lock nrip_save pausefilter
Virtualization features: 
  Virtualization:        AMD-V
Caches (sum of all):     
  L1d:                   256 KiB (4 instances)
  L1i:                   256 KiB (4 instances)
  L2:                    4 MiB (4 instances)
NUMA:                    
  NUMA node(s):          1
  NUMA node0 CPU(s):     0-3
Vulnerabilities:         
  Itlb multihit:         Not affected
  L1tf:                  Not affected
  Mds:                   Not affected
  Meltdown:              Not affected
  Spec store bypass:     Not affected
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:            Mitigation; Full AMD retpoline, STIBP disabled, RSB filling
  Srbds:                 Not affected
  Tsx async abort:       Not affected

When I build using makepkg, PKGBUILD incorrectly identifies my architecture as x86-64-modern. This causes stockfish to crash in smmintrin.h:

281│ extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
282│ _mm_max_epi8 (__m128i __X, __m128i __Y)
283│ {
284├─> return (__m128i) __builtin_ia32_pmaxsb128 ((__v16qi)__X, (__v16qi)__Y);
285│ }

I can work around the problem by commenting out 2 lines in PKGBUILD:

 30 #  elif grep -q popcnt /proc/cpuinfo; then
 31 #    _arch=x86-64-modern

which causes my architecture to be correctly identified as x86-64. So there seems to be an issue with the test.

tjackson commented on 2020-03-29 06:09 (UTC)

Ah, my mistake. I wasn't sure. Thanks for the heads up.

bulletmark commented on 2020-03-28 21:11 (UTC) (edited on 2020-03-28 21:12 (UTC) by bulletmark)

@tjackson, note (e.g. for next time) there is no need or point bumping the pkgrel just because you add a new arch.

andmars commented on 2020-03-27 15:14 (UTC)

Hi, could add armv7h as well? I'm building a raspberry pi 4 to be my chesscomputer with SCID. (I simply added 'armv7h' to the PKGBUILD and it builts, install, and works just fine. Thank you.

tjackson commented on 2020-01-26 21:30 (UTC)

The build also supports Clang if someone wants/needs it. Just change COMP=gcc to COMP=clang, I believe.

tjackson commented on 2020-01-26 21:20 (UTC)

I fear I've done this horribly wrong but I added armv7 and bmi2 instructions. Feedback greatly welcome.

chengsun commented on 2019-04-28 08:27 (UTC)

Could you also enable BMI2 instructions for those processors that support it? This provides a couple % speedup (versus x86-64-modern).

    elif grep bmi2 /proc/cpuinfo 2>&1; then
        _arch=x86-64-bmi2

tage commented on 2018-12-18 10:47 (UTC) (edited on 2018-12-18 10:48 (UTC) by tage)

Can you please add the armv7 architecture. It is as easy as inserting the following lines after line 23 in the pkgbuild:

elif [[ "$CARCH" == "armv7h" ]]; then
    _arch=armv7

I have tested it on my rpi 3b+ and it works.

ozgursarier commented on 2018-06-06 09:43 (UTC)

@bulletmark: Thanks, i've changed it.

bulletmark commented on 2018-06-05 21:32 (UTC)

@ozgursarier, you updated this package but you dropped the epoch so it is actually flagged as a downgrade.

sczi commented on 2018-04-18 14:46 (UTC)

Here's a patch for stockfish 9 https://pastebin.com/46f9VniU

user6553591 commented on 2017-01-17 08:13 (UTC)

Apply this patch: "https://gist.github.com/user6553591/d2919ec2fa4d0786a23d35c4be339d0b" or one like it or I will submit a request for this package to become a orphan.

makiftasova commented on 2017-01-15 23:15 (UTC)

a patch which contains required changes for stockfish 8 can be found at https://gist.github.com/makiftasova/c305e38a47e3eaf1ab261b260695eb21

NoSuck commented on 2016-11-14 19:56 (UTC)

I noticed the other day that chess.com calls a JavaScript module named "stockfish" when analyzing games.

luscinius commented on 2016-11-11 23:22 (UTC)

Stockfish 8 is out. I have just downloaded and compiled it, builds fine.

Auguste commented on 2015-01-30 01:56 (UTC)

upstream has dropped opening book support. opening should be handled by the gui now.

Auguste commented on 2013-11-27 06:20 (UTC)

of course i have no objection. i secretly hope all aur packages i use can be moved to community someday. ;-)

xyproto commented on 2013-11-26 10:03 (UTC)

@Auguste Ok, thanks. I opened an issue here: https://github.com/mcostalba/Stockfish/issues/136 Would you mind if I moved this package to [community], btw?

Auguste commented on 2013-11-26 09:40 (UTC)

sorry, i don't know. it's on their website. and i assumed they have the same license.

xyproto commented on 2013-11-25 16:42 (UTC)

Hi. I'm considering making stockfish an official Arch Linux package, but I can not see which license the http://api.cld.me/3x333m0G173F/download/stockfish-231-book.zip file is under. Is it freely available?

commented on 2013-04-30 17:30 (UTC)

Stockfish 3 is now available.

Auguste commented on 2013-04-16 07:37 (UTC)

package is updated to use the new book. the profile build is taken out, so that it builds again.

commented on 2013-04-16 07:12 (UTC)

They have released the book version 2.3.1, and the code does not compile.

commented on 2012-01-09 23:27 (UTC)

The source link in the PKGBUILD no longer works and they've released version 2.2.1 now.

Auguste commented on 2012-01-04 10:15 (UTC)

this package is using profile guided build as an attempt to get better performance. if you don't like this, changing "profile-build" into "build" in PKGBUILD's certain "make" line will do.

commented on 2011-10-17 14:20 (UTC)

Package updated! Thanks joelsc for the patched PKGBUILD!

commented on 2011-10-17 05:06 (UTC)

Thanks for the patched PKGBUILD! As soon as I get home, I'll update the package.

joelsc commented on 2011-10-16 17:29 (UTC)

Here is a patched PKGBUILD: # Maintainer: P. Badredin <p dot badredin at gmail dot com> # Contributor: Justin Blanchard <UncombedCoconut at gmail dot com> pkgname=stockfish pkgver=2.1.1 _bookver=2.1.1 pkgrel=1 pkgdesc="A strong chess engine written by Tord Romstad, Marco Costalba, Joona Kiiski" arch=('i686' 'x86_64') url="http://www.stockfishchess.com/" license=('GPL3') makedepends=('unzip') install=stockfish.install source=("stockfish-$_bookver-book.zip::http://cl.ly/2R1L1Y0V0b1M3M1B1D26/sf-211-book.zip" "stockfish-$pkgver-linux.zip::http://cl.ly/231l1d1a292H1L3P1m3L/sf-211-linux-eng.zip" search-for-book-in-usr-share.patch) md5sums=('c41f7a3e30a141415591dba2355deccb' '5a6d0995edd21e8d5626d596717c8e00' '706b17e76636dd2a4dc99c65e66ca5c0') build() { cd "$srcdir" unzip -o "stockfish-$pkgver-linux.zip" || return 1 unzip -o "stockfish-$_bookver-book.zip" || return 1 install -D -m644 sf-211-book/Book.bin $pkgdir/usr/share/$pkgname/book.bin || return 1 cd "sf-211-linux-eng/src" # Change the default book path to a system-wide location patch -p1 < ../../search-for-book-in-usr-share.patch || return 1 if [ "$CARCH" = "i686" ]; then ARCH=x86-32 else ARCH=x86-64 fi make ARCH=$ARCH || return 1 install -D -m755 stockfish $pkgdir/usr/bin/stockfish }

johntramp commented on 2011-10-05 23:09 (UTC)

stockfish-2.1.1-book.zip and stockfish-2.1.1-linux.zip urls are dead

commented on 2011-05-28 09:08 (UTC)

Stockfish book, updated!

commented on 2011-05-09 17:47 (UTC)

New Stockfish engine, version 2.1.1-1 (maintenance release).

macxcool commented on 2011-05-09 17:29 (UTC)

I'm getting 302 and 404 errors when trying to install stockfish. It looks like the stockfish-2.1-linux.zip file has been moved or removed. Oh... stockfish is 2.1.1 now ;-) - sorry took me awhile to get past the cl.ly link.

commented on 2011-05-07 07:37 (UTC)

New Stockfish engine, version 2.1!

commented on 2011-01-23 20:56 (UTC)

New stockfish book, version 2.0.1!

commented on 2011-01-21 19:34 (UTC)

Thanks for the hint. It seems to work fine with scid. In the past Scid used to be no longer in development, and chessdb stepped into that gap. Since when it is the other way around?

commented on 2011-01-21 19:12 (UTC)

You're welcome! To use Stockfish, you need an interface which supports UCI protocol. I use Scid, a chess database program (from which chessdb derives I think) and you can find it here in AUR. Stockfish is just a chess engine, which receives string commands in it standard input. This commands are generally generated from the User Interface which supports the Universal Chess Interface(UCI). Try Scid and search the options about engines. If you have a problem, try it's documentation and you won't have difficulty figuring out what to do.

commented on 2011-01-21 13:15 (UTC)

Thank you Badredin. Sorry, seemed to be business as usual. 'makepkg' worked fine. Now I have another problem. How do I get stockfish to do anything? It does not communicate with eboard and chessdb. Do I have to set some parameters? Which? I also started 'stockfish' on the command line. Something starts, but nothing happens. The command 'stockfish bench' results in a cemetary of output. Also a file 'bench.txt' is generated.

commented on 2011-01-21 13:02 (UTC)

@Turelion Press the 'Files' link and you'll find it. Or, if you prefer, untar the tarball and you' find it there.

commented on 2011-01-20 12:09 (UTC)

Where can I find the file stockfish.install, which PKGBUILD is looking for?

commented on 2011-01-02 19:23 (UTC)

New Stockfish engine, version 2.0! The openings book is still version 1.9. I hope it works as expected! If not, please inform me, and I'll try to fix it.

commented on 2010-10-06 12:34 (UTC)

New Stockfish book, version 1.9! Package updated!

commented on 2010-10-03 10:02 (UTC)

New Stockfish engine, version 1.9! The openings book is still version 1.8. I hope it works as expected!If not, please inform me, and I'll try to fix it.

commented on 2010-10-03 09:16 (UTC)

New Stockfish engine, version 1.9! The openings book is still version 1.8. I hope it works as expected!If not, please inform me, and I'll try to fix it.

commented on 2010-09-29 10:44 (UTC)

Package updated.I hope it works! Please inform me if it doesn't, because when trying it the past 2 days, the links where temporarily down.

commented on 2010-09-25 23:01 (UTC)

Tomorrow, I will learn how maintaing packages in AUR works, and update PKGBUILD.

commented on 2010-09-25 20:36 (UTC)

I'm afraid I'll have to disown this package, as I have switched distros after my laptop crashed (literally... on the floor...) Best of luck, and thanks to anybody who can keep updating the URLs. :)

commented on 2010-09-25 19:13 (UTC)

Yes, they are broken. If you need the package to work, before it gets fixed, you can download the source code from http://www.stockfishchess.com/, and save it in the build directory. This worked for me.

listx commented on 2010-09-25 18:33 (UTC)

Download links are down/broken.

commented on 2010-06-25 20:30 (UTC)

Thanks for the update, Daphron. The download links are always a moving target.

Daphron commented on 2010-06-25 19:17 (UTC)

http://aur.pastebin.com/CVkVauGN Download links didn't seem to work in your PKGBUILD, this is my edited one.

commented on 2010-05-11 21:45 (UTC)

Yeah, I forgot to add a comment after updating the PKGBUILD. Thanks for reporting, Dr.Egg.

commented on 2010-05-11 15:07 (UTC)

worked for me today.

rwhite226 commented on 2010-05-08 18:20 (UTC)

link down again

commented on 2010-04-18 21:19 (UTC)

sorry, i don't know how to fix this download issue :( Fixed: compiled & installed. Thanks!

commented on 2010-04-18 20:41 (UTC)

Thanks for reporting. It's fixed for now, but I don't think the authors plan to keep the download URLs stable. Instead, http://www.stockfishchess.com/download/ja/ and http://www.stockfishchess.com/download/book/ will point to the correct download links. Any ideas how to make a PKGBUILD deal with that?

commented on 2010-04-18 20:02 (UTC)

Download Link doesn't work :(

commented on 2010-04-15 16:57 (UTC)

Version 1.7.1-2 patches a bug reported in http://www.talkchess.com/forum/viewtopic.php?t=33778 The bug causes Stockfish to see mate incorrectly in some situations. The patch is by Joona. Oh, and thanks for using the package. :)

commented on 2010-04-15 12:40 (UTC)

Thanks for updating :))