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


I Love ChessPublishing!

Posts: 147
Joined: 07/17/13
Re: Chess problem solving softwares like Popeye
Reply #29 - 08/01/26 at 17:59:54
Post Tools
I asked Claude Opus 5 Max to read this thread and to tell me what to do next. Here is his answer:

Quote:
I've read the thread. Good news first: the DLL fix worked, and you made real progress.

What just happened

Look carefully at the two error messages. Before, touch depend failed. Now touch depend runs silently — which means it succeeded — and the build moves on to the next line, chmod u+w depend, which is the one that now fails.

There's another confirmation hiding in the numbers. Your previous run ended with Error -1073741515. That ugly number is actually Windows' code for "a required DLL could not be found" — exactly matching the popup you saw. This time you're back to plain Error 2, "the system cannot find the file specified," which is Windows' code for "the program itself doesn't exist." Different problem, one step further along.

What's wrong now

The recipe in makefile.rules doesn't just run touch. It runs two commands in a row:

touch depend
chmod u+w depend

chmod is another Unix utility that Windows doesn't have. Same situation as touch, and the same fix.

What to do

chmod.exe is in the same coreutils-5.3.0-bin.zip you already downloaded — the 5.2 MB one, not the dep one. You don't need any new download.

Open the folder where you unzipped coreutils-5.3.0-bin.zip (the same folder you got touch.exe from).
Go into the bin subfolder.
Find chmod.exe — it'll be near the top, alphabetically just after chgrp.exe.
Copy it into C:\MinGW\bin, right alongside touch.exe.
Optional sanity check: open a command prompt and type chmod --version. You should get version and copyright info. If instead you get "not recognized," something went wrong with the copy.
Run make again.

You shouldn't get a popup this time — chmod.exe needs the same two DLLs as touch.exe, and those are already sitting in C:\MinGW\bin.

A warning worth taking seriously

You're going to hit more of these. The Popeye makefiles were written for Unix, and MinGW ships almost none of these small utilities. Expect to repeat this cycle a few more times.

The pattern to recognize is this line:

process_begin: CreateProcess(NULL, chmod u+w depend, ...) failed.

The word right after NULL, is the missing program. Find <that name>.exe in the coreutils bin folder, copy it to C:\MinGW\bin, run make again.

But do this one file at a time. Do not copy the whole bin folder into C:\MinGW\bin. This is the caution "an ordinary chessplayer" gave you and it's a real one. Several coreutils programs have the same names as Windows commands, and if Windows finds the Unix version first, things break in confusing and occasionally serious ways. Names to be careful about include date, dir, echo, sort, mkdir, rmdir, link, install, expand, and whoami. chmod is safe — Windows genuinely has no chmod.

Also worth reporting to the forum

When you post, it would help "an ordinary chessplayer" if you paste in what makefile.rules actually says around lines 55–60, rather than just 55–57. You showed lines 55–57 last time, which ended at touch $@ — but we now know there's a chmod u+w $@ on the next line. Seeing the whole recipe lets him tell you whether more commands are queued up after that.

One alternative he might suggest, so you're not surprised by it: the chmod line is arguably pointless here, since touch just created that file and a freshly created file is already writable. You could disable that line by putting a # at the very start of it. I'd install chmod.exe instead — it's less invasive, and you'll probably want chmod available later anyway. But mention that you know the option exists.
  
Back to top
 
IP Logged
 
Marc Benford
Full Member
***
Offline


I Love ChessPublishing!

Posts: 147
Joined: 07/17/13
Re: Chess problem solving softwares like Popeye
Reply #28 - 08/01/26 at 17:58:43
Post Tools
Okay, I did this, and now when I run make I get this 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
touch depend
chmod u+w depend
process_begin: CreateProcess(NuLl, chmod u+w depend, ...) failed.
make (e=2): The system cannot find the file specified.
makefile.rules:57: recipe for target 'depend' failed
mingw32-make[1]: *** [depend] Error 2
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 the same as the previous error message, except that this
Code
Select All
touch depend
process_begin: CreateProcess(NULL, touch depend, ...) failed. 


has turned to this
Code
Select All
touch depend
chmod u+w depend
process_begin: CreateProcess(NULL, chmod u+w depend, ...) failed. 

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


I used to be not bad.

Posts: 1837
Location: Columbus, OH (USA)
Joined: 01/02/15
Re: Chess problem solving softwares like Popeye
Reply #27 - 08/01/26 at 14:45:57
Post Tools
Marc Benford wrote on 08/01/26 at 06:04:37:
Quote:
touch.exe - System error

