compiling heimdall-1.0 for old cpus failed

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

chessica
Posts: 819
Joined: Thu Aug 11, 2022 11:30 pm
Full name: Esmeralda Pinto

compiling heimdall-1.0 for old cpus failed

Post by chessica »

Can someone please help me to compile?


Code: Select all

C:\Users\Privat\Desktop\heimdall-1.0\heimdall>nimble install --verbose
     Info:  Nimble data file "C:\Users\Privat\.nimble\nimbledata2.json" has been loaded.
   Warning: Package 'heimdall' has an incorrect structure. It should contain a single directory hierarchy for source files, named 'heimdall', but file 'bitboards.nim' is in a directory named 'heimdallpkg' instead. This will be an error in the future.
      Hint: If 'heimdallpkg' contains source files for building 'heimdall', rename it to 'heimdall'. Otherwise, prevent its installation by adding `skipDirs = @["heimdallpkg"]` to the .nimble file.
  Verifying dependencies for heimdall@1.0.0
    Reading official package list
   Checking for jsony@>= 1.1.5
     Info:  Dependency on jsony@>= 1.1.5 already satisfied
  Verifying dependencies for jsony@1.1.5
    Reading official package list
   Checking for nint128@>= 0.3.3
     Info:  Dependency on nint128@>= 0.3.3 already satisfied
  Verifying dependencies for nint128@0.3.3
    Reading official package list
   Checking for struct@>= 0.2.3
     Info:  Dependency on struct@>= 0.2.3 already satisfied
  Verifying dependencies for struct@0.2.3
    Reading official package list
   Checking for https://github.com/demotomohiro/pathX@>= 0.1
     Info:  Dependency on https://github.com/demotomohiro/pathX@>= 0.1 already satisfied
  Verifying dependencies for pathX@0.1.0
    Reading official package list
   Checking for struct@>= 0.2.3
     Info:  Dependency on struct@>= 0.2.3 already satisfied
  Verifying dependencies for struct@0.2.3
 Installing heimdall@1.0.0
   Building heimdall/heimdall.exe using c backend
  Executing C:\Users\Privat\.nimble\bin\nim.exe c --colors:on --noNimblePath -d:release -d:NimblePkgVersion=1.0.0 --path:C:\Users\Privat\.nimble\pkgs2\nint128-0.3.3-4ccc6757d0dc21df95ee16fab7115dbb6c8ed80e --path:C:\Users\Privat\.nimble\pkgs2\struct-0.2.3-b2f9491aeed1bdbf6da2d32dae91d65dc1469d76 --path:C:\Users\Privat\.nimble\pkgs2\jsony-1.1.5-6aeb83e7481ca8686396a568096054bc668294df --path:C:\Users\Privat\.nimble\pkgs2\pathX-0.1.0-03dc0856bdb2b57d97d46ba069148a7e84e9f6dd -o:C:\Users\Privat\Desktop\heimdall-1.0\heimdall\bin\heimdall.exe C:\Users\Privat\Desktop\heimdall-1.0\heimdall\heimdall\heimdall.nim
Hint: used config file 'C:\Users\Privat\.choosenim\toolchains\nim-2.0.8\config\nim.cfg' [Conf]
Hint: used config file 'C:\Users\Privat\.choosenim\toolchains\nim-2.0.8\config\config.nims' [Conf]
Hint: used config file 'C:\Users\Privat\Desktop\heimdall-1.0\heimdall\nim.cfg' [Conf]
........................................................................................................................................................
C:\Users\Privat\Desktop\heimdall-1.0\heimdall\heimdall\heimdallpkg\magics.nim(354, 9) Hint: 'BuildOSAbsoDire' is declared but not used [XDeclaredButNotUsed]
..................
C:\Users\Privat\Desktop\heimdall-1.0\heimdall\heimdall\heimdallpkg\util\limits.nim(84, 57) Error: type mismatch: got 'int64' for 'remainingTime' but expected 'int literal(500)'
nimble.nim(304)          buildFromDir
Error: Build failed for the package: heimdall
Info: Nimble data file "C:\Users\Privat\.nimble\nimbledata2.json" has been saved.

