Open AlexanderplUs opened 4 years ago
I opened https://github.com/mesonbuild/meson/pull/4966 to fix this a year ago, but I forgot about it. I'm not sure why we use absolute paths; would have to check git blame
.
I'm not sure why we use absolute paths; would have to check
git blame
.
Absolute paths are added because of https://github.com/mesonbuild/meson/issues/973 as I can see.
I came here from research on https://github.com/microsoft/vcpkg/pull/22201#issuecomment-1047379808 (gtk3, but there seems to be a similiar issue with gtk4).
IIUC there is a the generated command line length is too long for Windows since meson switched to absolute paths.
With many tools, such problems are avoided with response files. AFAIU gnome.mkenums
is a wrapper for glib-mkenums
.
https://mesonbuild.com/Gnome-module.html#gnomemkenums
And glib-mkenums
does support a response file when "passed as the sole argument":
https://developer-old.gnome.org/gobject/stable/glib-mkenums.html
Is this something which could be implemented?
Disclaimer: Nearly no knowledge of meson, gnome, gtk.
Yes, absolutely. There's a PR which predates this ticket, and tried to implement it here: #4966
Unfortunately the codebase changed and it "needs to be rewritten from scratch" so it got closed.
It definitely needs to be done, we just need someone to do the work.
Any news?
This hit GStreamer today. https://gitlab.freedesktop.org/daniel.pendse/gstreamer/-/jobs/62727051
I try to build gtk+ 3.24.14 under msys2 system on Windows with following command:
As you can see I use separate build directory
Next I call:
which fails with error:
If I build gtk+ directly in source directory all works fine.
As I can see in generated
build.ninja
file there is a command with 39000+ symbols length:Most part of this huge command is paths to header files:
If I run this command directly in console it gives
Argument list too long
errorThis command is generated from rule in gtk/meson.build:
The source of this problem is https://github.com/mesonbuild/meson/commit/d5f7ba862bb37ad75b68e007b8b55f40b6f6fd19 which converts all relative paths to absolute in gnome.mkenums and can cause generation of too long command to execute. After I removed in
build.CustomTarget(output, state.subdir, custom_kwargs, absolute_paths=True)
parameterabsolute_paths=True
- all builds fine.