Impossible to execute the code, because libintl3.dll cannot be found. Reinstalling the program could correct this problem.

(This is a translation of what the popup says, because my computer is not in English.)

For once Windows gives a helpful error message.

It was my mistake. I knew about the dependencies, but way back in the day not all gnu utilities were internationalized, and I wrongly guessed touch would not need the dll.
  • Go to sourceforge and download coreutils-5.3.0-dep.zip
  • Extract libiconv2.dll and libintl3.dll from the bin folder and move them to your MinGW path (same folder where you placed touch.exe).
  
Back to top
 
IP Logged
 
an ordinary chessplayer
God Member
*****
Offline


I used to be not bad.

Posts: 1837
Location: Columbus, OH (USA)
Joined: 01/02/15
Re: Chess problem solving softwares like Popeye
Reply #26 - 08/01/26 at 14:05:41
Post Tools
I couldn't attach touch.txt last night because of a resource limit. Here it is:

@echo off
REM quick and dirty fake touch
REM WARNING does not handle options, multiple files, etc.
if not ".." == ".%1." (
  if exist %1 ( copy /b %1 +,, >NUL ) else ( type NUL > %1 )
)
  
Back to top
 
IP Logged
 
Marc Benford
Full Member
***
Offline


I Love ChessPublishing!

Posts: 147
Joined: 07/17/13
Re: Chess problem solving softwares like Popeye
Reply #25 - 08/01/26 at 06:04:37
Post Tools
I just recently stumbled upon Google's AI mode by accident. It was the first time that I used an LLM. And I remembered what Dink Heckler said. But I now realize that Google's AI mode is not a very good LLM. There are much better LLMs. So henceforth, I will use Gemini 3.1 Pro Extended.

.

Quote:
You can check whether touch exists in your path. From the Windows command prompt run the following command:
    touch --version
Output that contains "not recognized as an internal or external command" means you don't have touch;


It says:
Code
Select All
'touch' is not recognized as an internal or external command, operable program or batch file. 


So indeed, I don't have touch.

.

Okay, I installed touch by following your method (A). I downloaded coreutils-5.3.0-bin.zip, I unzipped it, I clicked on bin, I saw touch.exe, and I moved touch.exe to C:\MinGW\bin

Then, I ran make again.

On my command prompt, 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
touch depend
makefile.rules:57: recipe for target 'depend' failed
mingw32-make[1]: *** [depend] Error -1073741515
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 



The error message that is written in the command prompt is almost the same as last time. There are only two differences.

The first difference is that this line has disappeared:
Code
Select All
process_begin: CreateProcess(NULL, touch depend, ...) failed.
make (e=2): The system cannot find the file specified. 



The second difference is that this line
Code
Select All
mingw32-make[1]: *** [depend] Error 2 


has changed into this line
Code
Select All
mingw32-make[1]: *** [depend] Error -1073741515 


(the number has changed)

But the most important difference is not in the command prompt. The most important difference is that, this time, when I run make, I get a popup on my screen that says:
Quote:
touch.exe - System error

Impossible to execute the code, because libintl3.dll cannot be found. Reinstalling the program could correct this problem.

(This is a translation of what the popup says, because my computer is not in English.)
  
Back to top
 
IP Logged
 
an ordinary chessplayer
God Member
*****
Offline


I used to be not bad.

Posts: 1837
Location: Columbus, OH (USA)
Joined: 01/02/15
Re: Chess problem solving softwares like Popeye
Reply #24 - 08/01/26 at 04:44:30
Post Tools
Recommendation: You could try changing the makefile in some way, but probably would not work unless we know why touch was needed.

The better option is to install touch. I offer two simple methods, but there are others. Both A and B rely on the Windows behavior that running touch will also try to run touch.exe and touch.bat .

(A) You can get a unix touch.exe compiled for Windows from the gnuwin32 collection.
https://gnuwin32.sourceforge.net/packages/coreutils.htm

Caution: You need to put any of these in your path in such a way that unix utilities don't interfere with Windows utilities. For example there is a windows date command and a unix date command, and you can seriously break Windows if it finds the unix date command instead of the needed Windows date command. That's just one example I know about. But you should be safe with touch, since Windows doesn't have it.
  • Go to sourceforge and download coreutils-5.3.0-bin.zip
  • Extract touch.exe from the bin folder and move it to your MinGW path.

(B) You can get touch.bat from the attachment.

