Re: [v4l-utils] [PATCH v10 1/5] Add support for meson building

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

while packaging the v4l-utils master branch for the Ubuntu PPA[1] I noticed two issues:

On 23.02.23 17:44, Laurent Pinchart wrote:
+dep_libbpf = dependency('bpf', required : get_option('bpf'), version : '>=0.7')
+if not dep_libbpf.found()
+    dep_libbpf = cc.find_library('bpf', has_headers: 'bpf/bpf.h', required : get_option('bpf'))
+endif

Ubuntu Jammy contains libbpf 1:0.5.0-1ubuntu22.04.1. Therefore the first dep_libbpf check fails due to the version constraint. But the second check for the header succeeds. Afterwards the build fails due to the too old libbpf.

What's the reason for the fallback? I guess new enough versions of libbpf always ship a pkgconfig file.

+git_sha = run_command(prog_git, '-C', meson.project_source_root(), 'rev-parse', '--short=12', 'HEAD',
+                      check : true).stdout().strip()
+conf.set('GIT_SHA', git_sha)
+git_commit_cnt = run_command(prog_git, '-C', meson.project_source_root(), 'rev-list', '--count', 'HEAD',
+                             check : true).stdout().strip()
+conf.set('GIT_COMMIT_CNT', '-' + git_commit_cnt)
+git_commit_date = run_command(prog_git, '-C', meson.project_source_root(), 'show', '--quiet',
+                              '--date=format-local:%F %T', '--format=%cd',
+                              env : ['TZ=UTC'], check : true).stdout().strip()
+conf.set('GIT_COMMIT_DATE', git_commit_date)

In Debian / Ubuntu we built from a published tarball (created by meson dist). It does not contain a .git directory and therefore those checks fail.

I created a patch to work-around the issue:
https://git.launchpad.net/~libv4l/+git/v4l-utils-packaging/tree/patches/conditional-git-ops.diff

But I'm not too fluent in Meson, yet.


Thanks,
Gregor


[1] https://code.launchpad.net/~libv4l/+recipe/v4l-utils-master



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux