Closed BenWiederhake closed 8 years ago
libyaml is optional, but highly recommended, which is why it's enabled by default.
Do you also get this error if you pass -DDEP11=OFF
to cmake (if so, then it's a bug, otherwise it is working as intended)?
Can't test this anymore; I just installed yaml after seeing the error, and wrote this issue while waiting on the installation.
Next note: the list of requirements doesn't list xmlto
(has nothing to do with libxml2), but it seems to be required.
That I can add - it's technically just required for the manual pages, but since we always build them... I will test if the DEP11 flag still works, but I am pretty sure it does :)
Thanks for your patience btw :)
And another issue with the dependencies. (Do you consider these to be different "issues", or can I just continue and keep the discussion somewhat linear here?)
I have gobject-introspection
installed. When running cd build && rm -rf * && cmake ..
, I get this output:
[SNIP]
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29")
-- Found GLIB2: /usr/lib/x86_64-linux-gnu/libglib-2.0.so (Required is at least version "2.46")
-- Checking for module 'gio-2.0'
-- Found gio-2.0, version 2.46.2
-- Checking for module 'gobject-introspection-1.0'
-- Package 'gobject-introspection-1.0' not found
[SNIP]
-- Configuring done
-- Generating done
-- Build files have been written to: /home/eispin/workspace/appstream/build
It appears to be somewhat successful. Exit code is 0, "successful".
However, when running make
it fails:
[SNIP]
[ 21%] Built target appstream
Scanning dependencies of target gir-girs
[ 22%] Generating AppStream-1.0.gir
/bin/sh: 1: --identifier-prefix=As: not found
src/CMakeFiles/gir-girs.dir/build.make:95: recipe for target 'src/AppStream-1.0.gir' failed
make[2]: *** [src/AppStream-1.0.gir] Error 127
CMakeFiles/Makefile2:158: recipe for target 'src/CMakeFiles/gir-girs.dir/all' failed
make[1]: *** [src/CMakeFiles/gir-girs.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
I guess that some variable that was supposed to contain a gobject-introspection command is empty, and sh
attempts to call the first argument as an executable.
Anyway. The problem is: The package is actually called libgirepository1.0-dev
.
Now I can finally say what I propose to change:
(including girepository. Note: on your OS this might be a separate package.)
Recapitulation from the above thread:
xmlto
in the required dependenciesEww... Right, cmake should fail if the GIR stuff is missing, I will fix that.
As for adding a warning that things might be in different packages: I would rather not want to clutter the README with that info, as it's pretty much obvious and won't provide any useful information - distros package things in all kind of random ways, there might even be three packages for a dependency.
What does make sense though is e.g. including an example RPM specfile and the like.
Looks like you're on some Debian-based distro btw, in that case simply run sudo apt build-dep appstream
to get all the build dependencies ;-)
Argh! How could I forget apt build-dep
! Yeah, you're right.
In
README.md
, it says:However,
cd build && cmake ..
doesn't work without yaml-dev in place:I can see two ways to resolve this:
Run cmake --no-yaml to build without this.