Hot Topic (More than 10 Replies) Chess problem solving softwares like Popeye (Read 384 times)
an ordinary chessplayer
God Member
*****
Offline


I used to be not bad.

Posts: 1819
Location: Columbus, OH (USA)
Joined: 01/02/15
Re: Chess problem solving softwares like Popeye
Reply #10 - Today at 16:38:05
Post Tools
Marc Benford wrote Today at 00:37:29:
DELETED
gcc: error: unrecognized command line option '-r`-`uname -p`"'
makefile.local:60: recipe for target 'gengmarr.o' failed
mingw32-make[1]: *** [gengmarr.o] Error 1

Okay when you see error output from make, you should tackle the first one first, because if the first error is causing the second error, then removing the first error fixes both, and the corollary is, until you remove the first error, you will never get rid of the second one.

There may have been some errors in DELETED, I can't tell. But for the sake of the process let's assume the unrecognized command line option is the first error. Here is how you would go about fixing it.

The first place to look is line 60 in makefile.local , but that wasn't too helpful.

The second thing to look for is the string in the unrecognized command line option. Searching makefile.defaults for uname I found lines 143-147, which corrected for all-caps read:
Code
Select All
ostarget=`uname`
osvertarget=`uname -r`
oscputarget="`uname -p`"

OSTYPE=$(ostarget)-$(osvertarget)-$(oscputarget) 


When I run those same three commands on my Linux box I get:
    $ uname
    Linux
    $ uname -r
    6.5.0-1mx-ahs-amd64
    $ uname -p
    unknown
    $
 

The backticks are a unixy way of saying `insert the result of this command`, but it's not working on Windows. Instead of the _result_ of the uname commands, you are getting the commands themselves, and your OSTYPE is getting the string "uname-uname -r-uname -p". There are various ways you can fix this, but the absolute simplest is to just hard-code the result string in the makefile. For example change line 147 to:
Code
Select All
OSTYPE="Microsoft_Windows-Version11-with_MinGW" 


Or whatever you want it to say, I don't think it matters. If you are fussy you can use the result of the Windows ver command. I recommend against any spaces or "special" characters like brackets in the string though.

If that fixes the error on makefile.local:60 , you can move on to the next one.
  
Back to top
 
IP Logged
 
an ordinary chessplayer
God Member
*****
Offline


I used to be not bad.

Posts: 1819
Location: Columbus, OH (USA)
Joined: 01/02/15
Re: Chess problem solving softwares like Popeye
Reply #9 - Today at 15:52:18
Post Tools
Marc Benford wrote Today at 00:22:24:
It's like reading Chinese. It's hopeless.

Documentation that assumes you already know all the lingo. But not hopeless, because you can make a decent guess and get detailed error messages from make about what went wrong. When there are no more error messages, you will have a working Popeye.

Marc Benford wrote Today at 00:22:24:
The line with the word "SHARING" is line 63.
How exactly do I "uncomment" it?

You would uncomment exactly the way you tried, by removing the leading #. Bad it was a bad instruction on my part. What you want to do is go to line 105 which begins DEFS= and at the end of that line add a space followed by (translate the following to all-caps)  $(definemacro)sharing

Marc Benford wrote Today at 00:22:24:
What even is a "separator"?

For a Makefile, the separator is the TAB character, which takes some getting used to. make saw 8 spaces and asked if you meant TAB instead. Don't worry about it on line 63 because you don't want either one, you want to edit line 105.
  
Back to top
 
IP Logged
 
Marc Benford
Full Member
***
Offline


I Love ChessPublishing!

Posts: 109
Joined: 07/17/13
Re: Chess problem solving softwares like Popeye
Reply #8 - Today at 00:37:29
Post Tools
So I put the # character back, and then when I type "mingw32-make -f makefile.unx", it gives me the following large error message:

makefile.unx:342: target 'output/latex/nesteddepend' given more than once in the same rule.
mingw32-make currpwd=./ -f ./makefile.local pymain.o
mingw32-make[1]: Entering directory 'C:/Users/Name/Desktop/popeye-develop/popeye-develop'
gcc -W -Wall -Wextra -Wpedantic -pedantic-errors -Walloc-zero 
DELETED
gcc: error: unrecognized command line option '-r`-`uname -p`"'
makefile.local:60: recipe for target 'gengmarr.o' failed
mingw32-make[1]: *** [gengmarr.o] Error 1
mingw32-make[1]: Leaving directory 'C:/Users/Name/Desktop/popeye-develop/popeye-develop'
makefile.unx:350: recipe for target 'pymain.o' failed
mingw32-make: *** [pymain.o] Error 2

