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

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

 



Hi Gregor,

On Sun, Mar 12, 2023 at 03:31:29PM +0100, Gregor Jasny wrote:
> 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.

autoconf didn't have any fallback as far as I can tell, so I think we
could drop it here too. As I can't easily test this on Ubuntu, would you
be able to send a patch ?

> > +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.

You're doing quite fine :-) The patch looks good, except for

if fs.is_dir('.gitd')

which should be '.git' unless there's something I'm missing. Will you
submit the patch to the linux-media mailing list ?

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

-- 
Regards,

Laurent Pinchart



[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