C:\Users\Privat\Desktop\heimdall-1.0\heimdall>
nocturn9x
Posts: 6
Joined: Mon Aug 05, 2024 1:28 pm
Full name: Mattia Giambirtone

Re: compiling heimdall-1.0 for old cpus failed

Post by nocturn9x »

Hello there, heimdall author here :)

Can you please post the output of `nim -v`?
Also, if you installed Nim using choosenim, can you try switching to version 2.0.4 by running `choosenim 2.0.4` and `nimble build` again?
chessica
Posts: 819
Joined: Thu Aug 11, 2022 11:30 pm
Full name: Esmeralda Pinto

Re: compiling heimdall-1.0 for old cpus failed

Post by chessica »

ok

Microsoft Windows [Version 10.0.19045.4894]
(c) Microsoft Corporation. Alle Rechte vorbehalten.

C:\Users\Privat>nim -v
Nim Compiler Version 2.0.8 [Windows: i386]
Compiled at 2024-07-03
Copyright (c) 2006-2023 by Andreas Rumpf

active boot switches: -d:release

C:\Users\Privat>


C:\Users\Privat>choosenim 2.0.4
Downloading C compiler (Mingw64)
SIGILL: Illegal operation.

C:\Users\Privat>
chessica
Posts: 819
Joined: Thu Aug 11, 2022 11:30 pm
Full name: Esmeralda Pinto

Re: compiling heimdall-1.0 for old cpus failed

Post by chessica »

~ $ choosenim 2.0.4
Info: C:\Users\Privat\.choosenim\downloads\dlls.zip already downloaded
Extracting dlls.zip
Info: Copied 'cacert.pem' to 'C:\Users\Privat\.nimble\bin'
Info: Copied 'libcrypto-1_1-x64.dll' to 'C:\Users\Privat\.nimble\bin'
Info: Copied 'libcrypto-1_1.dll' to 'C:\Users\Privat\.nimble\bin'
Info: Copied 'libcurl.dll' to 'C:\Users\Privat\.nimble\bin'
Info: Copied 'libssl-1_1-x64.dll' to 'C:\Users\Privat\.nimble\bin'
Info: Copied 'libssl-1_1.dll' to 'C:\Users\Privat\.nimble\bin'
Info: Copied 'pcre.dll' to 'C:\Users\Privat\.nimble\bin'
Info: Copied 'pcre32.dll' to 'C:\Users\Privat\.nimble\bin'
Info: Copied 'pcre64.dll' to 'C:\Users\Privat\.nimble\bin'
Info: Copied 'pdcurses.dll' to 'C:\Users\Privat\.nimble\bin'
Info: Copied 'pdcurses32.dll' to 'C:\Users\Privat\.nimble\bin'
Info: Copied 'pdcurses64.dll' to 'C:\Users\Privat\.nimble\bin'
Info: Copied 'sqlite3_32.dll' to 'C:\Users\Privat\.nimble\bin'
Info: Copied 'sqlite3_64.dll' to 'C:\Users\Privat\.nimble\bin'
Downloading Nim 2.0.4 from nim-lang.org
SIGILL: Illegal operation.
~ $
nocturn9x
Posts: 6
Joined: Mon Aug 05, 2024 1:28 pm
Full name: Mattia Giambirtone

Re: compiling heimdall-1.0 for old cpus failed

Post by nocturn9x »

Hmm, that is very weird indeed. Never faced this before! What CPU are you trying to compile Heimdall on?
User avatar
Guenther
Posts: 4689
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: compiling heimdall-1.0 for old cpus failed

Post by Guenther »

nocturn9x wrote: Thu Sep 26, 2024 1:27 pm Hmm, that is very weird indeed. Never faced this before! What CPU are you trying to compile Heimdall on?
forum3/viewtopic.php?p=968559#p968559
https://www.techpowerup.com/cpu-specs/a ... 4-630.c784

:)
https://rwbc-chess.de

Talkchess nowadays is a joke - it is full of trolls/idiots/wafflers/clone lovers/people stuck in the pleistocene > 70% of the posts fall into this category...
nocturn9x
Posts: 6
Joined: Mon Aug 05, 2024 1:28 pm
Full name: Mattia Giambirtone

Re: compiling heimdall-1.0 for old cpus failed

Post by nocturn9x »