I had to cut half of the error message, because Chesspub.com keeps saying "It appears that you are trying to write using ALL CAPS - Please be aware this is against forum rules." If the spam detection software is too permissive, then the forum will be flooded with spam. But if it is not permissive enough, then it will sometimes prevent members from posting real messages. It's a dilemma.
  
Back to top
 
IP Logged
 
Marc Benford
Full Member
***
Offline


I Love ChessPublishing!

Posts: 109
Joined: 07/17/13
Re: Chess problem solving softwares like Popeye
Reply #7 - Today at 00:22:24
Post Tools
Quote:
But Popeye doen't have that file, instead it has a few makefile.* . Read all of them to see what options you might need for Windows.

I read them, but I didn't understand them. It's like reading Chinese. It's hopeless.



Quote:
Then try make with the option `-f makefile.unx`

Step 1: Open the command prompt.

Step 2: I must either type "cd C:\Users\Name\Desktop\popeye-develop" or "cd C:\Users\Name\Desktop\popeye-develop\popeye-develop". I already don't know which one of these two things I must type. Because, after I downloaded Popeye from GitHub, I now have a file (maybe "file" is not the right name, maybe it's called a "folder" instead, I don't know) called "popeye-develop" on my computer, and inside this file there's only one file and it's also called "popeye-develop", and inside this file are all the very many files. So when I want to try something, I first type "cd C:\Users\Name\Desktop\popeye-develop" and then I try the thing, and if it doesn't work then I type "cd C:\Users\Name\Desktop\popeye-develop\popeye-develop" and then I try the thing again to see if it works this time...

Step 3: And so on step 3, you want me to then type "make -f makefile.unx"? Is that right? It gives me the following error:
'make' is not recognized as an internal or external command, operable program or batch file.
Perhaps I should instead type "mingw32-make -f makefile.unx"? This seems to give slightly better results, but it still doesn't work.



Quote:
in makefile.defaults there is a line with SHARING you will probably want to uncomment.

The line with the word "SHARING" is line 63.
How exactly do I "uncomment" it?
I tried removing the #, but then the command prompt gave me the following error message when I tried make:
makefile.defaults:63: *** missing separator (did you mean TAB instead of 8 spaces?).  Stop.
So I removed all of the whitespace characters, but then the command prompt gave me the following error message when I tried make:
makefile.defaults:63: *** missing separator.    Stop.
What even is a "separator"?
  
Back to top
 
IP Logged
 
an ordinary chessplayer
God Member
*****
Offline


I used to be not bad.

Posts: 1819
Location: Columbus, OH (USA)
Joined: 01/02/15
Re: Chess problem solving softwares like Popeye
Reply #6 - yesterday at 17:03:10
Post Tools
It's been a long time since I compiled with gcc on Windows. Back then mingw didn't even exist, and I didn't use cygwin either, so let's just skip over my "experience".

It looks like you installed mingw correctly, but the internet examples for how to use it show how to compile a single-file .c into .exe .

Popeye is much more complex than that, and to manage all the options and dependencies there is the command make . By default make gets its options from Makefile. But Popeye doen't have that file, instead it has a few makefile.* .

Read all of them to see what options you might need for Windows. For example in makefile.defaults there is a line with SHARING you will probably want to uncomment. Then try make with the option `-f makefile.unx`

https://stackoverflow.com/questions/12881854/how-to-use-gnu-make-on-windows
  
Back to top
 
IP Logged
 
Marc Benford
Full Member
***
Offline


I Love ChessPublishing!

Posts: 109
Joined: 07/17/13
Re: Chess problem solving softwares like Popeye
Reply #5 - 07/16/26 at 17:12:56
Post Tools
Okay, so I downloaded all the Popeye files and I edited them to add a new piece. This is done. What now? I think this is the part where I need to compile the Popeye files, after which I will obtain a .exe file. I have never compiled anything in my life, so I need some help on that. I don't even know what "compiling" even means, but apparently this is what I must do.

I installed the following three things on my computer:
- MinGW (GCC for Windows) (I needed to watch a Youtube tutorial to figure out how to install this one)
- Git
- Node

In the command prompt, I type "cd C:\Users\Name\Desktop\popeye-develop" to navigate to the location of the Popeye files. Then, I type "gcc popeye-develop" to compile the Popeye files, but it just gives me the following error message:
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find popeye-develop: Permission denied
collect2.exe: error: ld returned 1 exit status
  
Back to top
 
IP Logged
 
an ordinary chessplayer
God Member
*****
Offline


I used to be not bad.

Posts: 1819
Location: Columbus, OH (USA)
Joined: 01/02/15
Re: Chess problem solving softwares like Popeye
Reply #4 - 07/14/26 at 22:14:48
Post Tools
https://github.com/thomas-maeder/popeye

