Skip to contentSkip to conversation

package/libqmi: drop unrecognized option

PATCH New Fabrice Fontaine 4 participants 9 messages Mar 29, 2021 – Apr 3, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/libqmi: drop unrecognized option

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

---
 package/libqmi/libqmi.mk | 3 ---
 1 file changed, 3 deletions(-)
package/libqmi/libqmi.mk +0 -3
index b02312d702..998952e47d 100644
@@ -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)
Signature · 1 line
2.30.2
#1 lore raw

PATCH 2/2 package/libqmi: needs headers >= 4.14

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

---
 package/libqmi/Config.in        | 6 ++++--
 package/modem-manager/Config.in | 5 +++++
 2 files changed, 9 insertions(+), 2 deletions(-)
package/libqmi/Config.in +4 -2
index f1d111b7c9..53400acb0a 100644
@@ -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
package/modem-manager/Config.in +5 -0
index c4c723776d..688fcc4c3b 100644
@@ -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"
Signature · 1 line
2.30.2
#2 lore raw

PATCH 2/2 package/libqmi: needs headers >= 4.14

Hey Fabrice,

Quoted 11 lines · Fabrice Fontaine

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?

Signature · 2 lines
Aleksander
https://aleksander.es
#3 lore raw

PATCH 2/2 package/libqmi: needs headers >= 4.14

Hi Aleksander,

Le lun. 29 mars 2021 ? 23:41, Aleksander Morgado
<[email protected]> a ?crit :

Quoted 22 lines

Hey Fabrice,

Quoted 11 lines · Fabrice Fontaine

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:

Quoted 8 lines

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.

Quoted 4 lines

--
Aleksander
https://aleksander.es

Best Regards,

Fabrice

#4 lore raw

PATCH 2/2 package/libqmi: needs headers >= 4.14

Hey Fabrice

Quoted 24 lines
Quoted 24 lines
Quoted 11 lines · Fabrice Fontaine

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])
Quoted 8 lines
Quoted 3 lines

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.

Signature · 2 lines
Aleksander
https://aleksander.es
#5 lore raw

PATCH 1/2 package/libqmi: drop unrecognized option

In reply to Fabrice Fontaine

Hey,

Quoted 4 lines · Fabrice Fontaine

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

Quoted 22 lines
---
 package/libqmi/libqmi.mk | 3 ---
 1 file changed, 3 deletions(-)
package/libqmi/libqmi.mk +0 -4
index b02312d702..998952e47d 100644
@@ -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

Signature · 2 lines
Aleksander
https://aleksander.es
#6 lore raw

PATCH 1/2 package/libqmi: drop unrecognized option

On 2021-03-29 23:46 +0200, Aleksander Morgado spake thusly:

Quoted 9 lines

Hey,

Quoted 4 lines · Fabrice Fontaine

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

Quoted 6 lines

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.

Quoted 2 lines

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

Quoted 31 lines
Quoted 22 lines
---
 package/libqmi/libqmi.mk | 3 ---
 1 file changed, 3 deletions(-)
package/libqmi/libqmi.mk +0 -4
index b02312d702..998952e47d 100644
@@ -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

Signature · 6 lines
Aleksander
https://aleksander.es
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#7 lore raw

PATCH 1/2 package/libqmi: drop unrecognized option

Hey,

Quoted 7 lines
Quoted 2 lines

-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 :)

Signature · 2 lines
Aleksander
https://aleksander.es
#8 lore raw

PATCH 1/2 package/libqmi: drop unrecognized option

In reply to Fabrice Fontaine
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabrice" == Fabrice Fontaine <[email protected]> writes:

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

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

Signature · 1 line
Bye, Peter Korsgaard