All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ariel D'Alessandro <ariel@vanguardiasur.com.ar>
To: Gregor Jasny <gjasny@googlemail.com>,
	Xavier Claessens <xavier.claessens@collabora.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Ezequiel Garcia <ezequiel@collabora.com>
Cc: kieran.bingham@ideasonboard.com, linux-media@vger.kernel.org,
	hverkuil@xs4all.nl, sean@mess.org, p.zabel@pengutronix.de,
	nicolas@ndufresne.ca,
	nicolas Dufresne <nicolas.dufresne@collabora.com>
Subject: Re: [PATCH v1 1/1] Add support for meson building
Date: Tue, 23 Jun 2020 14:26:40 -0300	[thread overview]
Message-ID: <1586973f-5f69-fed0-4ad8-266cdd8e818b@vanguardiasur.com.ar> (raw)
In-Reply-To: <0d3450f0-8883-e094-3c1b-d8f93c2e4833@googlemail.com>

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

  reply	other threads:[~2020-06-23 17:26 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-18 13:33 [PATCH v1 0/1] Add support for meson building Ariel D'Alessandro
2020-06-18 13:33 ` [PATCH v1 1/1] " Ariel D'Alessandro
2020-06-18 13:57   ` Kieran Bingham
2020-06-18 14:06     ` Laurent Pinchart
2020-06-18 14:11       ` Kieran Bingham
2020-06-19 14:12     ` Ezequiel Garcia
2020-06-19 14:42       ` Laurent Pinchart
2020-06-19 18:40         ` Xavier Claessens
2020-06-20  4:45           ` VDRU VDRU
2020-06-22 18:07           ` Gregor Jasny
2020-06-22 19:09             ` Gregor Jasny
2020-06-23 17:26               ` Ariel D'Alessandro [this message]
2020-06-24 19:46                 ` Gregor Jasny
2020-06-25 18:32                   ` Ariel D'Alessandro
2020-06-29 18:44                     ` Gregor Jasny
2020-07-03  2:15                       ` Ariel D'Alessandro
2020-06-25 18:52                 ` Ariel D'Alessandro
2020-06-29 18:56                   ` Gregor Jasny
2020-07-08  5:48                     ` Ariel D'Alessandro
2020-07-16 19:48                       ` Gregor Jasny
2020-06-19 19:04       ` Xavier Claessens
2020-06-22 19:19     ` Ariel D'Alessandro
2020-06-19 12:10 ` [PATCH v1 0/1] " Sean Young
2020-06-19 14:09   ` Ezequiel Garcia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1586973f-5f69-fed0-4ad8-266cdd8e818b@vanguardiasur.com.ar \
    --to=ariel@vanguardiasur.com.ar \
    --cc=ezequiel@collabora.com \
    --cc=gjasny@googlemail.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=nicolas.dufresne@collabora.com \
    --cc=nicolas@ndufresne.ca \
    --cc=p.zabel@pengutronix.de \
    --cc=sean@mess.org \
    --cc=xavier.claessens@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.