【问题标题】:Buildroot error when building with Ubuntu 21.10使用 Ubuntu 21.10 构建时的 Buildroot 错误
【发布时间】:2021-10-26 08:17:55
【问题描述】:

我正在尝试使用 buildroot(busybox) 为 RISCV Arch 编译 linux。我之前使用的是 18.04 和 20.04,编译时没有问题。现在,我已经将它升级到 21.10 来构建一些其他的东西。我已经移动了我的工具链,我可以使用 which 命令找到它。当我尝试编译 linux 时,我遇到了一些我在早期版本中没有遇到的错误。

>>> host-m4 1.4.18 Building

In file included from /usr/include/signal.h:328,
                 from ./signal.h:52,
                 from c-stack.c:49:
c-stack.c:55:26: error: missing binary operator before token "("
   55 | #elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
      |                          ^~~~~~~~
  CC       closein.o
c-stack.c:134:8: error: variably modified 'buffer' at file scope
  134 |   char buffer[SIGSTKSZ];
      |        ^~~~~~
  CC       closeout.o

我对不同版本如何导致此错误感到困惑。

提前致谢。

【问题讨论】:

    标签: linux-kernel riscv buildroot busybox


    【解决方案1】:

    您似乎在 GNU C 库 2.34 版中进行了更改,可以使 SIGSTKSZ 变为非常数。

    来自GNU C Library 2.34 release announcement

    • 添加_SC_MINSIGSTKSZ_SC_SIGSTKSZ。当 _DYNAMIC_STACK_SIZE_SOURCE_GNU_SOURCE 被定义时,MINSIGSTKSZSIGSTKSZ 在 Linux 上不再是常量。 MINSIGSTKSZ 被重新定义为 sysconf(_SC_MINSIGSTKSZ)SIGSTKSZ 被重新定义为 sysconf (_SC_SIGSTKSZ)。这支持适用于 Arm SVE 等现代架构功能的动态大小的寄存器集。

    一种可能的解决方法是将 buildroot 配置为构建 host-m4 版本 1.4.19 而不是 1.4.18,因为它不再使用 SIGSTKSZ

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-08-10
      • 1970-01-01
      • 1970-01-01
      • 2015-01-20
      • 2015-10-16
      • 1970-01-01
      相关资源
      最近更新 更多