Hi Gregor, Thanks for the report. On 6/22/20 4:09 PM, Gregor Jasny wrote: > Hello, > > On 6/22/20 8:07 PM, Gregor Jasny wrote: >> I'll try to adjust the Debian / Ubuntu packaging scripts to meson. > I tried to adjust the Ubuntu v4l-utils development scripts on top of the > ariel/mesonbuild-v4 git branch. > > On Unbuntu 20.04 I did the following: > > mkdir v4l-meson > cd v4l-meson > git clone https://gitlab.com/adalessandro/v4l-utils.git > git clone https://git.launchpad.net/\~libv4l/+git/v4l-utils-packaging > cd v4l-utils > git checkout ariel/mesonbuild-v4 Let's work on top of this branch: https://gitlab.com/adalessandro/v4l-utils/-/tree/v4l-utils-1.20.0-meson-v1 This is the one related to the submitted patch. Further changes will be pushed to this branch. > ln -s ../v4l-utils-packaging debian > cd debian > git checkout meson-build > cd .. > dpkg-buildpackage -uc -b -rfakeroot # install build-essential + missing > > I noticed the following: > * library symlinks are not in place > see https://packages.debian.org/sid/amd64/libv4l-0/filelist Right. Each library target should have soversion and version set in order to create the proper symlinks. As follows: diff --git a/lib/libdvbv5/meson.build b/lib/libdvbv5/meson.build index 6bbde1b0..8854a801 100644 --- a/lib/libdvbv5/meson.build +++ b/lib/libdvbv5/meson.build @@ -137,6 +137,8 @@ libdvbv5_c_args = [ libdvbv5 = library('dvbv5', libdvbv5_sources, + soversion: '0', + version: '0.0.0', install : true, dependencies : libdvbv5_deps, c_args : libdvbv5_c_args, BTW, shall we set these fields in meson with the proper version tag? > > * static libraries are missing Libraries are defined in the meson scripts as `library`, so they can be built as static, shared or both, depending on the configuration option `default_library` (defaults to shared). I think this is fine and we should explicitly set the option -Ddefault_library=both. For example, in v4l-utils-packaging: diff --git a/rules b/rules index 60f86bf..84a4abb 100755 --- a/rules +++ b/rules @@ -8,6 +8,7 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow #CONFIGURE_FLAGS += --enable-doxygen-man --disable-doxygen-ps --disable-doxygen-pdf CONFIGURE_FLAGS += -Dqvidcap=disabled CONFIGURE_FLAGS += -Dbpf=disabled +CONFIGURE_FLAGS += -Ddefault_library=both %: dh $@ --buildsystem=meson+ninja > > * bfd sources did not compile properly (now disabled in my repo): > >> cd obj-x86_64-linux-gnu && LC_ALL=C.UTF-8 meson .. --wrap-mode=nodownload >> --buildtype=plain --prefix=/usr --sysconfdir=/etc --localstatedir=/var >> --libdir=lib/x86_64-linux-gnu -Dlibv4lconvertsubdir=libv4lconvert0 >> -Dqvidcap=disabled >> >> [122/274] /usr/bin/meson --internal exe --unpickle >> /home/gregorj/src/v4l-meson/v4l-utils/obj-x86_64-linux-gnu/meson-private/meson_exe_clang_8e74c7d634462a79ae20aa67cb5c690cf72447f7.dat >> >> FAILED: utils/keytable/bpf_protocols/manchester.o /usr/bin/meson --internal >> exe --unpickle >> /home/gregorj/src/v4l-meson/v4l-utils/obj-x86_64-linux-gnu/meson-private/meson_exe_clang_8e74c7d634462a79ae20aa67cb5c690cf72447f7.dat >> >> In file included from ../utils/keytable/bpf_protocols/manchester.c:5: >> In file included from /usr/include/linux/lirc.h:10: >> /usr/include/linux/types.h:5:10: fatal error: 'asm/types.h' file not found >> #include <asm/types.h> >> ^~~~~~~~~~~~~ >> 1 error generated. Fixed. Include directories were omitted by clang as they were all passed as a single string from the script's output. This fixes the issue: diff --git a/utils/keytable/bpf_protocols/meson.build b/utils/keytable/bpf_protocols/meson.build index 2f1ed072..88fb6cdf 100644 --- a/utils/keytable/bpf_protocols/meson.build +++ b/utils/keytable/bpf_protocols/meson.build @@ -22,7 +22,7 @@ foreach file : bpf_protocols_files input : input, command : [ prog_clang.path(), - clang_sys_includes.stdout().strip(), + clang_sys_includes.stdout().split(), '-D__linux__', '-target', 'bpf', '-O2', '-c', '@INPUT@', '-o', '@OUTPUT@', > > * doxygen targets are missing > see > https://gitlab.com/adalessandro/v4l-utils/-/blob/ariel/mesonbuild-v4/m4/ax_prog_doxygen.m4 Will check. Regards, Ariel