Netdev List
 help / color / mirror / Atom feed
* building ynl afaics requires updating the UAPI headers first
@ 2026-06-18 13:39 Thorsten Leemhuis
  2026-06-19  0:06 ` Jakub Kicinski
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Leemhuis @ 2026-06-18 13:39 UTC (permalink / raw)
  To: Jakub Kicinski, Donald Hunter; +Cc: netdev, Riana Tauro

Hi Jakub, Donald! During the past few weeks I two or three times ran
into errors when building ynl as part of my daily -mainline/-next builds
based on a srpm pretty close to the kernel srpm used in Fedora rawhide.
Today I for example ran into this:

"""
> [...]
>         GEN_RST team.rst                                                                                                            
>         GEN_RST wireguard.rst                                                                                                       
>         CC binder-user.o                                                                                                            
>         CC dev-energymodel-user.o                                                                                                   
>         CC devlink-user.o                                                                                                           
>         CC dpll-user.o                                                                                                              
>         CC drm_ras-user.o                                                                                                           
> drm_ras-user.c:19:10: error: ‘DRM_RAS_CMD_CLEAR_ERROR_COUNTER’ undeclared here (not in a function); did you mean ‘DRM_RAS_CMD_GET_ER
> ROR_COUNTER’?                                                                                                                       
>    19 |         [DRM_RAS_CMD_CLEAR_ERROR_COUNTER] = "clear-error-counter",                                                          
>       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                    
>       |          DRM_RAS_CMD_GET_ERROR_COUNTER                                                                                      
> drm_ras-user.c:19:10: error: array index in initializer not of integer type                                                         
> drm_ras-user.c:19:10: note: (near initialization for ‘drm_ras_op_strmap’)                                                           
> make[1]: *** [Makefile:52: drm_ras-user.o] Error 1                                                                                  
> make[1]: *** Waiting for unfinished jobs....                                                                                        
> make[1]: Leaving directory '/home/kbuilder/ark-vanilla/linux-knurd42/tools/net/ynl/generated'                                       
> make: *** [Makefile:28: generated] Error 2                                                                                          
> make: Leaving directory '/home/kbuilder/ark-vanilla/linux-knurd42/tools/net/ynl
"""

DRM_RAS_CMD_CLEAR_ERROR_COUNTER was introduced to mainline yesterday as
ee18d39a087792 ("drm/drm_ras: Add clear-error-counter netlink command to
drm_ras") [v7.1-post].

I finally looked closer today and noticed how to prevent this: update
the kernel's UAPI files (e.g. the stuff that lives in /usr/include/) on
the builder. Thing is: that's basically impossible to do from a srpm, as
those should not change the build environment and can't even when
working as non-root.

Note sure if relevant and just a shot in the dark, so maybe ignore the
following:

While investigating this I noticed this comment in
tools/net/ynl/Makefile.deps:

"""
> # Try to include uAPI headers from the kernel uapi/ path.
> # Most code under tools/ requires the respective kernel uAPI headers
> # to be copied to tools/include. The duplication is annoying.
> # All the family headers should be self-contained. We avoid the copying
> # by selectively including just the uAPI header of the family directly
> # from the kernel sources.
"""

Is that maybe not the case anymore with the recent changes to ynl?

Ciao, Thorsten

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

end of thread, other threads:[~2026-06-19  0:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-18 13:39 building ynl afaics requires updating the UAPI headers first Thorsten Leemhuis
2026-06-19  0:06 ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox