foss-for-synopsys-dwc-arc-processors / buildroot

The development tree for Buildroot support for the Synopsys DesignWare ARC processor family
https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/blob/arc-dev/README.md
Other
7 stars 2 forks source link

package/strace: Build fails againts linux kernel 5.15 #22

Closed shahab-vahedi closed 2 years ago

shahab-vahedi commented 2 years ago

N.B: This is a known issue and will be fixed upstream soon. It is archived here to possibly save time for people who might still encounter it.

On attempt to build strace-5.13 against linux-stable 5.15:

In file included from static_assert.h:11,
                 from print_fields.h:12,
                 from defs.h:1869,
                 from netlink.c:10:
xlat/nl_xfrm_types.h:162:1: error: static assertion failed: "XFRM_MSG_MAPPING != 0x26"
  162 | static_assert((XFRM_MSG_MAPPING) == (0x26), "XFRM_MSG_MAPPING != 0x26");
      | ^~~~~~~~~~~~~

This is because the xfrm: Add possibility to set the default to block if we have no policy patch has changed the value of XFRM_MSG_* enums in a non-ascending way, in other words ABI breakage.

The proposed change will fix this:

--- include/uapi/linux/xfrm.h   2021-09-20 14:16:15.211621772 +0200
+++ include/uapi/linux/xfrm.h.patched   2021-09-20 14:16:01.985622333 +0200
@@ -213,13 +213,13 @@ enum {
    XFRM_MSG_GETSPDINFO,
 #define XFRM_MSG_GETSPDINFO XFRM_MSG_GETSPDINFO

+   XFRM_MSG_MAPPING,
+#define XFRM_MSG_MAPPING XFRM_MSG_MAPPING
+
    XFRM_MSG_SETDEFAULT,
 #define XFRM_MSG_SETDEFAULT XFRM_MSG_SETDEFAULT
    XFRM_MSG_GETDEFAULT,
 #define XFRM_MSG_GETDEFAULT XFRM_MSG_GETDEFAULT
-
-   XFRM_MSG_MAPPING,
-#define XFRM_MSG_MAPPING XFRM_MSG_MAPPING
    __XFRM_MSG_MAX
 };
 #define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1)

This file ends up in the following places in toolchain's install and buildroot's build directory:

/bld/buildroot/host/arc-buildroot-linux-gnu/sysroot/usr/include/linux/xfrm.h
/install/arc-snps-linux-gnu/sysroot/usr/include/linux/xfrm.h