liburing: 2.2: build fails

+ ./configure --includedir=/usr/include --libdevdir=/usr/lib64 --libdir=/usr/lib64 --mandir=/usr/share/man --prefix=/usr
prefix                        /usr
includedir                    /usr/include
libdir                        /usr/lib64
libdevdir                     /usr/lib64
relativelibdir
mandir                        /usr/share/man
datadir                       /usr/share
stringop_overflow             yes
array_bounds                  yes
__kernel_rwf_t                yes
__kernel_timespec             yes
open_how                      yes
statx                         yes
glibc_statx                   yes
C++                           no
has_ucontext                  yes
has_memfd_create              no
liburing_nolibc               no
CC                            /usr/bin/gcc
CXX                           /usr/bin/g++
+ /usr/bin/make -O -j48 V=1 VERBOSE=1
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/liburing-liburing-2.2/src'
/usr/bin/gcc -D_GNU_SOURCE -Iinclude/ -include ../config-host.h -MT "syscall.ol" -MMD -MP -MF "syscall.ol.d" -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -Wno-unused-parameter -Wno-sign-compare -DLIBURING_INTERNAL -c -o syscall.ol syscall.c
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/liburing-liburing-2.2/src'

[..]

make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/liburing-liburing-2.2/src'
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/liburing-liburing-2.2/test'
     CC io_uring_register.t
io_uring_register.c:38:12: error: static declaration of ‘memfd_create’ follows non-static declaration
   38 | static int memfd_create(const char *name, unsigned int flags)
      |            ^~~~~~~~~~~~
In file included from /usr/include/bits/mman-linux.h:117,
                 from /usr/include/bits/mman.h:34,
                 from /usr/include/sys/mman.h:41,
                 from io_uring_register.c:20:
/usr/include/bits/mman-shared.h:51:5: note: previous declaration of ‘memfd_create’ with type ‘int(const char *, unsigned int)’
   51 | int memfd_create (const char *__name, unsigned int __flags) __THROW;
      |     ^~~~~~~~~~~~
make[1]: *** [Makefile:215: io_uring_register.t] Error 1
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/liburing-liburing-2.2/test'
make: *** [Makefile:11: all] Error 2

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 31 (18 by maintainers)

Commits related to this issue

Most upvoted comments

The LDFLAGS, minus whatever is in -specs=/usr/lib/rpm/redhat/redhat-hardened-ld, work fine. This is NOT an lto issue.

If so, it’s not liburing’s problem then. Please just fix the compiler and linker flags being used.