Hmm, that is rather ancient... I don't think I can reproduce your issues. Heimdall requires a fairly modern CPU to work properly :cry:
chessica
Posts: 819
Joined: Thu Aug 11, 2022 11:30 pm
Full name: Esmeralda Pinto

Re: compiling heimdall-1.0 for old cpus failed

Post by chessica »

nocturn9x wrote: Thu Sep 26, 2024 2:11 pm Hmm, that is rather ancient... I don't think I can reproduce your issues. Heimdall requires a fairly modern CPU to work properly :cry:
I had already suspected it, but didn't find any information in the readme about which targets were supported. You can use the compiler to simulate the corresponding instruction sets and then it works. But I don't know anything about nim.

The strongest engine Stockfish, for example, can also be used very well on the oldest PCs (32 bit). This works wonderfully.
nocturn9x
Posts: 6
Joined: Mon Aug 05, 2024 1:28 pm
Full name: Mattia Giambirtone

Re: compiling heimdall-1.0 for old cpus failed

Post by nocturn9x »

You should be able to pass any options you want to the underlying C compiler (Heimdall uses clang) by adding them to the `--passC` option in the nim.cfg file (likewise, `--passL` contains linker options)
chessica
Posts: 819
Joined: Thu Aug 11, 2022 11:30 pm
Full name: Esmeralda Pinto

Re: compiling heimdall-1.0 for old cpus failed

Post by chessica »

nocturn9x wrote: Thu Sep 26, 2024 6:20 pm You should be able to pass any options you want to the underlying C compiler (Heimdall uses clang) by adding them to the `--passC` option in the nim.cfg file (likewise, `--passL` contains linker options)
Now it works fine... :-)

The reason was the old compiler with help from Jim :-) version, I changed it to:

C:\Users\Privat>nim --version
Nim Compiler Version 2.1.99 [Windows: amd64]
Compiled at 2024-09-24
Copyright (c) 2006-2024 by Andreas Rumpf

active boot switches: -d:release

C:\Users\Privat>

[d]5k2/pp3N2/5K2/5B2/8/8/8/8 w - - 0 1

Heimdall 1.0.0-beta:

Code: Select all

 8/15	00:00,025	 11k	446k	+0,68	Lf5-e6 a7-a5 Kf6-e5 Kf8-e7 Sf7-h6 b7-b5 Le6-b3 b5-b4
 9/14	00:00,062	 27k	439k	+0,71	Sf7-e5 Kf8-e8 Se5-d7 a7-a5 Kf6-e6 b7-b5 Ke6-d6 Ke8-f7 Lf5-e6+ Kf7-g7 Kd6-e5
 10/17	00:00,104	 46k	444k	+0,77	Sf7-e5 Kf8-e8 Se5-d7 b7-b5 Kf6-e5 Ke8-e7 Ke5-d4 b5-b4 Kd4-c4 b4-b3 Kc4-c3 a7-a5
 11/19	00:00,188	 87k	464k	+0,85	Sf7-e5 Kf8-e8 Kf6-e6 a7-a5 Lf5-g6+ Ke8-d8 Ke6-d6 b7-b5 Se5-c6+ Kd8-c8 Lg6-f7 Kc8-b7 Sc6xa5+ Kb7-a8 Sa5-c6
 12/23	00:00,278	 132k	474k	+1,01	Sf7-e5 Kf8-e8 Kf6-e6 a7-a5 Lf5-g6+ Ke8-d8 Ke6-d6 b7-b5 Se5-c6+ Kd8-c8 Sc6xa5 b5-b4 Lg6-f7 Kc8-d8 Sa5-c6+ Kd8-c8 Lf7-b3 Kc8-b7 Lb3-a4
 13/29	00:00,438	 214k	487k	+0,94	Sf7-e5 Kf8-e8 Kf6-e6 Ke8-f8 Ke6-d6 b7-b5 Kd6-c7 b5-b4 Kc7-b8 Kf8-e7 Kb8-a8 Ke7-f6 Se5-c6 Kf6xf5
 14/20	00:00,689	 338k	490k	+1,12	Sf7-d6 a7-a5 Lf5-e6 a5-a4 Sd6-b5 Kf8-e8 Kf6-g7 a4-a3 Le6-c4 Ke8-e7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