Admittedly I never saw the error ...Makefile not found. . I don’t have a specific answer to this error, I would need to see more logs before it / investigate your system. Some guesses / things to check:
What is in d:\fpc 3.3.1\fpcsrc? Is there a file called Makefile?
Hm, is it possible that spaces in dir name just confuse some tool along the way? Try d:\fpc_3.1.1 . (And if this helps → a bugreport to FpcUpDeluxe, to complain about spaces in directory name in a clear way, would help future people ).
Or possibly there was some temporary GitLab (where FPC sources are) issue, and git clone failed to get FPC sources? In this case, just retry.
Or some issue on your system, like anti-virus interfering with FpcUpDeluxe execution or not enough disk space?
To answer your questions about versions:
We recommend always the latest FpcUpDeluxe version, from Releases · LongDirtyAnimAlf/fpcupdeluxe · GitHub . Often, a few older FpcUpDeluxe versions work too, but we don’t actively test them, and sometimes they have issues. We always test the latest version (and if it has problems, we’ll document them on Web Target | Manual | Castle Game Engine ; the latest one should be cool ).
The FPC version you need for the web platform specifically is 3.3.1, aka “trunk” (as FPC 3.2.2 doesn’t support web now). It’s easiest to use the “WA” (WebAssembly) button in FpcUpDeluxe, it will automatically select 3.3.1 / trunk, so you can just
select target directory,
click “WA”,
wait,
and it does almost everything correctly.
The details are in our " 4.1. Installing Prerequisites" section on Web Target | Manual | Castle Game Engine , see in particular " 4.1.1. Prerequisites using fpcupdeluxe “WA” (WebAssembly) button". Please read them – once FpcUpDeluxe finishes, you will need to remove one unnecessary pas2js.exe without config, point our editor to the right FPC version, and extend your $PATH. But this seems all unrelated to the error ...Makefile not found. that (I guess) happens much earlier.
I have just tested it, I’m on Windows now, so I used fpcupdeluxe-x86_64-win64.exe from the latest “Release v2.4.0k of fpcupdeluxe” and it seems everything went well (well, almost, read on ).
I did encounter one problem, which seems to be a temporary problem in pas2js codebase: it uses 3 times Pascal construction Result:=Add as ...;, which fails to compile today. Just comment out the problematic lines, or replace with raise Exception.Create('Not implemented'); (when trying to build your game from CGE editor, double click on the error line to open the pas2js source code). We don’t use these code parts. If the problem will persist, we’ll of course report to pas2js – it seems just some temporary problem on their side.
See screenshots below for how I fixed them, you will need to repeat this hack 3 times:
If the problem with ...Makefile not found. persists, I propose you isolate it (experiment, can you install any FPC version on this system now, with this FpcUpDeluxe?), provide verbose logs. You can also submit FpcUpDeluxe bug (but I don’t mind also trying to debug the issue here, on CGE forum – as much as I will be able help ).
ُThanks
I was using Release v2.4.0h and didn’t realize that it had been updated to version k.
I’ve been having this problem for several months and couldn’t figure out how to fix it. I had even tried the WA button before.
I’ll test it now with version v2.4.0k.
Of course, the stable FPC version installs without any problem.
--Edit–
I got the same error with version K as well.
The stable FPC version is already installed in D:\fpcupdeluxe. Following your suggestion, I changed the new target directory to D:\FPC_3.3.1, and it seems that the installation is now progressing.
I need to keep the stable version as it is because I have a serious project that I compile for Linux using the stable version. I don’t want to risk switching that project to FPC 3.3.1.
*********
The installation completed successfully.
When building for Web, I get this error:
program_js.lpr(41,5) Error: can't find unit "System"
I added the System unit and saved program_js.lpr, then cleaned and rebuilt the project, but I still get the same error.
I also tested it with your simplest example, and I get exactly the same error there.
Sure. That’s also my case (I need multiple FPC versions) and FpcUpDeluxe is really good at managing this – all FPC installations are independent, and you can have multiple of them. On the system I write this, I have now 9 independent FPC+Lazarus installations:)
This indicates the pas2js doesn’t have proper configuration, which is usually in a file pas2js.cfg alongside the pas2js executable.