[kirkstone,02/22] frr: inherit autotools-brokensep instead of autotools

Message ID e230791ed689c6a65bb9d6edb8efc1e0e30c3cd5.1652622481.git.akuster808@gmail.com
State Accepted, archived
Delegated to: Armin Kuster
Headers show
Series [kirkstone,01/22] meta-oe-image: fix build depends | expand

Commit Message

akuster808 May 15, 2022, 1:49 p.m. UTC
From: Yi Zhao <yi.zhao@windriver.com>

There is a parallel build error in separate build directory:

| /home/pokybuild/yocto-worker/meta-oe/build/build/tmp/work/core2-64-poky-linux/frr/8.2.2-r0/recipe-sysroot-native/usr/lib/clippy ../git/python/clidef.py -o isisd/isis_cli_clippy.c ../git/isisd/isis_cli.c
| Traceback (most recent call last):
|   File "../git/python/clidef.py", line 466, in <module>
|     clippy.wrdiff(
|   File "/home/pokybuild/yocto-worker/meta-oe/build/build/tmp/work/core2-64-poky-linux/frr/8.2.2-r0/git/python/clippy/__init__.py", line 78, in wrdiff
|     with open(newname, "w") as out:
| FileNotFoundError: [Errno 2] No such file or directory: 'isisd/isis_cli_clippy.c.new-372541'
| make[1]: Leaving directory '/home/pokybuild/yocto-worker/meta-oe/build/build/tmp/work/core2-64-poky-linux/frr/8.2.2-r0/build'
| make[1]: *** [Makefile:17386: isisd/isis_cli_clippy.c] Error 1

This is beacuse clidef.py only creates new file but doesn't check if
parent directory exists. Inherit autotools-brokensep can fix this issue
as these parent directories always exist in source directory.

Also set ac_cv_path_PERL to '/usr/bin/env perl' to avoid path too long.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 09a97158f80a779c3f45b3189adcddbd535e5baf)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 meta-networking/recipes-protocols/frr/frr_8.2.2.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch

diff --git a/meta-networking/recipes-protocols/frr/frr_8.2.2.bb b/meta-networking/recipes-protocols/frr/frr_8.2.2.bb
index 91e306f08b..ceb94109de 100644
--- a/meta-networking/recipes-protocols/frr/frr_8.2.2.bb
+++ b/meta-networking/recipes-protocols/frr/frr_8.2.2.bb
@@ -26,7 +26,7 @@  COMPATIBLE_HOST:armv5 = "null"
 # Error: PC-relative reference to a different section
 COMPATIBLE_HOST:mips64 = "null"
 
-inherit autotools python3native pkgconfig useradd systemd
+inherit autotools-brokensep python3native pkgconfig useradd systemd
 
 DEPENDS:class-native = "bison-native elfutils-native"
 DEPENDS:class-target = "bison-native json-c readline c-ares libyang frr-native"
@@ -63,6 +63,8 @@  EXTRA_OECONF:class-target = "--sbindir=${libdir}/frr \
                              --with-clippy=${RECIPE_SYSROOT_NATIVE}/usr/lib/clippy \
                             "
 
+CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
+
 LDFLAGS:append:mips = " -latomic"
 LDFLAGS:append:mipsel = " -latomic"
 LDFLAGS:append:powerpc = " -latomic"
@@ -77,7 +79,7 @@  do_compile:class-native () {
 
 do_install:class-native () {
     install -d ${D}${libdir}
-    install -m 755 ${WORKDIR}/build/lib/clippy ${D}${libdir}/clippy
+    install -m 755 ${S}/lib/clippy ${D}${libdir}/clippy
 }
 
 do_install:append:class-target () {