Invalid, Meson-generated, valac arguments break the build
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
simple-scan (Ubuntu) |
Triaged
|
Critical
|
Unassigned |
Bug Description
I'm trying to build simple-scan according to the README file (on Arch). With colord, packagekit, and webp installed, Meson is building invalid args for the main build step, which prevents the project from building.
The build declaration (meson.build) generates a Python list of vala_args. The list of args looks OK getting passed into executable(). However, the auto-generated build.ninja is missing the required -D(efine) flags. As a result, it treats some of defines as filenames, and crashes.
Vala/Meson/Ninja are new to me, so I'm not sure if the problem is with the build file, or the Meson generator, or what.
# ./src/meson.build
# If all three packages are installed, they're built into the Python list. Somehow, the -D flags disappear during build generation
vala_args = [ '--pkg=posix', '--vapidir=' + meson.current_
dependencies = [ glib_dep, gtk_dep, zlib_dep, cairo_dep, gdk_pixbuf_dep, gusb_dep, sane_dep ]
if colord_dep.found ()
vala_args += [ '-D', 'HAVE_COLORD' ]
dependencies += colord_dep
endif
if packagekit_
vala_args += [ '-D', 'HAVE_PACKAGEKIT' ]
dependencies += packagekit_dep
endif
if webp_dep.found () and (not colord_dep.found () or webpmux_dep.found ()) # Webpmux only required if colord
vala_args += [ '-D', 'HAVE_WEBP' ]
dependencies += [ webp_dep, webpmux_dep ]
endif
simple_scan = executable ('simple-scan',
# ./build/build.ninja
# Snippet of the bad build step. Note the -D flag is missing (at the end)
build src/simple-
ARGS = -C --debug --pkg libwebpmux --pkg libwebp --pkg packagekit-glib2 --pkg colord --pkg sane-backends --pkg gusb --pkg gdk-pixbuf-2.0 --pkg cairo --pkg zlib --pkg gtk+-3.0 --target-glib '$ 2.38' --pkg glib-2.0 -d src/simple-scan@exe --gresources=
Changed in simple-scan (Ubuntu): | |
status: | Confirmed → Triaged |
importance: | Undecided → Critical |
I upgraded to the newly released Meson build 0.41.1 (from 0.40.1), and this isn't a problem anymore...