Caution: As I wrote it touch.bat is not very good. But there is only one invocation of touch in your makefiles, and touch.bat does work for that one.
  • Download the touch.txt attachment
  • Rename touch.txt to touch.bat and move it to your MinGW path.

After you finish with either A or B, run make again.
  

touch.txt ( 0 KB | 11 Downloads )
Back to top
 
IP Logged
 
an ordinary chessplayer
God Member
*****
Offline


I used to be not bad.

Posts: 1837
Location: Columbus, OH (USA)
Joined: 01/02/15
Re: Chess problem solving softwares like Popeye
Reply #23 - 08/01/26 at 03:26:14
Post Tools
Once again I split this into two posts. First one is diagnosis, second one is recommendation. 


Marc Benford wrote on 07/30/26 at 03:59:01:

Quote:
Goggle AI wrote:
The reason your build failed is because the makefile.unx file is written for Unix-like environments (Linux/macOS), and Windows command prompt natively lacks the touch utility. When mingw32-make tries to execute touch depend, Windows throws the error:
make (e=2): The system cannot find the file specified.

This is probably correct. 

Recall that we had a similar problem with OsTyPe because it relied on the output of uname, another unix utility.

But, since I don't have MinGW installed, I don't know what unix commands it bundles. I am flying a little blind there and can only react to these errors as you report them.

You can check whether touch exists in your path. From the Windows command prompt run the following command:
    touch --version
Output that contains "not recognized as an internal or external command" means you don't have touch; output that contains version number, copyright, license, and author information means you do have touch. Obviously your fix for the touch error is different depending on which case is true.

But again, I think Google AI is probably correct that you don't have touch.

Marc Benford wrote on 07/30/26 at 03:59:01:

Quote:
Goggle AI wrote:
Because you are using standard Windows command prompt, you can easily bypass this by telling the compilation tool to use the Windows-native file creation command instead of Unix's touch.

Follow these steps to successfully compile Popeye.

1. Fix the touch Error Natively

You do not need to install anything new. You just need to pass an extra variable to your make command so it translates touch into a Windows native command.

Run this exact command in your prompt:

cmdmingw32-make -f makefile.unx ToUcH="type nul >"

This is most definitely wrong. You are being advised to overwrite the file "depend" with an empty file of the same name, but touch only creates an empty file if the file does not already exist. And it wouldn't work anyway, since the makefile recipe is running touch and ignoring ${ToUcH}, as you found when you tried make again.

You have a couple of options for fixing touch. See the recommendation post.


Marc Benford wrote on 07/30/26 at 03:59:01:

Quote:
Goggle AI wrote:
2. If you see a gengmarr execute error

If the compiler throws an error right after that saying gengmarr is not recognized, it means Windows is trying to run a newly generated local program without explicitly knowing it is in the current directory. If that happens, force it to look locally by running:

cmdmingw32-make -f makefile.unx ToUcH="type nul >" CuRrPwD=./

Also wrong. CuRrPwD is already correctly being set to ./ which you can see from the make message "entering directory .../popeye-develop".


Marc Benford wrote on 07/30/26 at 03:59:01:

Quote:
Goggle AI wrote:
you must tell the build system to stop using Unix commands and use Windows native settings.

Not true. Would be true if you were using a Windows compiler. But you are using MinGW as a fake unix environment. gcc under MinGW should use unix commands.


Marc Benford wrote on 07/30/26 at 03:59:01:

Quote:
Goggle AI wrote:
(1) mingw32-make -f makefile.unx ToOlChAiN=mingw
(2) mingw32-make -f makefile.unx clean
(3a) mingw32-make -f makefile.w32
(3b) mingw32-make -f makefile.gcc

Weird. 

(1) Your options for ToOlChAiN are limited to the directory names in the .../popeye-develop/toolchain folder. "mingw" is not one of the folders. There is a directory "cross-i586-mingw32msvc" which you could try as a value for toolchain. It also uses unix commands so will not fix your touch problem. Probably best to stick with the gcc toolchain.

(2) "clean" is a standard make target telling it to undo some of the changes from previous runs of make. You can find it on line 364 of makefile.unx. It's not a bad idea to run make clean, but again it won't fix your issue.

(3a) and (3b) These makefiles don't even exist, Google AI is just making stuff up.

So in practice Google AI is leading you away from the solution rather than towards it.
  
Back to top
 
IP Logged
 
Marc Benford
Full Member
***
Offline


I Love ChessPublishing!

Posts: 147
Joined: 07/17/13
Re: Chess problem solving softwares like Popeye
Reply #22 - 07/30/26 at 03:59:01
Post Tools
I tried asking Google's AI mode.

