garrigue / lablgtk

LablGTK 2 and 3: an interface to the GIMP Tool Kit
https://garrigue.github.io/lablgtk
Other
89 stars 40 forks source link

Fail to install Lablgtk3 on Windows (Diskuv) #165

Open F-Loyer opened 1 year ago

F-Loyer commented 1 year ago

I have compiled Gtk with gvsbuild, copied it in C:\gtk, added C:\gtk\binin the PATH. Then the cairo2 package does install.

However, òpam install lablgtk3` fails :

# [...]
# (cd _build/default/src && C:\DiskuvOCaml\BuildTools\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\cl.exe -nologo -O2 -Gy- -MD -D_CRT_SECURE_NO_DEPRECATE -IC:/gtk/bin/../include/gtk-3.0 -IC:/gtk/bin/../include/pango-1.0 -IC:/gtk/bin/../include -IC:/gtk/bin/../include/glib-2.0 -IC:/gtk/bin/../lib/glib-2.0/include -IC:/gtk/bin/../include/harfbuzz -IC:/gtk/bin/../include/freetype2 -IC:/gtk/bin/../inc[...]
# cl : Ligne de commande error D8021 : argument numérique non valide '/Wno-deprecated-declarations'
# File "src/dune", line 29, characters 3-11:
# 29 |    ml_pango cairo_pango_stubs
#         ^^^^^^^^
# (cd _build/default/src && C:\DiskuvOCaml\BuildTools\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\cl.exe -nologo -O2 -Gy- -MD -D_CRT_SECURE_NO_DEPRECATE -IC:/gtk/bin/../include/gtk-3.0 -IC:/gtk/bin/../include/pango-1.0 -IC:/gtk/bin/../include -IC:/gtk/bin/../include/glib-2.0 -IC:/gtk/bin/../lib/glib-2.0/include -IC:/gtk/bin/../include/harfbuzz -IC:/gtk/bin/../include/freetype2 -IC:/gtk/bin/../inc[...]
# cl : Ligne de commande error D8021 : argument numérique non valide '/Wno-deprecated-declarations'
# File "src/dune", line 27, characters 3-11:
# 27 |    wrappers
#         ^^^^^^^^
# (cd _build/default/src && C:\DiskuvOCaml\BuildTools\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\cl.exe -nologo -O2 -Gy- -MD -D_CRT_SECURE_NO_DEPRECATE -IC:/gtk/bin/../include/gtk-3.0 -IC:/gtk/bin/../include/pango-1.0 -IC:/gtk/bin/../include -IC:/gtk/bin/../include/glib-2.0 -IC:/gtk/bin/../lib/glib-2.0/include -IC:/gtk/bin/../include/harfbuzz -IC:/gtk/bin/../include/freetype2 -IC:/gtk/bin/../inc[...]
# cl : Ligne de commande error D8021 : argument numérique non valide '/Wno-deprecated-declarations'

https://learn.microsoft.com/en-us/cpp/build/reference/compiler-option-warning-level?view=msvc-170 gives the diffferent /W options. They don't follow the gcc conventions. (src/dune, src-goocanvas2/dune and src-sourceview3/dune have this option)

garrigue commented 1 year ago

I'm sorry, you probably need to at least use gcc to install lablgtk3. It's been a long time I have not tried to compile anything directly under windows...

F-Loyer commented 1 year ago

But the Microsoft compiler from Visual Studio is the compiler of the Diskuv distribution. I can’t change it for gcc without changing the Distribution.

And it seems to be the privileged distribution on Windows. (tier 2 according to https://ocaml.org/docs/ocaml-on-windows)