[PATCH] FIX: headers/deps: uapi/headers: Create usr/include/uapi symbolic link

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Nathan Chancellor <nathan@xxxxxxxxxx> wrote:

> 2. Build failures with CONFIG_UAPI_HEADER_TEST=y and O=...
> 
> This was originally reproduced with allmodconfig but this is a simpler
> reproducer I think.
> 
> $ make -skj"$(nproc)" ARCH=x86_64 O=.build/x86_64 defconfig
> 
> $ scripts/config --file .build/x86_64/.config -e HEADERS_INSTALL -e UAPI_HEADER_TEST
> 
> $ make -skj"$(nproc)" ARCH=x86_64 O=.build/x86_64 olddefconfig usr/

The simplified & scripted reproducer is very useful, thanks a ton!

> In file included from <command-line>:
> ./usr/include/linux/rds.h:38:10: fatal error: uapi/linux/sockios.h: No such file or directory
>    38 | #include <uapi/linux/sockios.h>
>       |          ^~~~~~~~~~~~~~~~~~~~~~
> compilation terminated.
> make[4]: *** [/home/nathan/cbl/src/linux-fast-headers/usr/include/Makefile:106: usr/include/linux/rds.hdrtest] Error 1
> In file included from ./usr/include/linux/qrtr.h:5,
>                  from <command-line>:
> ./usr/include/linux/socket.h:5:10: fatal error: uapi/linux/socket_types.h: No such file or directory
>     5 | #include <uapi/linux/socket_types.h>
>       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> compilation terminated.
> In file included from ./usr/include/linux/in.h:24,
>                  from ./usr/include/linux/nfs_mount.h:12,
>                  from <command-line>:
> ./usr/include/linux/socket.h:5:10: fatal error: uapi/linux/socket_types.h: No such file or directory
>     5 | #include <uapi/linux/socket_types.h>
>       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> compilation terminated.
> make[4]: *** [/home/nathan/cbl/src/linux-fast-headers/usr/include/Makefile:106: usr/include/linux/qrtr.hdrtest] Error 1
> make[4]: *** [/home/nathan/cbl/src/linux-fast-headers/usr/include/Makefile:106: usr/include/linux/nfs_mount.hdrtest] Error 1
> ...
> 
> I don't see this when just building in the tree. I am guessing that
> commit f989e243f1f4 ("headers/deps: uapi/headers: Create
> usr/include/uapi symbolic link") needs to account for this?

Yeah. Here's my second attempt that creates the symlink as the 
header-install make process, as it should - also pushed out into 
sched/headers.

(My Makefile-fu isn't overly powerful though, so this is just an attempt.)

This fix will be backmerged into f989e243f1f4 in -v2.

Thanks,

	Ingo

=========================>
From: Ingo Molnar <mingo@xxxxxxxxxx>
Date: Sat, 8 Jan 2022 12:05:57 +0100
Subject: [PATCH] FIX: f989e243f1f4 headers/deps: uapi/headers: Create usr/include/uapi symbolic link

---
 scripts/Makefile.headersinst | 3 +++
 usr/include/uapi             | 1 -
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 029d85bb0b23..8ac831458143 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -78,6 +78,9 @@ existing-headers := $(filter $(old-headers), $(all-headers))
 
 -include $(foreach f,$(existing-headers),$(dir $(f)).$(notdir $(f)).cmd)
 
+# link the <uapi/*> namespace:
+LINK := $(shell ln -sf ../include $(objtree)/$(dst)/uapi)
+
 PHONY += FORCE
 FORCE:
 
diff --git a/usr/include/uapi b/usr/include/uapi
deleted file mode 120000
index f5030fe88998..000000000000
--- a/usr/include/uapi
+++ /dev/null
@@ -1 +0,0 @@
-../include
\ No newline at end of file



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux