[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <59ba7a94-17b9-485f-aa6d-14e4f01a7a39@leemhuis.info>
Date: Wed, 23 Apr 2025 15:28:07 +0200
From: Thorsten Leemhuis <linux@...mhuis.info>
To: Jakub Kicinski <kuba@...nel.org>, davem@...emloft.net
Cc: netdev@...r.kernel.org, edumazet@...gle.com, pabeni@...hat.com,
andrew+netdev@...n.ch, horms@...nel.org,
Kory Maincent <kory.maincent@...tlin.com>, donald.hunter@...il.com,
jacob.e.keller@...el.com
Subject: Re: [PATCH net-next] tools: ynl: add missing header deps
On 19.04.25 01:49, Jakub Kicinski wrote:
> Various new families and my recent work on rtnetlink missed
> adding dependencies on C headers. If the system headers are
> up to date or don't include a given header at all this doesn't
> make a difference. But if the system headers are in place but
> stale - compilation will break.
>
> Reported-by: Kory Maincent <kory.maincent@...tlin.com>
> Fixes: 29d34a4d785b ("tools: ynl: generate code for rt-addr and add a sample")
> Link: https://lore.kernel.org/20250418190431.69c10431@kmaincent-XPS-13-7390
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
Lo! I ran into a ynl build error today and I wonder if I'm doing
something wrong or if something is wrong with this or an related patch
that recently landed in -next.
I'm building -next rpms daily for Fedora using a .spec file that is
pretty close to the one Fedora uses. Everything worked fine yesterday,
when this patch showed up in -next. Today's build failed like this:
"""
+ pushd tools/net/ynl
~/build/BUILD/kernel-next-20250423/linux-6.15.0-0.0.next.20250423.130.vanilla.fc40.x86_64/tools/net/ynl ~/build/BUILD/kernel-next-20250423/linux-6.15.0-0.0.next.20250423.130.vanilla.fc40.x86_64
+ export PIP_CONFIG_FILE=/tmp/pip.config
+ PIP_CONFIG_FILE=/tmp/pip.config
+ cat
+ CFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection '
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes '
+ EXTRA_CFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection '
+ /usr/bin/make -s 'HOSTCFLAGS=-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection ' 'HOSTLDFLAGS=-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes ' -s -j32 DESTDIR=/builddir/build/BUILDROOT/kernel-6.15.0-0.0.next.20250423.130.vanilla.fc40.x86_64 install
GEN devlink-user.c
[...]
CC ethtool-user.o
In file included from ovpn-user.h:12,
from ovpn-user.c:8:
/usr/include/linux/ovpn.h:14:6: error: redeclaration of ‘enum ovpn_cipher_alg’
14 | enum ovpn_cipher_alg {
| ^~~~~~~~~~~~~~~
In file included from <command-line>:
./../../../../include/uapi//linux/ovpn.h:14:6: note: originally defined here
14 | enum ovpn_cipher_alg {
| ^~~~~~~~~~~~~~~
/usr/include/linux/ovpn.h:15:9: error: redeclaration of enumerator ‘OVPN_CIPHER_ALG_NONE’
15 | OVPN_CIPHER_ALG_NONE,
| ^~~~~~~~~~~~~~~~~~~~
./../../../../include/uapi//linux/ovpn.h:15:9: note: previous definition of ‘OVPN_CIPHER_ALG_NONE’ with type ‘enum ovpn_cipher_alg’
15 | OVPN_CIPHER_ALG_NONE,
| ^~~~~~~~~~~~~~~~~~~~
/usr/include/linux/ovpn.h:16:9: error: redeclaration of enumerator ‘OVPN_CIPHER_ALG_AES_GCM’
16 | OVPN_CIPHER_ALG_AES_GCM,
| ^~~~~~~~~~~~~~~~~~~~~~~
./../../../../include/uapi//linux/ovpn.h:16:9: note: previous definition of ‘OVPN_CIPHER_ALG_AES_GCM’ with type ‘enum ovpn_cipher_alg’
16 | OVPN_CIPHER_ALG_AES_GCM,
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/linux/ovpn.h:17:9: error: redeclaration of enumerator ‘OVPN_CIPHER_ALG_CHACHA20_POLY1305’
17 | OVPN_CIPHER_ALG_CHACHA20_POLY1305,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./../../../../include/uapi//linux/ovpn.h:17:9: note: previous definition of ‘OVPN_CIPHER_ALG_CHACHA20_POLY1305’ with type ‘enum ovpn_cipher_alg’
17 | OVPN_CIPHER_ALG_CHACHA20_POLY1305,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[...]
"""
Full log (with a lot more similar errors):
https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/next/fedora-40-x86_64/08955038-next-next-all/builder-live.log.gz
I wondered why this started to happen today instead of yesterday --
and it turns out that's because the build approach I use installed the
kernel-headers package (the one that contains the files that end up in
/usr/include/ ) from yesterday -next build. So I guess the same problem
could happen to other people as well once they install new enough
headers; at the same time I wonder if the kernel.spec file from Fedora
is doing something wrong/stupid that causes this problem to happen.
Does anyone know why this problem occurs? If not I guess I have to
investigate myself, but I thought it was worth asking here first.
Ciao, Thorsten
> tools/net/ynl/Makefile.deps | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tools/net/ynl/Makefile.deps b/tools/net/ynl/Makefile.deps
> index 385783489f84..8b7bf673b686 100644
> --- a/tools/net/ynl/Makefile.deps
> +++ b/tools/net/ynl/Makefile.deps
> @@ -20,15 +20,18 @@ CFLAGS_ethtool:=$(call get_hdr_inc,_LINUX_ETHTOOL_H,ethtool.h) \
> $(call get_hdr_inc,_LINUX_ETHTOOL_NETLINK_H_,ethtool_netlink.h) \
> $(call get_hdr_inc,_LINUX_ETHTOOL_NETLINK_GENERATED_H,ethtool_netlink_generated.h)
> CFLAGS_handshake:=$(call get_hdr_inc,_LINUX_HANDSHAKE_H,handshake.h)
> +CFLAGS_lockd_netlink:=$(call get_hdr_inc,_LINUX_LOCKD_NETLINK_H,lockd_netlink.h)
> CFLAGS_mptcp_pm:=$(call get_hdr_inc,_LINUX_MPTCP_PM_H,mptcp_pm.h)
> CFLAGS_net_shaper:=$(call get_hdr_inc,_LINUX_NET_SHAPER_H,net_shaper.h)
> CFLAGS_netdev:=$(call get_hdr_inc,_LINUX_NETDEV_H,netdev.h)
> CFLAGS_nl80211:=$(call get_hdr_inc,__LINUX_NL802121_H,nl80211.h)
> CFLAGS_nlctrl:=$(call get_hdr_inc,__LINUX_GENERIC_NETLINK_H,genetlink.h)
> CFLAGS_nfsd:=$(call get_hdr_inc,_LINUX_NFSD_NETLINK_H,nfsd_netlink.h)
> +CFLAGS_ovpn:=$(call get_hdr_inc,_LINUX_OVPN,ovpn.h)
> CFLAGS_ovs_datapath:=$(call get_hdr_inc,__LINUX_OPENVSWITCH_H,openvswitch.h)
> CFLAGS_ovs_flow:=$(call get_hdr_inc,__LINUX_OPENVSWITCH_H,openvswitch.h)
> CFLAGS_ovs_vport:=$(call get_hdr_inc,__LINUX_OPENVSWITCH_H,openvswitch.h)
> -CFLAGS_rt-addr:=$(call get_hdr_inc,__LINUX_RTNETLINK_H,rtnetlink.h)
> +CFLAGS_rt-addr:=$(call get_hdr_inc,__LINUX_RTNETLINK_H,rtnetlink.h) \
> + $(call get_hdr_inc,__LINUX_IF_ADDR_H,if_addr.h)
> CFLAGS_rt-route:=$(call get_hdr_inc,__LINUX_RTNETLINK_H,rtnetlink.h)
> CFLAGS_tcp_metrics:=$(call get_hdr_inc,_LINUX_TCP_METRICS_H,tcp_metrics.h)
Powered by blists - more mailing lists