.

The first time it said this:

Quote:
The reason your build failed is because the makefile.unx file is written for Unix-like environments (Linux/macOS), and Windows command prompt natively lacks the touch utility. When mingw32-make tries to execute touch depend, Windows throws the error:
make (e=2): The system cannot find the file specified.

Because you are using standard Windows command prompt, you can easily bypass this by telling the compilation tool to use the Windows-native file creation command instead of Unix's touch.

Follow these steps to successfully compile Popeye.



1. Fix the touch Error Natively

You do not need to install anything new. You just need to pass an extra variable to your make command so it translates touch into a Windows native command.

Run this exact command in your prompt:

cmdmingw32-make -f makefile.unx ToUcH="type nul >"



2. If you see a gengmarr execute error

If the compiler throws an error right after that saying gengmarr is not recognized, it means Windows is trying to run a newly generated local program without explicitly knowing it is in the current directory. If that happens, force it to look locally by running:

cmdmingw32-make -f makefile.unx ToUcH="type nul >" CuRrPwD=./



Why this happens and what to expect

makefile.unx is structurally built for Unix systems. By declaring ToUcH="type nul >", you are tricking the makefile into using a standard Windows blank file creator instead of the Linux touch utility.


I tried running the two commands that it wanted me to run, but it didn't work, the error message stayed exactly the same.

.

The second time it said this:

Quote:
The error you are seeing (touch depend failed) happens because the Unix-style makefile (makefile.unx) expects Linux command-line utilities (like touch) which do not exist natively on Windows Command Prompt.

[...]

you must tell the build system to stop using Unix commands and use Windows native settings.

[...]

Run this exact command instead:

cmdmingw32-make -f makefile.unx ToOlChAiN=mingw

(Adding ToOlChAiN=mingw instructs the configuration file to skip Linux-specific rules like touch depend and handle the build correctly on Windows).


After I ran the command that it told me to run, I got the following error message:

Code
Select All
makefile.unx:31: toolchains/mingw/make.incl: No such file or directory
mingw32-make: Circular FoRcE <- FoRcE dependency dropped.
mingw32-make CuRrPwD=./ -f ./makefile.local FoRcE
mingw32-make[1]: Entering directory 'C:/Users/Name/Desktop/popeye-develop/popeye-develop'
mingw32-make[1]: Nothing to be done for 'FoRcE'.
mingw32-make[1]: Leaving directory 'C:/Users/Name/Desktop/popeye-develop/popeye-develop'
mingw32-make CuRrPwD=./ -f ./makefile.local makefile.options
mingw32-make[1]: Entering directory 'C:/Users/Name/Desktop/popeye-develop/popeye-develop'
mingw32-make[1]: Nothing to be done for 'makefile.options'.
mingw32-make[1]: Leaving directory 'C:/Users/Name/Desktop/popeye-develop/popeye-develop'
mingw32-make CuRrPwD=toolchains/mingw/ -f toolchains/mingw/makefile.local toolchains/mingw/make.incl
mingw32-make[1]: Entering directory 'C:/Users/Name/Desktop/popeye-develop/popeye-develop'
mingw32-make[1]: toolchains/mingw/makefile.local: No such file or directory
mingw32-make[1]: *** No rule to make target 'toolchains/mingw/makefile.local'.  Stop.
mingw32-make[1]: Leaving directory 'C:/Users/Name/Desktop/popeye-develop/popeye-develop'
makefile.unx:350: recipe for target 'toolchains/mingw/make.incl' failed
mingw32-make: *** [toolchains/mingw/make.incl] Error 2 



.

The third time it suggested typing this
Code
Select All
mingw32-make -f makefile.unx clean 


and then either this
Code
Select All
mingw32-make -f makefile.w32 


or this
Code
Select All
mingw32-make -f makefile.gcc 


But I won't do this unless you tell me to. I'm afraid this might delete the file makefile.unx.
  
Back to top
 
IP Logged
 
Marc Benford
Full Member
***
Offline


I Love ChessPublishing!

Posts: 147
Joined: 07/17/13
Re: Chess problem solving softwares like Popeye
Reply #21 - 07/30/26 at 03:57:22
Post Tools
Quote:
Actually $(eXeCuTe) is blank, which is what we wanted. It was not what was causing the error message about '.', but it was worth checking. I will let you work out for yourself why "11" was echoed when $(eXeCuTe) is blank.


