diff mbox series

build: create $(PKG_SYMVERS_DIR) if non-existent

Message ID 20201117213630.GA1281@darth.lan
State Superseded
Headers show
Series build: create $(PKG_SYMVERS_DIR) if non-existent | expand

Commit Message

Sebastian Kemper Nov. 17, 2020, 9:36 p.m. UTC
Commit 5d76065 moved the creation of the symvers directory to
include/kernel-build.mk. This is fine when building from scratch. But
when unpacking an SDK the directory doesn't exist and because the kernel
won't be built (again) this directory will not be created by the build
system, causing build failure if make tries to copy files into it.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
---
 include/kernel.mk | 1 +
 1 file changed, 1 insertion(+)

--
2.26.2

Comments

Paul Spooren Nov. 17, 2020, 9:53 p.m. UTC | #1
On Tue Nov 17, 2020 at 11:36 AM HST, Sebastian Kemper wrote:
> Commit 5d76065 moved the creation of the symvers directory to
> include/kernel-build.mk. This is fine when building from scratch. But
> when unpacking an SDK the directory doesn't exist and because the kernel
> won't be built (again) this directory will not be created by the build
> system, causing build failure if make tries to copy files into it.
>
> Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>

Could you please provide an example when that fails? E.g. what package
makes the SDK copy things there?

> ---
> include/kernel.mk | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/include/kernel.mk b/include/kernel.mk
> index 1ae9c6be29..e803ff44e7 100644
> --- a/include/kernel.mk
> +++ b/include/kernel.mk
> @@ -140,6 +140,7 @@ endif
> PKG_EXTMOD_SUBDIRS ?= .
>
> PKG_SYMVERS_DIR = $(KERNEL_BUILD_DIR)/symvers
> +$(shell mkdir -p $(PKG_SYMVERS_DIR))
>
> define collect_module_symvers
> for subdir in $(PKG_EXTMOD_SUBDIRS); do \
> --
> 2.26.2
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Sebastian Kemper Nov. 17, 2020, 10:04 p.m. UTC | #2
On Tue, Nov 17, 2020 at 11:53:29AM -1000, Paul Spooren wrote:
> On Tue Nov 17, 2020 at 11:36 AM HST, Sebastian Kemper wrote:
> > Commit 5d76065 moved the creation of the symvers directory to
> > include/kernel-build.mk. This is fine when building from scratch. But
> > when unpacking an SDK the directory doesn't exist and because the kernel
> > won't be built (again) this directory will not be created by the build
> > system, causing build failure if make tries to copy files into it.
> >
> > Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
>
> Could you please provide an example when that fails? E.g. what package
> makes the SDK copy things there?

Hi Paul,

All kernel module packages I suppose. Look at the failures on the build
bots these days, since the mentioned commit hit master. I.e. [1] fails
and then there is follow-up breakage. Or download an SDK, unpack it,
install cryptodev-linux and try to package it. It'll fail, obviously,
because the build bots are using the SDK and so are you :)

Kind regards,
Seb

[1] https://downloads.openwrt.org/snapshots/faillogs/aarch64_cortex-a53/base/cryptodev-linux/compile.txt
>
> > ---
> > include/kernel.mk | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/include/kernel.mk b/include/kernel.mk
> > index 1ae9c6be29..e803ff44e7 100644
> > --- a/include/kernel.mk
> > +++ b/include/kernel.mk
> > @@ -140,6 +140,7 @@ endif
> > PKG_EXTMOD_SUBDIRS ?= .
> >
> > PKG_SYMVERS_DIR = $(KERNEL_BUILD_DIR)/symvers
> > +$(shell mkdir -p $(PKG_SYMVERS_DIR))
> >
> > define collect_module_symvers
> > for subdir in $(PKG_EXTMOD_SUBDIRS); do \
> > --
> > 2.26.2
> >
> >
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel@lists.openwrt.org
> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>
Hannu Nyman Nov. 17, 2020, 10:30 p.m. UTC | #3
Paul Spooren wrote at Tue Nov 17 16:53:29 EST 2020:
 > Could you please provide an example when that fails? E.g. what package
 > makes the SDK copy things there?

Pretty much all kernel related packages, like I already disgnosed a few days 
ago in
http://lists.openwrt.org/pipermail/openwrt-devel/2020-November/032115.html

Examples that I used then were cryptodev-linux and exfat.

Buildbot has been broken regarding the kernel packages for the last 3-4 days.

Kernel packages failing cause then carnage with other packages

https://downloads.openwrt.org/snapshots/faillogs/x86_64/base/
https://downloads.openwrt.org/snapshots/faillogs/x86_64/packages/
diff mbox series

Patch

diff --git a/include/kernel.mk b/include/kernel.mk
index 1ae9c6be29..e803ff44e7 100644
--- a/include/kernel.mk
+++ b/include/kernel.mk
@@ -140,6 +140,7 @@  endif
 PKG_EXTMOD_SUBDIRS ?= .

 PKG_SYMVERS_DIR = $(KERNEL_BUILD_DIR)/symvers
+$(shell mkdir -p $(PKG_SYMVERS_DIR))

 define collect_module_symvers
 	for subdir in $(PKG_EXTMOD_SUBDIRS); do \