ARPA-SIMC / dballe

Fast on-disk database for meteorological observed and forecast data.
Other
19 stars 6 forks source link

meson: too many deps on pkg-config file #274

Closed spanezz closed 2 years ago

spanezz commented 2 years ago

At the moment pkg-config adds too many dependencies to the pkg-config file. I added them as dependencies to libdballe-dev in debian to be able to build packages that use dballe.

The right thing to do is to fix meson.build to remove those extra dependencies, which are not needed to build on dballe as they're not parte of dballe's API, and then remove the build-deps from debian/control

edigiacomo commented 2 years ago

I don't know if it's related, but it seems that libdballe-dev doesn't have the right dependencies:

$ apt-get install libdballe-dev

$ pkg-config --exists "libdballe >= 8.17" --print-errors
Package sqlite3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `sqlite3.pc'
to the PKG_CONFIG_PATH environment variable
Package 'sqlite3', required by 'libdballe', not found

$ apt-get install libsqlite3-dev

$ pkg-config --exists "libdballe >= 8.17" --print-errors
Package libpq was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpq.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libpq', required by 'libdballe', not found

$ apt-get install libpq-dev

$ pkg-config --exists "libdballe >= 8.17" --print-errors
Package popt was not found in the pkg-config search path.
Perhaps you should add the directory containing `popt.pc'
to the PKG_CONFIG_PATH environment variable
Package 'popt', required by 'libdballe', not found

$ apt-get install libpopt-dev

$ pkg-config --exists "libdballe >= 8.17" --print-errors ; echo $?
0

I think that the 3 packages should be listed in the Depends section of libdballe-dev in debian/control.

spanezz commented 2 years ago

Meanwhile, I'm reading this: https://github.com/mesonbuild/meson/issues/3970

spanezz commented 2 years ago

So it looks like since we build static libraries, Requires.private is needed, and so are the extra dependencies on the -devel package, otherwise it's impossible to use the -devel package to build statically.

This didn't show up when building with autotools because our libdballe.pc.in doesn't have Requires.private, and probably linking statically with that wouldn't have worked