Page Index Toggle Pages: [1] 2 
Topic Tools
Hot Topic (More than 10 Replies) Chess problem solving softwares like Popeye (Read 842 times)
Marc Benford
Full Member
***
Offline


I Love ChessPublishing!

Posts: 113
Joined: 07/17/13
Re: Chess problem solving softwares like Popeye
Reply #18 - Today at 19:33:39
Post Tools
When I type
Code
Select All
gcc -o gengmarr  -O3 -flto   gengmarr.o position/position-host.o position/board-host.o 


in the command prompt immediately after opening it, I get the following error message:
Code
Select All
gcc: error: gengmarr.o: No such file or directory
gcc: error: position/position-host.o: No such file or directory
gcc: error: position/board-host.o: No such file or directory
gcc: fatal error: no input files
compilation terminated. 



.

When I first type
Code
Select All
cd C:\Users\Name\Desktop\popeye-develop\popeye-develop 


and then I type
Code
Select All
gcc -o gengmarr  -O3 -flto   gengmarr.o position/position-host.o position/board-host.o 


it doesn't do anything, the command prompt doesn't return any message at all.

.

In the popeye-develop folder, I see a file called pygmarr.c, and I see three gengmarr files:
- gengmarr.c
- gengmarr.exe
- gengmarr.o

.

Quote:
Try running gengmarr from the command prompt, without redirection, and you should get back some C code in the command prompt.
Simply
    ./gengmarr


I'm not sure what to do there.

When I type
Code
Select All
./gengmarr 


in the command prompt, I get the following error message:
Code
Select All
'.' is not recognized as an internal or external command,
operable program or batch file. 



.

I also tried to write the following three lines in the command prompt:
Code
Select All
cd C:\Users\Name\Desktop\popeye-develop\popeye-develop\gengmarr.c 


Code
Select All
cd C:\Users\Name\Desktop\popeye-develop\popeye-develop\gengmarr.exe 


Code
Select All
cd C:\Users\Name\Desktop\popeye-develop\popeye-develop\gengmarr.o 


But in all three cases, it gives me the following error message:
Code
Select All
The directory name is invalid. 



.

I then added
Code
Select All
echo "1$(eXeCuTe)1" 


and when I tried make again, it gave me the exact same error message as before, except that right before the line
Code
Select All
./gengmarr > pygmarr.c 


it now says
Code
Select All
echo "11"
"11" 


So it seems that $(eXeCuTe) doesn't have the right value.
  
Back to top
 
IP Logged
 
an ordinary chessplayer
God Member
*****
Offline


I used to be not bad.

Posts: 1823
Location: Columbus, OH (USA)
Joined: 01/02/15
Re: Chess problem solving softwares like Popeye
Reply #17 - Today at 16:13:39
Post Tools
I don't think it was a stupid mistake to try the "#" comment on the same line. Lots of programming languages have a "rest of line" comment like that, but as you found out, make does not.

Marc Benford wrote Today at 09:20:22:

Code
Select All
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 -o gengmarr  -O3 -flto   gengmarr.o position/position-host.o position/board-host.o
./gengmarr > pygmarr.c
'.' is not recognized as an internal or external command,
operable program or batch file.
makefile.local:68: recipe for target 'pygmarr.c' failed
mingw32-make[1]: *** [pygmarr.c] 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 



This one seems to have worked. If you look for a file "gengmarr" it should be there and it should be executable.
Code
Select All
gcc -o gengmarr  -O3 -flto   gengmarr.o position/position-host.o position/board-host.o 


Try running gengmarr from the command prompt, without redirection, and you should get back some C code in the command prompt.
Simply
    ./gengmarr
If gengmarr is not there, or if the command doesn't return some proper C code, then we need to fix that. Otherwise we move on.

This one did not work. You may or may not have a file "pygmarr.c", but even if it exists, it is not the pygmarr.c you are looking for.
Code
Select All
./gengmarr > pygmarr.c 



Marc Benford wrote Today at 09:20:22:
makefile.local (lines 67-68)
Code
Select All
pygmarr.c: ./gengmarr$(eXe_sUfFiX)
	$(eXeCuTe) ./gengmarr$(eXe_sUfFiX) > $@ 


