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: strace v5.16 build fails against kernel headers of v5.6 #34

Closed shahab-vahedi closed 2 years ago

shahab-vahedi commented 2 years ago

Yet another problem with building strace and the explanation of it for future reference.

$ ./configure --target=arc64-linux-gnu         \
            --host=arc64-linux-gnu             \
            --build=x86_64-pc-linux-gnu        \
            --prefix=/usr                      \
            --exec-prefix=/usr                 \
            --sysconfdir=/etc                  \
            --localstatedir=/var               \
            --program-prefix=                  \
            --disable-dependency-tracking      \
            --enable-mpers=no                  \
            --without-libunwind                \
            --without-libiberty

$ make -j $(nproc)
  ...
  arc64-linux-gnu-gcc ... -c -o libstrace_a-rtnl_stats.o rtnl_stats.c

  In file included from rtc.c:21:
  xlat/rtc_vl_flags.h:8:37: error: expression in static assertion is not constant
      8 | static_assert((RTC_VL_DATA_INVALID) == ((1 << 0)), "RTC_VL_DATA_INVALID != (1 << 0)");
        |               ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
  xlat/rtc_vl_flags.h:15:35: error: expression in static assertion is not constant
     15 | static_assert((RTC_VL_BACKUP_LOW) == ((1 << 1)), "RTC_VL_BACKUP_LOW != (1 << 1)");
        |               ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
  xlat/rtc_vl_flags.h:22:37: error: expression in static assertion is not constant
     22 | static_assert((RTC_VL_BACKUP_EMPTY) == ((1 << 2)), "RTC_VL_BACKUP_EMPTY != (1 << 2)");
        |               ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
  xlat/rtc_vl_flags.h:29:37: error: expression in static assertion is not constant
     29 | static_assert((RTC_VL_ACCURACY_LOW) == ((1 << 3)), "RTC_VL_ACCURACY_LOW != (1 << 3)");
        |               ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
  In file included from defs.h:404,
                   from rtc.c:10:
  xlat.h:64:43: error: initializer element is not constant
     64 | # define XLAT(val)                      { (unsigned)(val), #val }
        |                                           ^
  xlat/rtc_vl_flags.h:53:2: note: in expansion of macro 'XLAT'
     53 |  XLAT(RTC_VL_DATA_INVALID),
        |  ^~~~
  ...

This happens because things like RTC_VL_DATA_INVALID are transformed into some BIT(n) macros. However, the kernel headers v5.6 do not specify any BIT(n) macro for user space programs.

This problem means that you have commit v5.6-rc1\~71^2\~57 and yet not the resolving commit of v5.7-rc1\~90^2\~12.