Open F-Loyer opened 1 year ago
Hi @F-Loyer, do you have long paths enabled in Windows?
It is not about the path, but the compilator doesn't like some long strings inside the .c
file. (See https://learn.microsoft.com/en-us/cpp/cpp/compiler-limits?view=msvc-170)
I have tried to remplace the string by a list or number... but get the following error:
gtk/gtkresources.c(15612): fatal error C1060: espace du tas insuffisant pour le compilateur
The heap space is not suffisient for the compiler. I note the progress... the error is produced at the line 15612... and not 4105... But we need to handle 10 times more lines !
The error is covered here https://learn.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/fatal-error-c1060?view=msvc-170, but with an x64 system, I am surprised by this error.
Do you have the Diskuv OCaml setup instructions that you are following so that we can try to reproduce this? I haven't seen this issue before, so there must be something unique with your setup.
I have followed https://diskuv-ocaml.gitlab.io/distributions/dkml/# (and use the Diskuv installer). But, the Visual Studio 2019 is installed automatically in a fancy directory, but this installation is made by the Visual Studio Installer.
I don't think the compiler installation is wrong (the 65535 characters limit is documented by Microsoft).
The issue can come from the C:\gtk-build\build\x64\release\gtk3\gtk\gtkresources.c
generation. Mine is 175637 lines long !! The ressource is 2809657 bytes long in a unique array. Perhaps something has happenned when generating this file.
I finally solved my issue, using VS2022. The C:\gtk-build\build\x64\release\gtk3\gtk\gtkresources.c
is the same, then I guess the older compiler has a known and documented limitation.
I have tried
gvsbuild build --vs-ver 16 --vs-install-path C:\DiskuvOCaml\BuildTools gtk3
. Since I have Visual Code 2019 which is proposed by the Diskuv project (an Windows Ocaml port).I have the following errors:
Since the compiler is limited to 65536 characters strings, I guess I should process the file to replace "\000\001\002..." by 0, 1, 2 or somehing like this.