Usually on Windows the value of $(eXe_sUfFiX) would be ".exe". It seems under MinGW it is the more unixy "". What is the value of $(eXeCuTe) ? If it is not "" then it might be the problem. You can add a line to your recipe to show that value. 
Code
Select All
pygmarr.c: ./gengmarr$(eXe_sUfFiX)
	echo "1$(eXeCuTe)1"
	$(eXeCuTe) ./gengmarr$(eXe_sUfFiX) > $@ 


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


I Love ChessPublishing!

Posts: 113
Joined: 07/17/13
Re: Chess problem solving softwares like Popeye
Reply #16 - Today at 09:20:22
Post Tools
Quote:
You should check your local copy of makefile.unx, but I strongly doubt it's any different on line 342.


They are exactly the same. Not a single character is different.

.

I made a stupid mistake. Instead of exactly following your instructions and replacing line 147 of makefile.defaults with
Code
Select All
OsTyPe="Microsoft_Windows-Version11-with_MinGW" 


I replaced it with
Code
Select All
OsTyPe="Microsoft_Windows-Version11-with_MinGW"
#OsTyPe=$(OsTaRgEt)-$(OsVeRtArGeT)-$(OsCpUtArGeT) 


(I split the above line into two lines because it doesn't display correctly on chesspub.com)

The thing after the # sign is the original version of line 147. I thought that adding a # sign would mean that what's at the right of the # sign is just a comment and that the computer would ignore it. But apparently I was wrong. Because I tried to remove the thing at the right of the # sign, and then I tried make again, and now I get the following error message:

Code
Select All
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 -o gengmarr  -O3 -flto   gengmarr.o position/position-host.o position/board-host.o
./gengmarr > pygmarr.c
'.' is not recognized as an internal or external command,
operable program or batch file.
makefile.local:68: recipe for target 'pygmarr.c' failed
mingw32-make[1]: *** [pygmarr.c] 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 



It's a clear improvement over the previous error message.

The beginning and the end are the same as the previous error message. But the half in the middle (between "Entering directory" and "Leaving directory") is completely different and much smaller.

Then, I tried to remove the quotes, but this didn't make any difference at all. The error message remains identical.

makefile.local (lines 67-68)
Code
Select All
pygmarr.c: ./gengmarr$(eXe_sUfFiX)
	$(eXeCuTe) ./gengmarr$(eXe_sUfFiX) > $@ 

  
Back to top
 
IP Logged
 
an ordinary chessplayer
God Member
*****
Offline


I used to be not bad.

Posts: 1823
Location: Columbus, OH (USA)
Joined: 01/02/15
Re: Chess problem solving softwares like Popeye
Reply #15 - Today at 04:00:42
Post Tools
LLM is not required for iterating through make errors. It should be obvious we are getting closer.

Changing all-CAPS to alternating-CaPs. These stand out more as needing replacement back.

Marc Benford wrote on 07/23/26 at 13:08:23:

Code
Select All
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 -Warray-bounds=2 -Wcast-align -Wconversion -Wbad-function-cast -Wno-cast-qual -Wduplicated-cond -Wfloat-equal -Wformat=2 -Wformat-signedness -Wno-format-nonliteral -Wno-format-signedness -Winvalid-pch -Wlogical-op -Wmissing-declarations -Wredundant-decls -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wshift-negative-value -Wshift-overflow=2 -Wswitch -Wswitch-default -Wsync-nand -Wundef -Wunknown-pragmas -Wno-unused-parameter -Winit-self -Wwrite-strings -Wjump-misses-init   -O3 -flto  -dsignals -dmsg_in_mem -dfxf -dndebug -dfxf_max_alignment_type=void* -dfxf_not_multiple_alignment_type=short -dsharing  -std=c99  -I. -dostype=\""Microsoft_Windows-Version11-with_MinGW"\" -dversion=4.101 -c -dauxiliary position/board.c -o position/board-host.o
0 was unexpected at this time.
makefile.local:52: recipe for target 'position/board-host.o' failed
mingw32-make[1]: *** [position/board-host.o] Error 255
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 




About the first warning from make "target 'output/latex/nesteddepend' given more than once"

makefile.unx (lines 339-344)
Code
Select All
ifdef DePeNd
depend: $(NeStEdLiBdIrS:%=%/nesteddepend)

$(NeStEdLiBdIrS:%=%/nesteddepend): FoRcE
	$(MAKE) CuRrPwD=$(dir $@) -f $(dir $@)makefile.local depend
endif 


  • line 340 - file "depend" depends (sic) on the non-existing file "output/latex/nesteddepend"
  • line 340 does not have a "recipe", not even an empty one, so make should override any existing rule for "depend"
  • line 342 - file "output/latex/nesteddepend" has a _phony_ dependency, so the rule should run every time
    https://www.gnu.org/software/make/manual/html_node/Force-Targets.html
  • line 343 - is the recipe to build "depend" , _not_ "output/latex/nesteddepend". I'm not sure if it's correct code. I would have done it differently but make rules are pretty obscure and this might work for reasons unknown to me.

The head-scratcher though is why make thinks the target is "given more than once", because it's not. You should check your local copy of makefile.unx, but I strongly doubt it's any different on line 342.

Here I'm going to suggest you skip over this one for now. It breaks the suggestion I gave some days ago, which was to fix the 1st error before trying to fix the 2nd error. But since the warning is coming from make and not from gcc, you might be able to get away with it.

About the second error from gcc "0 was unexpected at this time"

99 percent sure that is a parse error. As an educated guess this is due to the different ways Windows and unix handle commandline quotes. Earlier I suggested you change makefile.defaults (line 147), and following my example you used
Code
Select All
OsTyPe="Microsoft_Windows-Version11-with_MinGW" 


Now I suggest you remove the quotes.
Code
Select All
OsTyPe=Microsoft_Windows-Version11-with_MinGW 


Then try make again.
  
Back to top
 
IP Logged
 
Dink Heckler
God Member
*****
Offline


Love-Forty

Posts: 902
Joined: 02/01/07
Gender: Male
Re: Chess problem solving softwares like Popeye
Reply #14 - yesterday at 07:32:17
Post Tools
I seriously encourage you to work through this with an LLM. Copy-paste all this into eg Claude and it will help you diagnose and fix the errors. Will it get it right first time - probably not, but it will iterate you towards a solution; these tools are really good for this sort of thing.
« Last Edit: yesterday at 12:46:10 by Dink Heckler »  

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


I Love ChessPublishing!

Posts: 113
Joined: 07/17/13
Re: Chess problem solving softwares like Popeye
Reply #13 - 07/23/26 at 13:08:23
Post Tools
Okay, I went with the simpler option (2) as you recommended, and I did not forget to put the word toolchain in uppercase, and here is the error message that I get now (again, I transformed many uppercase letters into lowercase letters):

Code
Select All
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 -Warray-bounds=2 -Wcast-align -Wconversion -Wbad-function-cast -Wno-cast-qual -Wduplicated-cond -Wfloat-equal -Wformat=2 -Wformat-signedness -Wno-format-nonliteral -Wno-format-signedness -Winvalid-pch -Wlogical-op -Wmissing-declarations -Wredundant-decls -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wshift-negative-value -Wshift-overflow=2 -Wswitch -Wswitch-default -Wsync-nand -Wundef -Wunknown-pragmas -Wno-unused-parameter -Winit-self -Wwrite-strings -Wjump-misses-init   -O3 -flto  -dsignals -dmsg_in_mem -dfxf -dndebug -dfxf_max_alignment_type=void* -dfxf_not_multiple_alignment_type=short -dsharing  -std=c99  -I. -dostype=\""Microsoft_Windows-Version11-with_MinGW"\" -dversion=4.101 -c -dauxiliary position/board.c -o position/board-host.o
0 was unexpected at this time.
makefile.local:52: recipe for target 'position/board-host.o' failed
mingw32-make[1]: *** [position/board-host.o] Error 255
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 



A lot of it is the same as the previous error message. But many parts of it are different.

.

The first difference is that, in the extremely long line (you have to scroll horizontally to see it in full) that starts with gcc -W -Wall, five of the -W* strings have disappeared.

.

The second difference is that this
-c -dauxiliary gengmarr.c -o gengmarr.o
has turned into this
-c -dauxiliary position/board.c -o position/board-host.o

.

The third difference is that all the "gcc: error: unrecognized command line option" have disappeared. So we're making progress.

.

The fourth difference is that this
Code
Select All
makefile.local:60: recipe for target 'gengmarr.o' failed
mingw32-make[1]: *** [gengmarr.o] Error 1 


has turned into this
Code
Select All
0 was unexpected at this time.
makefile.local:52: recipe for target 'position/board-host.o' failed
mingw32-make[1]: *** [position/board-host.o] Error 255 



.

makefile.local (lines 50-54)
Code
Select All
# position/board-host$(obj_suffix) is the object file for the host.
position/board-host$(obj_suffix):  position/board.c
		$(cchost) $(cflags) $(compileonly) -dauxiliary position/board.c $(objfile)$@
# work around compilers that strictly derive object file name from
# source file name 



.

Take all your time. I'm in no rush.
  
Back to top
 
IP Logged
 
an ordinary chessplayer
God Member
*****
Offline


I used to be not bad.

Posts: 1823
Location: Columbus, OH (USA)
Joined: 01/02/15
Re: Chess problem solving softwares like Popeye
Reply #12 - 07/23/26 at 01:47:49
Post Tools
Hi, I am on vacation and will not log on frequently. But I have not forgotten you.

Note that I had to lower-case "toolchain" everywhere.

Marc Benford wrote on 07/19/26 at 02:01:23:

I used Ctrl+F and searched for the strings in the unrecognized command line options: Walloc, Wduplicated, Wformat. But these strings don't appear in any of the makefiles.

Right.

makefile.unx (lines 29-31)
Code
Select All
# don't put this into the same include as makefile.defaults!
# makefile.defaults defines toolchain
include toolchains/$(toolchain)/make.incl 


makefile.defaults (line 198)
Code
Select All
toolchain=gcc 


toolchains/gcc/make.incl (lines 53-78)
Code
Select All
# Select warning level
ifeq ($(toolchain), gcc)
WARN=\
  -W \
  -Wall \
  -Wextra \
  -Wpedantic -pedantic-errors \
  -Walloc-zero -Walloca \
  -Warray-bounds=2 \
  -Wcast-align -Wconversion -Wbad-function-cast -Wno-cast-qual \
  -Wduplicated-branches -Wduplicated-cond \
  -Wfloat-equal \
  -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation=2 -Wno-format-nonliteral -Wno-format-signedness \
  -Winvalid-pch \
  -Wlogical-op \
  -Wmissing-declarations -Wredundant-decls -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs \
  -Wold-style-definition \
  -Wshift-negative-value -Wshift-overflow=2 \
  -Wswitch -Wswitch-default \
  -Wsync-nand \
  -Wundef \
  -Wunknown-pragmas \
  -Wno-unused-parameter \
  -Winit-self \
  -Wwrite-strings \
  -Wjump-misses-init 



All those -W* strings are types of warnings which you are asking gcc to report on. "unrecognized command line option" means your version of gcc does not recognize that type of warning.

Basically you have two choices.
  1. Get a different gcc which does recognized those warnngs.
  2. Use your existing gcc and remove (delete) the unrecognized warnings from make.incl


I recommend trying the simpler option (2), and only if that doesn't work then go with the more complicated option (1).

After deleting the five unrecognized warnings, the new lines of make.incl (was 53-78, now 53-77)
Code
Select All
# Select warning level
ifeq ($(toolchain), gcc)
WARN=\
  -W \
  -Wall \
  -Wextra \
  -Wpedantic -pedantic-errors \
  -Warray-bounds=2 \
  -Wcast-align -Wconversion -Wbad-function-cast -Wno-cast-qual \
  -Wduplicated-cond \
  -Wfloat-equal \
  -Wformat=2 -Wformat-signedness -Wno-format-nonliteral -Wno-format-signedness \
  -Winvalid-pch \
  -Wlogical-op \
  -Wmissing-declarations -Wredundant-decls -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs \
  -Wold-style-definition \
  -Wshift-negative-value -Wshift-overflow=2 \
  -Wswitch -Wswitch-default \
  -Wsync-nand \
  -Wundef \
  -Wunknown-pragmas \
  -Wno-unused-parameter \
  -Winit-self \
  -Wwrite-strings \
  -Wjump-misses-init 



Of course it's likely you will get new errors.
  
Back to top
 
IP Logged
 
Marc Benford
Full Member
***
Offline


I Love ChessPublishing!

Posts: 113
Joined: 07/17/13
Re: Chess problem solving softwares like Popeye
Reply #11 - 07/19/26 at 02:01:23
Post Tools
Note that in this post, I transformed many uppercase letters into lowercase letters, so that the forum's anti-spam software would not prevent me from posting.



Quote:
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
Okay, I did that, and then when I typed mingw32-make -f makefile.unx in the command prompt, it gave me the same large error message as before.



Quote:
change line 147 to:
ostype="Microsoft_Windows-Version11-with_MinGW"
I am indeed using Windows 11. The Windows ver command more precisely says "version 25H2 (OS Build 26200.8875). I changed this line, and then when I typed mingw32-make -f makefile.unx in the command prompt, it gave me again the same large error message as before. No progress.



Here is the error message in full:
Code
Select All
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 -Walloca -Warray-bounds=2 -Wcast-align -Wconversion -Wbad-function-cast -Wno-cast-qual -Wduplicated-branches -Wduplicated-cond -Wfloat-equal -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation=2 -Wno-format-nonliteral -Wno-format-signedness -Winvalid-pch -Wlogical-op -Wmissing-declarations -Wredundant-decls -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wshift-negative-value -Wshift-overflow=2 -Wswitch -Wswitch-default -Wsync-nand -Wundef -Wunknown-pragmas -Wno-unused-parameter -Winit-self -Wwrite-strings -Wjump-misses-init  -O3 -flto  -dsignals -dmsg_in_mem -dfxf -dndebug -dfxf_max_alignment_type=void* -dfxf_not_multiple_alignment_type=short -dsharing  -std=c99  -I. -dostype=\""Microsoft_Windows-Version11-with_MinGW"\" -dversion=4.101 \
                        -c -dauxiliary gengmarr.c -o gengmarr.o
gcc: error: unrecognized command line option '-Walloc-zero'; did you mean '-Wdiv-by-zero'?
gcc: error: unrecognized command line option '-Walloca'; did you mean '-Wall'?
gcc: error: unrecognized command line option '-Wduplicated-branches'; did you mean '-Wduplicated-cond'?
gcc: error: unrecognized command line option '-Wformat-overflow=2'; did you mean '-Wstrict-overflow='?
gcc: error: unrecognized command line option '-Wformat-truncation=2'; did you mean '-Wline-truncation'?
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 





In the middle of the error message, it says:
-dostype=\""Microsoft_Windows-Version11-with_MinGW"\"
Which is what I changed line 147 into. I'm not sure what exactly the error message said there before I modified line 147.



Quote:
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.
There were indeed some errors in DELETED.
gcc: error: unrecognized command line option '-r`-`uname -p`"
was not the first error. There were other gcc errors before this one. In fact, it seems that this gcc error disappeared, perhaps because I changed line 147.

I used Ctrl+F and searched for the strings in the unrecognized command line options: Walloc, Wduplicated, Wformat. But these strings don't appear in any of the makefiles.



Note that there is a file called "gengmarr.c", and the word "gengmarr" appears four times in the large error message.
Code
Select All
-c -dauxiliary gengmarr.c -o gengmarr.o 


Code
Select All
makefile.local:60: recipe for target 'gengmarr.o' failed
mingw32-make[1]: *** [gengmarr.o] Error 1 


The word "gengmarr" also appears on line 59 and line 63 of makefile.local.
  
Back to top
 
IP Logged
 
an ordinary chessplayer
God Member
*****
Offline


I used to be not bad.

Posts: 1823
Location: Columbus, OH (USA)
Joined: 01/02/15
Re: Chess problem solving softwares like Popeye
Reply #10 - 07/18/26 at 16:38:05
Post Tools
Marc Benford wrote on 07/18/26 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: 1823
Location: Columbus, OH (USA)
Joined: 01/02/15
Re: Chess problem solving softwares like Popeye
Reply #9 - 07/18/26 at 15:52:18
Post Tools
Marc Benford wrote on 07/18/26 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 on 07/18/26 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 on 07/18/26 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: 113
Joined: 07/17/13
Re: Chess problem solving softwares like Popeye
Reply #8 - 07/18/26 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: 113
Joined: 07/17/13
Re: Chess problem solving softwares like Popeye
Reply #7 - 07/18/26 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: 1823
Location: Columbus, OH (USA)
Joined: 01/02/15
Re: Chess problem solving softwares like Popeye
Reply #6 - 07/17/26 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: 113
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: 1823
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
 
Page Index Toggle Pages: [1] 2 
Topic Tools
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo