Ninja build on Arch failing with HAVE_COLORD, HAVE_PACKAGEKIT not found

Asked by Dan S. on 2017-06-15

I'm trying to build simple-scan git:master according to the README instructions. Meson correctly finds all dependencies. However, when ninja tries to compile, it fails, saying that colord and packagekit are missing (see below).

There was an earlier, similar bug relating the autotools vs. meson. It looks like that issue was resolved in version 25. Assuming master is newer than v25, I think this is different from my problem.

Meson/Ninja/Vala are all new to me, and simple-scan is targeted for a different distro than I'm using, so this is very likely user/configuration error on my part. Any pointers on what's failing here, why it's failing, and how to get around it?

Many thanks!

$ ninja all install
[1/14] Compiling Vala source ../src/config.vapi ../src/app-window.vala ../src/authorize-dialog.vala ../s...g.vala ../src/simple-scan.vala ../src/scanner.vala ../src/screensaver.vala ../src/autosave-manager.vala.
FAILED: src/simple-scan@exe/app-window.c src/simple-scan@exe/authorize-dialog.c src/simple-scan@exe/book.c src/simple-scan@exe/book-view.c src/simple-scan@exe/page.c src/simple-scan@exe/page-view.c src/simple-scan@exe/preferences-dialog.c src/simple-scan@exe/simple-scan.c src/simple-scan@exe/scanner.c src/simple-scan@exe/screensaver.c src/simple-scan@exe/autosave-manager.c
valac -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=../src/simple-scan.gresource.xml --pkg=posix --vapidir=/home/dan/Projects/simple-scan/src HAVE_COLORD HAVE_PACKAGEKIT -D HAVE_WEBP ../src/config.vapi ../src/app-window.vala ../src/authorize-dialog.vala ../src/book.vala ../src/book-view.vala ../src/page.vala ../src/page-view.vala ../src/preferences-dialog.vala ../src/simple-scan.vala ../src/scanner.vala ../src/screensaver.vala ../src/autosave-manager.vala
error: HAVE_COLORD not found
error: HAVE_PACKAGEKIT not found
Compilation failed: 2 error(s), 0 warning(s)
ninja: build stopped: subcommand failed.

Question information

English Edit question
Ubuntu simple-scan Edit question
No assignee Edit question
Solved by:
Manfred Hampl
Last query:
Last reply:
Best Manfred Hampl (m-hampl) said : #1

Shouldn't it be ... -D HAVE_COLORD -D HAVE_PACKAGEKIT ... instead of ... HAVE_COLORD HAVE_PACKAGEKIT ... ?
Check the contents of your config files.

Dan S. (dan4launchpad) said : #2

Thanks Manfred! That was exactly the issue.

Since the incorrect config files are auto-generated by Meson as part of the project & build process, I've filed a bug for the issue.

Dan S. (dan4launchpad) said : #3

Thanks Manfred Hampl, that solved my question.