Popeye is designed to accomodate arbitrary pieces! The most recent was Scarabeus, added last year. There are 162 different pieces in pieces.h, plus Empty, Invalid, and Hunter0; I think the last one is a semaphore.

I would not overwrite an existing piece with new movements, but rather use the existing piece as a template, add code in all the appropriate modules, and then modify the copied code. Very little C knowledge is required because you are not programming from scratch. The hard part is making sure you touch all the necessary modules. Maybe the developer/maintainer would work with you on that part. In return you could offer to write up a document "How to add a new piece to Popeye". For writing such a document, which you would want anyway when it is time to add your second piece,  not knowing C might be an advantage -- you would write very detailed notes which could then be followed by all fairy enthusiasts who might also not know C.

Another approach for finding all the needed places would be to do a diff on the commit that added Scarabeus. Some git skills required for that step.
  
Back to top
 
IP Logged
 
Dink Heckler
God Member
*****
Offline


Love-Forty

Posts: 901
Joined: 02/01/07
Gender: Male
Re: Chess problem solving softwares like Popeye
Reply #3 - 07/14/26 at 12:54:46
Post Tools
Unironically sounds like a job for vibe coding.
  

'Am I any good at tactics?'
'Computer says No!'
Back to top
 
IP Logged
 
Marc Benford
Full Member
***
Offline


I Love ChessPublishing!

Posts: 109
Joined: 07/17/13
Re: Chess problem solving softwares like Popeye
Reply #2 - 07/14/26 at 08:11:42
Post Tools
Thank you. Your answer is helpful.

Yes, I could perhaps change the code that defines how a piece move. This is a good idea. For example, if I want a (2,6)-leaper (I don't, but this is just a made up example), I could find the line of code that defines the move of say the (1,2)-leaper, also known as the knight, and change the numbers (1,2) into (2,6). Then when I will use the letter S (which strangely is the symbol of the knight in Popeye), it won't be a knight but a (2,6)-leaper.

But this will be difficult, because I have never done anything like that, and because I don't know the C programming language. How do I even see Popeye's C code? Where do I find "board.h" and "board.c"? The only Popeye file I see on my computer is called "pywin64.exe": when I click on it, this launches Popeye.

I don't think that XBoard and the FairyMax engine are what I am looking for. I don't want a graphical user interface chessboard. I don't want a general purpose engine. I want a chess problem solving software like Popeye that just blindly calculates every possible line until checkmate.
« Last Edit: 07/14/26 at 16:37:40 by Marc Benford »  
Back to top
 
IP Logged
 
an ordinary chessplayer
God Member
*****
Offline


I used to be not bad.

Posts: 1819
Location: Columbus, OH (USA)
Joined: 01/02/15
Re: Chess problem solving softwares like Popeye
Reply #1 - 07/13/26 at 00:30:11
Post Tools
If you are looking to define a new piece via the GUI, that would be a heavy lift. I sincerely doubt anybody has made that possible. In Popeye you could (in principle) add a new piece in the c code. Instead I suggest you check out the FairyMax engine, which uses a file fmax.ini to define the variants and the piece movements. It's still complicated, but if your piece combinations are simple you might be able to figure it out. For example look at the Queen, look at the Knight, look at the Amazon, and see in what way the Queen and Knight were combined there. Then try the same thing with your desired piece combination.

For resizing the board, both Xboard(Winboard) and Popeye can do it. In Xboard you can change the size of the board _larger_ on the fly by providing a larger FEN. But if you try to make it smaller with the same trick then it will complain. There are command-line options as well which you can read up on. With Popeye you can change the size of the board by editing board.h and compiling. In board.c the defined files go from a to z, so it should probably handle up to a 26x26 board this way.
 
Lines in board.h to change:
Code
Select All
  nr_files_on_board = 8,
  nr_rows_on_board = 8, 

  
Back to top
 
IP Logged
 
Marc Benford
Full Member
***
Offline


I Love ChessPublishing!

Posts: 109
Joined: 07/17/13
Chess problem solving softwares like Popeye
07/11/26 at 21:27:15
Post Tools
I am looking for chess problem solving softwares that handle fairy pieces, like Popeye. Except that I want a software where I can create my own fairy pieces, and I want a software where I can change the size of the board. The first thing is much more important to me than the second. I don't necessarily need one software that does both of these things. I can also go with one software that does the first thing and a different software that does the second thing, that would be perfectly fine.

As far as I know, I can't do any of these two things on Popeye. Popeye has a list of about 130 fairy pieces. If the piece I want is not in the list, then I can't use that piece.

I don't need to create complicated pieces, like asymmetrical pieces or pieces that don't move the same way they capture. I just need to combine two simple pieces.
  
Back to top
 
IP Logged
 
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo