All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/libqmi: drop unrecognized option
@ 2021-03-29 21:19 Fabrice Fontaine
  2021-03-29 21:19 ` [Buildroot] [PATCH 2/2] package/libqmi: needs headers >= 4.14 Fabrice Fontaine
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Fabrice Fontaine @ 2021-03-29 21:19 UTC (permalink / raw)
  To: buildroot

--enable-more-warnings has been dropped since version 1.26.0 and
https://github.com/freedesktop/libqmi/commit/9f31a45d5fc137431705d47b83669f35259932b4

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/libqmi/libqmi.mk | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/package/libqmi/libqmi.mk b/package/libqmi/libqmi.mk
index b02312d702..998952e47d 100644
--- a/package/libqmi/libqmi.mk
+++ b/package/libqmi/libqmi.mk
@@ -13,9 +13,6 @@ LIBQMI_INSTALL_STAGING = YES
 
 LIBQMI_DEPENDENCIES = libglib2
 
-# we don't want -Werror
-LIBQMI_CONF_OPTS = --enable-more-warnings=no
-
 # if libgudev available, request udev support for a better
 # qmi-firmware-update experience
 ifeq ($(BR2_PACKAGE_LIBGUDEV),y)
-- 
2.30.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 2/2] package/libqmi: needs headers >= 4.14
  2021-03-29 21:19 [Buildroot] [PATCH 1/2] package/libqmi: drop unrecognized option Fabrice Fontaine
@ 2021-03-29 21:19 ` Fabrice Fontaine
  2021-03-29 21:40   ` Aleksander Morgado
  2021-03-29 21:46 ` [Buildroot] [PATCH 1/2] package/libqmi: drop unrecognized option Aleksander Morgado
  2021-04-03 10:33 ` Peter Korsgaard
  2 siblings, 1 reply; 9+ messages in thread
From: Fabrice Fontaine @ 2021-03-29 21:19 UTC (permalink / raw)
  To: buildroot

libqmi unconditionnally uses ARPHRD_RAWIP since version 1.28.0 and
https://github.com/freedesktop/libqmi/commit/4085a2d6b771a40fb637433ed6a05b9d5d4d94b9
https://github.com/freedesktop/libqmi/commit/19f4b39ee85500e7e868b8a100fba19c04fb3c30

However, ARPHRD_RAWIP is only available since kernel 4.14 and
https://github.com/torvalds/linux/commit/cdf4969c42a6c1a376dd03a9e846cf638d3cd4b1

Fixes:
 - http://autobuild.buildroot.org/results/c8853b7161bd85d46c1282c6c097e7ef4042ae68

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/libqmi/Config.in        | 6 ++++--
 package/modem-manager/Config.in | 5 +++++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/package/libqmi/Config.in b/package/libqmi/Config.in
index f1d111b7c9..53400acb0a 100644
--- a/package/libqmi/Config.in
+++ b/package/libqmi/Config.in
@@ -3,6 +3,7 @@ config BR2_PACKAGE_LIBQMI
 	depends on BR2_USE_WCHAR # libglib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
 	depends on BR2_USE_MMU # libglib2
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
 	select BR2_PACKAGE_LIBGLIB2
 	help
 	  libqmi is a glib-based library for talking to WWAN modems and
@@ -10,6 +11,7 @@ config BR2_PACKAGE_LIBQMI
 
 	  http://www.freedesktop.org/wiki/Software/libqmi/
 
-comment "libqmi needs a toolchain w/ wchar, threads"
+comment "libqmi needs a toolchain w/ wchar, threads, headers >= 4.14"
 	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
diff --git a/package/modem-manager/Config.in b/package/modem-manager/Config.in
index c4c723776d..688fcc4c3b 100644
--- a/package/modem-manager/Config.in
+++ b/package/modem-manager/Config.in
@@ -22,9 +22,14 @@ config BR2_PACKAGE_MODEM_MANAGER_LIBMBIM
 
 config BR2_PACKAGE_MODEM_MANAGER_LIBQMI
 	bool "QMI support"
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
 	select BR2_PACKAGE_LIBQMI
 	help
 	  This option enables support for QMI protocol
+
+comment "QMI support needs a toolchain w/ headers >= 4.14"
+	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14
+
 endif
 
 comment "modemmanager needs a toolchain w/ wchar, threads"
-- 
2.30.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 2/2] package/libqmi: needs headers >= 4.14
  2021-03-29 21:19 ` [Buildroot] [PATCH 2/2] package/libqmi: needs headers >= 4.14 Fabrice Fontaine
@ 2021-03-29 21:40   ` Aleksander Morgado
  2021-03-29 21:44     ` Fabrice Fontaine
  0 siblings, 1 reply; 9+ messages in thread
From: Aleksander Morgado @ 2021-03-29 21:40 UTC (permalink / raw)
  To: buildroot

Hey Fabrice,

On Mon, Mar 29, 2021 at 11:23 PM Fabrice Fontaine
<fontaine.fabrice@gmail.com> wrote:
>
> libqmi unconditionnally uses ARPHRD_RAWIP since version 1.28.0 and
> https://github.com/freedesktop/libqmi/commit/4085a2d6b771a40fb637433ed6a05b9d5d4d94b9
> https://github.com/freedesktop/libqmi/commit/19f4b39ee85500e7e868b8a100fba19c04fb3c30
>
> However, ARPHRD_RAWIP is only available since kernel 4.14 and
> https://github.com/torvalds/linux/commit/cdf4969c42a6c1a376dd03a9e846cf638d3cd4b1
>
> Fixes:
>  - http://autobuild.buildroot.org/results/c8853b7161bd85d46c1282c6c097e7ef4042ae68
>

This is totally not intentional; the ARPHRD_RAWIP symbol is used in
the rmnet backend, and the rmnet backend itself should only be used if
the kernel has rmnet support, which we look for at configure time with
the following check:

AC_EGREP_HEADER([ifla_rmnet_flags],
                [linux/if_link.h],
                [enable_rmnet_support=yes],
                [enable_rmnet_support=no])

We should probably improve that check to also include a lookup for the
ARPHRD_RAWIP symbol.
What do you think?

-- 
Aleksander
https://aleksander.es

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 2/2] package/libqmi: needs headers >= 4.14
  2021-03-29 21:40   ` Aleksander Morgado
@ 2021-03-29 21:44     ` Fabrice Fontaine
  2021-03-29 22:13       ` Aleksander Morgado
  0 siblings, 1 reply; 9+ messages in thread
From: Fabrice Fontaine @ 2021-03-29 21:44 UTC (permalink / raw)
  To: buildroot

Hi Aleksander,

Le lun. 29 mars 2021 ? 23:41, Aleksander Morgado
<aleksander@aleksander.es> a ?crit :
>
> Hey Fabrice,
>
> On Mon, Mar 29, 2021 at 11:23 PM Fabrice Fontaine
> <fontaine.fabrice@gmail.com> wrote:
> >
> > libqmi unconditionnally uses ARPHRD_RAWIP since version 1.28.0 and
> > https://github.com/freedesktop/libqmi/commit/4085a2d6b771a40fb637433ed6a05b9d5d4d94b9
> > https://github.com/freedesktop/libqmi/commit/19f4b39ee85500e7e868b8a100fba19c04fb3c30
> >
> > However, ARPHRD_RAWIP is only available since kernel 4.14 and
> > https://github.com/torvalds/linux/commit/cdf4969c42a6c1a376dd03a9e846cf638d3cd4b1
> >
> > Fixes:
> >  - http://autobuild.buildroot.org/results/c8853b7161bd85d46c1282c6c097e7ef4042ae68
> >
>
> This is totally not intentional; the ARPHRD_RAWIP symbol is used in
> the rmnet backend, and the rmnet backend itself should only be used if
> the kernel has rmnet support, which we look for at configure time with
> the following check:
>
> AC_EGREP_HEADER([ifla_rmnet_flags],
>                 [linux/if_link.h],
>                 [enable_rmnet_support=yes],
>                 [enable_rmnet_support=no])
>
> We should probably improve that check to also include a lookup for the
> ARPHRD_RAWIP symbol.
> What do you think?
Thanks for your feedback, I wasn't sure if it was intentional or not
by reading the two commit messages.
I'll set this patch as rejected on patchwork.
Feel free to send another patch as avoiding this dependency on kernel
4.14 would be great indeed.
>
> --
> Aleksander
> https://aleksander.es
Best Regards,

Fabrice

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 1/2] package/libqmi: drop unrecognized option
  2021-03-29 21:19 [Buildroot] [PATCH 1/2] package/libqmi: drop unrecognized option Fabrice Fontaine
  2021-03-29 21:19 ` [Buildroot] [PATCH 2/2] package/libqmi: needs headers >= 4.14 Fabrice Fontaine
@ 2021-03-29 21:46 ` Aleksander Morgado
  2021-03-30 19:37   ` Yann E. MORIN
  2021-04-03 10:33 ` Peter Korsgaard
  2 siblings, 1 reply; 9+ messages in thread
From: Aleksander Morgado @ 2021-03-29 21:46 UTC (permalink / raw)
  To: buildroot

Hey,

On Mon, Mar 29, 2021 at 11:22 PM Fabrice Fontaine
<fontaine.fabrice@gmail.com> wrote:
>
> --enable-more-warnings has been dropped since version 1.26.0 and
> https://github.com/freedesktop/libqmi/commit/9f31a45d5fc137431705d47b83669f35259932b4
>

For some context, the build switched to
AX_COMPILER_FLAGS()+AX_IS_RELEASE() so, when building from a release
tarball, the build will default to --enable-compile-warnings=yes, and
when building from a git checkout, the build will default to
--enable-compile-warnings=error. As long as the buildroot makefile
relies on stable release tarballs, -Werror should be always implicitly
disabled.

> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/libqmi/libqmi.mk | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/package/libqmi/libqmi.mk b/package/libqmi/libqmi.mk
> index b02312d702..998952e47d 100644
> --- a/package/libqmi/libqmi.mk
> +++ b/package/libqmi/libqmi.mk
> @@ -13,9 +13,6 @@ LIBQMI_INSTALL_STAGING = YES
>
>  LIBQMI_DEPENDENCIES = libglib2
>
> -# we don't want -Werror
> -LIBQMI_CONF_OPTS = --enable-more-warnings=no
> -
>  # if libgudev available, request udev support for a better
>  # qmi-firmware-update experience
>  ifeq ($(BR2_PACKAGE_LIBGUDEV),y)
> --
> 2.30.2
>


-- 
Aleksander
https://aleksander.es

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 2/2] package/libqmi: needs headers >= 4.14
  2021-03-29 21:44     ` Fabrice Fontaine
@ 2021-03-29 22:13       ` Aleksander Morgado
  0 siblings, 0 replies; 9+ messages in thread
From: Aleksander Morgado @ 2021-03-29 22:13 UTC (permalink / raw)
  To: buildroot

Hey Fabrice

> > On Mon, Mar 29, 2021 at 11:23 PM Fabrice Fontaine
> > <fontaine.fabrice@gmail.com> wrote:
> > >
> > > libqmi unconditionnally uses ARPHRD_RAWIP since version 1.28.0 and
> > > https://github.com/freedesktop/libqmi/commit/4085a2d6b771a40fb637433ed6a05b9d5d4d94b9
> > > https://github.com/freedesktop/libqmi/commit/19f4b39ee85500e7e868b8a100fba19c04fb3c30
> > >
> > > However, ARPHRD_RAWIP is only available since kernel 4.14 and
> > > https://github.com/torvalds/linux/commit/cdf4969c42a6c1a376dd03a9e846cf638d3cd4b1
> > >
> > > Fixes:
> > >  - http://autobuild.buildroot.org/results/c8853b7161bd85d46c1282c6c097e7ef4042ae68
> > >
> >
> > This is totally not intentional; the ARPHRD_RAWIP symbol is used in
> > the rmnet backend, and the rmnet backend itself should only be used if
> > the kernel has rmnet support, which we look for at configure time with
> > the following check:
> >
> > AC_EGREP_HEADER([ifla_rmnet_flags],
> >                 [linux/if_link.h],
> >                 [enable_rmnet_support=yes],
> >                 [enable_rmnet_support=no])
> >
> > We should probably improve that check to also include a lookup for the
> > ARPHRD_RAWIP symbol.
> > What do you think?
> Thanks for your feedback, I wasn't sure if it was intentional or not
> by reading the two commit messages.
> I'll set this patch as rejected on patchwork.
> Feel free to send another patch as avoiding this dependency on kernel
> 4.14 would be great indeed.

Oh, I don't think the issue is related to needing 4.14 or newer. The
build you posted as failing was using (if I'm reading it correctly in
the config file) kernel 5.11 headers. The ARPHRD_RAWIP symbol was
indeed introduced in 4.14, but the ifla_rmnet_flags (what we check for
during configure) were introduced much later in 4.17.

The problem is, I believe, that we're including libc's if_arp.h, and
that one may not have that symbol defined yet, and so it failed the
build. I'll fix that in upstream and provide a patch here.

-- 
Aleksander
https://aleksander.es

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 1/2] package/libqmi: drop unrecognized option
  2021-03-29 21:46 ` [Buildroot] [PATCH 1/2] package/libqmi: drop unrecognized option Aleksander Morgado
@ 2021-03-30 19:37   ` Yann E. MORIN
  2021-03-30 19:51     ` Aleksander Morgado
  0 siblings, 1 reply; 9+ messages in thread
