libyaml icon indicating copy to clipboard operation
libyaml copied to clipboard

The package `libyaml-dev` in Ubuntu/apt does not have a config.cmake file

Open ityuhui opened this issue 3 years ago • 4 comments

After installing "libyaml" with below command in Ubuntu 18.04 LTS and Ubuntu 20.04 LTS

sudo apt-get install -y libyaml-dev

We cannot find any config.cmake file for libyaml so the CMake files of our project cannot use find_package(yaml)

Is the dpkg package libyaml-dev officially maintained by this repo ?

If so, could you please tell us whether packaging config.cmake file to the dpkg package libyaml-dev is the task your planed ?

Thank you !

ityuhui avatar Sep 02 '21 13:09 ityuhui

Package information lists Ubuntu Core Developers as maintainer for libyaml-dev package, both 18.04 and 20.04 versions. I would suggest to contact them.

i-ky avatar Sep 02 '21 13:09 i-ky

Thank you @i-ky

I think the dpkg package is based on the release https://github.com/yaml/libyaml/releases of this repo, but I wonder why the release package does not include the file yamlConfig.cmake which can be built from source code.

ityuhui avatar Sep 02 '21 14:09 ityuhui

Here is what I get on my Ubuntu 20.04

dpkg -L libyaml-dev
/.
/usr
/usr/include
/usr/include/yaml.h
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libyaml.a
/usr/lib/x86_64-linux-gnu/pkgconfig
/usr/lib/x86_64-linux-gnu/pkgconfig/yaml-0.1.pc
/usr/share
/usr/share/doc
/usr/share/doc/libyaml-dev
/usr/share/doc/libyaml-dev/copyright
/usr/lib/x86_64-linux-gnu/libyaml.so
/usr/share/doc/libyaml-dev/changelog.Debian.gz

ahmedyarub avatar Sep 02 '21 16:09 ahmedyarub

The Ubuntu packages of libyaml are taken from Debian, where recently an equivalent bugreport has been filed in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1022825. I am the new maintainer of the Debian integration of libyaml.

I understand from the mentions above that it would be really beneficial to have yamlConfig.cmake available in Debian and thus eventually in Ubuntu as well.

It seems that the yamlConfig.cmake file currently will only be generated when using CMake to build libyaml. The standard build scheme via configure does not build it, though.

However, the yamlConfig.cmake.in appears simple enough as it is. Is there an easy way to generate a fully compliant yamlConfig.cmake from it without changing build systems? Or could possibly the standard build scheme be adjusted to also just build this file?

Just for reference, #99 makes a case in favor of switching build systems to cmake. However, it seems #101, #138, and #141 would need to be addressed first, if they haven't already in the meantime.

florianernst avatar Nov 27 '22 12:11 florianernst