Static &引用;静态声明‘;memfd#u create’;遵循非静态声明“;使用Yocto构建Linux映像时出错

Static &引用;静态声明‘;memfd#u create’;遵循非静态声明“;使用Yocto构建Linux映像时出错,static,yocto,imx6,angstrom-linux,Static,Yocto,Imx6,Angstrom Linux,我正在使用Yocto在ubuntu18.04主机上构建系统来构建Linux映像。我正在遵循上面提供的步骤。我正在为模块上的计算机构建Colibri iMX6ULL。然而,我的构建失败了,它显示了下面给出的错误 declaration of ‘memfd_create’ follows non-static declaration | static int memfd_create(const char *name, unsigned int flags) | ^~~~~

我正在使用
Yocto
ubuntu18.04
主机上构建系统来构建Linux映像。我正在遵循上面提供的步骤。我正在为模块上的计算机构建
Colibri iMX6ULL
。然而,我的构建失败了,它显示了下面给出的错误

declaration of ‘memfd_create’ follows non-static declaration
|  static int memfd_create(const char *name, unsigned int flags)
|             ^~~~~~~~~~~~
| In file included from /usr/include/x86_64-linux-gnu/bits/mman-linux.h:115:0,
|                  from /usr/include/x86_64-linux-gnu/bits/mman.h:45,
|                  from /usr/include/x86_64-linux-gnu/sys/mman.h:41,
|                  from /home/abhiarora/iohertz/gateway_os/yocto/build/tmp-glibc/work/x86_64-linux/qemu-native/2.10.0-r0/qemu-2.10.0/include/sysemu/os-posix.h:29,
|                  from /home/abhiarora/iohertz/gateway_os/yocto/build/tmp-glibc/work/x86_64-linux/qemu-native/2.10.0-r0/qemu-2.10.0/include/qemu/osdep.h:104,
|                  from /home/abhiarora/iohertz/gateway_os/yocto/build/tmp-glibc/work/x86_64-linux/qemu-native/2.10.0-r0/qemu-2.10.0/util/memfd.c:28:
| /usr/include/x86_64-linux-gnu/bits/mman-shared.h:46:5: note: previous declaration of ‘memfd_create’ was here
|  int memfd_create (const char *__name, unsigned int __flags) __THROW;
|      ^~~~~~~~~~~~
| /home/abhiarora/iohertz/gateway_os/yocto/build/tmp-glibc/work/x86_64-linux/qemu-native/2.10.0-r0/qemu-2.10.0/rules.mak:66: recipe for target 'util/memfd.o' failed
这个错误是:

| gcc  -c -I. -I../lib -I../../git/lib -isystem/home/abhiarora/iohertz/gateway_os/yocto/build/tmp-glibc/work/x86_64-linux/e2fsprogs-native/1.43.5-r0/recipe-sysroot-native/usr/include -isystem/home/abhiarora/iohertz/gateway_os/yocto/build/tmp-glibc/work/x86_64-linux/e2fsprogs-native/1.43.5-r0/recipe-sysroot-native/usr/include -O2 -pipe  -DHAVE_CONFIG_H -I../../git/debugfs/../e2fsck -DDEBUGFS ../../git/debugfs/quota.c -o quota.o
| ../../git/debugfs/../misc/create_inode.c:406:18: error: conflicting types for ‘copy_file_range’
|  static errcode_t copy_file_range(ext2_filsys fs, int fd, ext2_file_t e2_file,
|                   ^~~~~~~~~~~~~~~
| In file included from ../../git/debugfs/../misc/create_inode.c:19:0:
| /usr/include/unistd.h:1110:9: note: previous declaration of ‘copy_file_range’ was here
|  ssize_t copy_file_range (int __infd, __off64_t *__pinoff,
|          ^~~~~~~~~~~~~~~
| gcc  -c -I. -I../lib -I../../git/lib -isystem/home/abhiarora/iohertz/gateway_os/yocto/build/tmp-glibc/work/x86_64-linux/e2fsprogs-native/1.43.5-r0/recipe-sysroot-native/usr/include -isystem/home/abhiarora/iohertz/gateway_os/yocto/build/tmp-glibc/work/x86_64-linux/e2fsprogs-native/1.43.5-r0/recipe-sysroot-native/usr/include -O2 -pipe  -DHAVE_CONFIG_H -I../../git/debugfs/../e2fsck -DDEBUGFS ../../git/debugfs/xattrs.c -o xattrs.o
| Makefile:422: recipe for target 'create_inode.o' failed
| make[2]: *** [create_inode.o] Error 1
| make[2]: *** Waiting for unfinished jobs....
失败的包/任务:

  • e2fsprogs_1.43.5
  • qemu_2.10.0

  • 有人能帮我吗?我无法切换到ubuntu 16.04,但我认为它也应该与我的系统一起工作。

    这是Toradex的一个已知问题,已经在路线图上,请参阅问题


    修复程序已经在上游层中,我们已经更新了BSP repo。您可以使用LinuxImageV2.7-integration分支尝试此分支。

    看起来这是glibc2.27版本的问题。我正在尝试安装旧版本以使其正常工作。在Ubuntu安装中降级glibc可能不是一个好主意,因为glibc几乎在所有软件包中都使用。这可能会在一个相当大的依赖地狱结束。