GNOME Bugzilla – Bug 789565
Meson: configuring meson fails when cross compiling for windows
Last modified: 2018-05-30 11:14:06 UTC
With cerbero patches from bug #789316 I can try to cross build GStreamer core with meson. However, the command "meson build" fails with that error: Meson encountered an error in file docs/libs/meson.build, line 5, column 6: Unknown variable "gst_check_dep". This is because libs/gst/check is not included when host_machine.system() == 'windows' but docs is only excluded when build_machine.system() == 'windows'. In my case build_machine is linux and host_machine is windows, in that case by default libs/gst/check is not included, so gst_check_dep is not defined, but it wants to build doc which needs gst_check_dep.
A workaround is to setup meson and configure it in one step with: meson build -Ddisable_gtkdoc=true In that case it won't try to build doc when cross compiling to Windows. But you cannot split that command into: meson build meson configure -Ddisable_gtkdoc=true build
(In reply to Xavier Claessens from comment #1) > A workaround is to setup meson and configure it in one step with: > > meson build -Ddisable_gtkdoc=true > > In that case it won't try to build doc when cross compiling to Windows. But > you cannot split that command into: > > meson build > meson configure -Ddisable_gtkdoc=true build Note that you should always try to use the first one because changing the configuration after running meson will cause meson to re-run when you try to build the project.
> However, the command "meson build" fails with that error: > Meson encountered an error in file docs/libs/meson.build, line 5, column 6: > Unknown variable "gst_check_dep". > > This is because libs/gst/check is not included when host_machine.system() == > 'windows' but docs is only excluded when build_machine.system() == 'windows'. check is also built on window now, so i think this is obsolete.