From: Yann E. MORIN @ 2021-03-30 19:37 UTC (permalink / raw)
  To: buildroot

On 2021-03-29 23:46 +0200, Aleksander Morgado spake thusly:
> Hey,
> 
> On Mon, Mar 29, 2021 at 11:22 PM Fabrice Fontaine
> <fontaine.fabrice@gmail.com> wrote:
> >
> > --enable-more-warnings has been dropped since version 1.26.0 and
> > https://github.com/freedesktop/libqmi/commit/9f31a45d5fc137431705d47b83669f35259932b4
> >
> 
> For some context, the build switched to
> AX_COMPILER_FLAGS()+AX_IS_RELEASE() so, when building from a release
> tarball, the build will default to --enable-compile-warnings=yes, and
> when building from a git checkout, the build will default to
> --enable-compile-warnings=error. As long as the buildroot makefile
> relies on stable release tarballs,

And even when working from a git tree, we would not have the .git
directory anyway, so I suppose we'd end up in the "release tarball"
case.

Only people working with LIBQMI_OVERRIDE_SRCDIR set pointing to a
local git clone would fall back into the "defaults to Werror" state.

> -Werror should be always implicitly
> disabled.

But there is a --disable-Werror option, and I think we should use it
unconditionally.

I've done that now, and applied to master, thanks.

Regards,
Yann E. MORIN.

> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> >  package/libqmi/libqmi.mk | 3 ---
> >  1 file changed, 3 deletions(-)
> >
> > diff --git a/package/libqmi/libqmi.mk b/package/libqmi/libqmi.mk
> > index b02312d702..998952e47d 100644
> > --- a/package/libqmi/libqmi.mk
> > +++ b/package/libqmi/libqmi.mk
> > @@ -13,9 +13,6 @@ LIBQMI_INSTALL_STAGING = YES
> >
> >  LIBQMI_DEPENDENCIES = libglib2
> >
> > -# we don't want -Werror
> > -LIBQMI_CONF_OPTS = --enable-more-warnings=no
> > -
> >  # if libgudev available, request udev support for a better
> >  # qmi-firmware-update experience
> >  ifeq ($(BR2_PACKAGE_LIBGUDEV),y)
> > --
> > 2.30.2
> >
> 
> 
> -- 
> Aleksander
> https://aleksander.es
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 1/2] package/libqmi: drop unrecognized option
  2021-03-30 19:37   ` Yann E. MORIN
@ 2021-03-30 19:51     ` Aleksander Morgado
  0 siblings, 0 replies; 9+ messages in thread
From: Aleksander Morgado @ 2021-03-30 19:51 UTC (permalink / raw)
  To: buildroot

Hey,

> > -Werror should be always implicitly
> > disabled.
>
> But there is a --disable-Werror option, and I think we should use it
> unconditionally.
>
> I've done that now, and applied to master, thanks.

That is also fine, yes :)

-- 
Aleksander
https://aleksander.es

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 1/2] package/libqmi: drop unrecognized option
  2021-03-29 21:19 [Buildroot] [PATCH 1/2] package/libqmi: drop unrecognized option Fabrice Fontaine
  2021-03-29 21:19 ` [Buildroot] [PATCH 2/2] package/libqmi: needs headers >= 4.14 Fabrice Fontaine
  2021-03-29 21:46 ` [Buildroot] [PATCH 1/2] package/libqmi: drop unrecognized option Aleksander Morgado
@ 2021-04-03 10:33 ` Peter Korsgaard
  2 siblings, 0 replies; 9+ messages in thread
From: Peter Korsgaard @ 2021-04-03 10:33 UTC (permalink / raw)
  To: buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > --enable-more-warnings has been dropped since version 1.26.0 and
 > https://github.com/freedesktop/libqmi/commit/9f31a45d5fc137431705d47b83669f35259932b4

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2020.11.x and 2021.02.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-04-03 10:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-29 21:19 [Buildroot] [PATCH 1/2] package/libqmi: drop unrecognized option Fabrice Fontaine
2021-03-29 21:19 ` [Buildroot] [PATCH 2/2] package/libqmi: needs headers >= 4.14 Fabrice Fontaine
2021-03-29 21:40   ` Aleksander Morgado
2021-03-29 21:44     ` Fabrice Fontaine
2021-03-29 22:13       ` Aleksander Morgado
2021-03-29 21:46 ` [Buildroot] [PATCH 1/2] package/libqmi: drop unrecognized option Aleksander Morgado
2021-03-30 19:37   ` Yann E. MORIN
2021-03-30 19:51     ` Aleksander Morgado
2021-04-03 10:33 ` Peter Korsgaard

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.