Claude knows something I don't know. You have a genuine unix shell available. You should use it.
From reply #31
Quote:Claude wrote:
... running the build inside a genuine Unix-like shell on Windows, such as MSYS2 or the Git Bash shell that ships with Git for Windows. That's a bigger detour and I wouldn't take it until you know you need it. Worth mentioning to "an ordinary chessplayer" so you both have it in reserve.
I know something Claude doesn't know. The toolchain cross-i586-mingw32msvc has the code to fix these next errors you were getting when trying to build maxtime.o
From reply #42
379: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 platform/unix/maxtime.c -o platform/unix/maxtime.o
380:platform/unix/maxtime.c:67:3: error: 'SiGhUp' undeclared here (not in a function)
383:platform/unix/maxtime.c:69:5: error: 'SiGqUiT' undeclared here (not in a function)
386:platform/unix/maxtime.c:74:5: error: 'SiGvTaLrM' undeclared here (not in a function)
389:platform/unix/maxtime.c:75:5: error: 'SiGxCpU' undeclared here (not in a function)
392:platform/unix/maxtime.c:76:5: error: 'SiGxFsZ' undeclared here (not in a function)
396:platform/unix/maxtime.c:202:14: error: 'SiGaLrM' undeclared (first use in this function)
400:platform/unix/maxtime.c:202:14: error: passing argument 1 of 'signal' makes integer from pointer without a cast [-Wint-conversion]
407:platform/unix/maxtime.c:217:9: error: implicit declaration of function 'alarm' [-Wimplicit-function-declaration]
416:mingw32-make[1]: *** [platform/unix/maxtime.o] Error 1
419:mingw32-make: *** [platform/unix/library.lib.a] Error 2
From toolchains/cross-i586-mingw32msvc/make.incl (lines 47-50)
# enumerate libraries to link
TaRgEtLiBs=-lwinmm
# winmm = Windows Multimedia Library (we use Multimedia Timers to
# implement option maxtime)
The same make.incl also defines the other symbols you have been messing with: ObJ_SuFfIx , ExE_PlAtFoRm_MaRk , ExE_SuFfIX , OsTyPe, PlAtFoRm.
You need to pay attention to the prerequisites.
From toolchains/cross-i586-mingw32msvc/make.incl (lines 7-17)
# Requirements:
#
# The following tools can be used to produce executables for the
# target plarform and can be found in the $PATH:
# - i586-mingw32msvc-gcc
# - i586-mingw32msvc-ranlib
# - i586-mingw32msvc-strip
# The following tools can be used to produce executables for the host
# platform and can be found in the $PATH:
# - gcc
You have the fourth one, gcc, but do you have the others? The first place to check is your MinGW/bin folder for the files i586-mingw32msvc-gcc , i586-mingw32msvc-ranlib , i586-mingw32msvc-strip , possibly all three will have _slightly_ different names but you are looking for files ending with msvc-gcc , msvc-ranlib , msvc-strip , possibly followed by .exe . If you find those files but they begin with i386- instead, then there is a different toolchain for that, cross-i386-mingw32msvc , and you should use it instead of cross-i586-mingw32msvc as I am documenting here.
Let's assume you have all four requirements, and the first three are i586.
My recommendation is:
Edited: Arg! I completely forgot you added some pieces. So before you delete your popeye-develop folder you need to copy those changes elsewhere. And then after downloading the master branch you need to copy those changes back.
- Delete your popeye-develop folder and download the master branch from the popeye github repository
- Modify makefile.defaults (line 198) similar to Reply #12 but with this toolchain instead
ToOlChAiN=cross-i586-mingw32msvc - Modify toolchains/cross-i586-mingw32msvc/make.incl (lines 24-41) as given below
- Open the Git Bash shell as instructed in reply #33
Caution: You may need to edit the PATH environment variable in git bash in order for it to find your MinGW bin folder. You will know that if ming32-make does not run. Changing the path is simple and tricky at the same time. - Within the Git Bash shell
cd /your/popeye-master/
ming32-make -f makefile.unx - Don't expect it to work without errors the first time.
Changes for toolchains/cross-i586-mingw32msvc/make.incl (lines 24-41). Only you will know the exact filenames you have to provide. Maybe you won't have to change them at all.
# Now override where necessary
# Compiler selection
# ==================
# Compiler for creating executables on target
CcTaRgEt=whatever-name-you-found-for-msvc-gcc
# Linker for creating executables on target
LdTaRgEt=whatever-name-you-found-for-msvc-gcc
# Strip utility to remove unnecessary symbols from executable
StRiPTaRgEt=whatever-name-you-found-for-msvc-strip
# Archive index generator
# -----------------------
ArChIvE_InDeXeR=whatever-name-you-found-for-msvc-ranlib