I get it. echo is the print function of makefiles. echo "1$(eXeCuTe)1" prints a 1 and then prints whatever is the output of eXeCuTe and then prints another 1. It sandwiches the output of eXeCuTe between two 1s. You added the two 1s so that when you see two 1s in the error message you would know that what's in between the two 1s is the output of eXeCuTe.

.

Okay, I made the modifications and then I ran make, and here is the error message that I get now:

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
touch depend
process_begin: CreateProcess(NULL, touch depend, ...) failed.
make (e=2): The system cannot find the file specified.
makefile.rules:57: recipe for target 'depend' failed
mingw32-make[1]: *** [depend] Error 2
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 



Everything up to gengmarr > pygmarr.c is the same. It's what's after that has changed.

makefile.rules (lines 55-57)
Code
Select All
ifdef DEPEND
$(CURRPWD)depend: $(SRC_CFILES:%=$(CURRPWD)%) $(INCLUDES:%=$(CURRPWD)%) $(CURRPWD)makefile.local
	touch $@ 

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


I used to be not bad.

Posts: 1837
Location: Columbus, OH (USA)
Joined: 01/02/15
Re: Chess problem solving softwares like Popeye
Reply #20 - 07/29/26 at 19:50:57
Post Tools
Recommended changes. Line numbers are from the github files, if you added or deleted lines then they may be slightly different for you.

makefile.defaults (lines 156-157)
Code
Select All
# suffix for executables
ExE_sUfFiX= 


change to
Code
Select All
# suffix for executables
ExE_sUfFiX=.exe 



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


change to
Code
Select All
pygmarr.c: gengmarr$(ExE_sUfFiX)
	$(ExEcUtE) gengmarr$(ExE_sUfFiX) > $@ 


Then try make again.
  
Back to top
 
IP Logged
 
an ordinary chessplayer
God Member
*****
Offline


I used to be not bad.

Posts: 1837
Location: Columbus, OH (USA)
Joined: 01/02/15
Re: Chess problem solving softwares like Popeye
Reply #19 - 07/29/26 at 19:33:26
Post Tools
Responding in 2 separate posts. First one will annotate the messages you got. Second one will give my recommendations.

Marc Benford wrote on 07/25/26 at 19:33:39:
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.

This is expected behavior. If the gcc command succeeds, it does not print any message.


Marc Benford wrote on 07/25/26 at 19:33:39:

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. 


makefile.local is problematic on lines 67-68. Unix uses "/" as the path separator, whereas historically Windows uses "\", while modern Windows sometimes understands "/". Here I give a Windows session that shows the problem. First thing to notice is that the cd command succeeds even though I used the "wrong" path separator. Second thing to notice is that the first error message about '.' is totally confusing. Third thing to notice is that the message about '.' is the same error message you received from make.

Code
Select All
C:\Users\aoc>cd ../Public

C:\Users\Public>echo foo > foo.exe

C:\Users\Public>./foo
'.' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Public>foo
This version of C:\Users\Public\foo.exe is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.

C:\Users\Public>del foo.exe

C:\Users\Public>exit
 




Marc Benford wrote on 07/25/26 at 19:33:39:

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
cd C:\Users\Name\Desktop\popeye-develop\popeye-develop\gengmarr.exe
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. 


Again this is expected behavior. "cd" is short for "change directory". popeye-develop is a directory, so you can cd into it. gengmarr.c ,  gengmarr.exe , and gengmarr.o are files, so you cannot cd into them.

Marc Benford wrote on 07/25/26 at 19:33:39:
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.

Actually $(eXeCuTe) is blank, which is what we wanted. It was not what was causing the error message about '.', but it was worth checking. I will let you work out for yourself why "11" was echoed when $(eXeCuTe) is blank. You can delete the echo line, although leaving it in will do no harm.
  
Back to top
 
IP Logged
 
Marc Benford
Full Member
***
Offline


I Love ChessPublishing!

Posts: 147
Joined: 07/17/13
Re: Chess problem solving softwares like Popeye
Reply #18 - 07/25/26 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: 1837
Location: Columbus, OH (USA)
Joined: 01/02/15
Re: Chess problem solving softwares like Popeye
Reply #17 - 07/25/26 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 on 07/25/26 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 on 07/25/26 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: 147
Joined: 07/17/13
Re: Chess problem solving softwares like Popeye
Reply #16 - 07/25/26 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: 1837
Location: Columbus, OH (USA)
Joined: 01/02/15
Re: Chess problem solving softwares like Popeye
Reply #15 - 07/25/26 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
 
Page Index Toggle Pages: 1 2 [3] 4 
Topic Tools
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo