Skip to content

liburing version in ubuntu 22.04 is not enough to build folly #259

@karim-manaouil

Description

@karim-manaouil

Hi folks,

I've been trying to install taobench, which depends on folly. The build always fails at some point with errors such as

FAILED: CMakeFiles/folly_base.dir/folly/experimental/io/EventBasePoller.cpp.o                                                                                                                                     
/usr/bin/c++ -DBOOST_ATOMIC_NO_LIB -DBOOST_CONTEXT_NO_LIB -DBOOST_FILESYSTEM_NO_LIB -DBOOST_PROGRAM_OPTIONS_NO_LIB -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_NO_LIB -DFOLLY_XLOG_STRIP_PREFIXES=\"
/raid/dcperf/benchmarks/tao_bench/folly:/raid/dcperf/benchmarks/tao_bench/build-folly/build/folly\" -DGFLAGS_IS_A_DLL=0 -D_GNU_SOURCE -D_REENTRANT -I/raid/dcperf/benchmarks/tao_bench/folly -I/raid/dcperf/benchm
arks/tao_bench/build-folly/build/folly -I/raid/dcperf/benchmarks/tao_bench/build-folly/installed/boost--WLV9vcK3xrQwgLevvOAHBjleglGvz3H7DlDSyVNAVE/include -I/raid/dcperf/benchmarks/tao_bench/build-deps/include 
-I/raid/dcperf/benchmarks/tao_bench/build-folly/installed/libdwarf-WwF3OWpoueAdmO2sBL6hIzYR91RxQpRIxihc-xwBpyI/include -I/raid/dcperf/benchmarks/tao_bench/build-folly/installed/libiberty-0kXt6ZMBm3i5jlvzONXviVC
E8nta-8VxC1139rKBqTo/include/libiberty -I/raid/dcperf/benchmarks/tao_bench/build-folly/installed/fmt-1UJxYWVd39LBy-UEVC_tnrSVODLnNjF3ZktpURCZpUA/include -O2 -g -DNDEBUG -fcoroutines -g -finput-charset=UTF-8 -fs
igned-char -Wall -Wno-deprecated -Wno-deprecated-declarations -Wno-sign-compare -Wno-unused -Wuninitialized -Wunused-label -Wunused-result -Wshadow-compatible-local -Wno-noexcept-type -faligned-new -fopenmp -st
d=gnu++17 -MD -MT CMakeFiles/folly_base.dir/folly/experimental/io/EventBasePoller.cpp.o -MF CMakeFiles/folly_base.dir/folly/experimental/io/EventBasePoller.cpp.o.d -o CMakeFiles/folly_base.dir/folly/experimenta
l/io/EventBasePoller.cpp.o -c /raid/dcperf/benchmarks/tao_bench/folly/folly/experimental/io/EventBasePoller.cpp                                                                                                   
/raid/dcperf/benchmarks/tao_bench/folly/folly/experimental/io/EventBasePoller.cpp: In function ‘void folly::detail::{anonymous}::{anonymous}::enableFlagsIfSupported(io_uring_params&, uint32_t, const char*)’:   
/raid/dcperf/benchmarks/tao_bench/folly/folly/experimental/io/EventBasePoller.cpp:479:14: error: ‘::io_uring_setup’ has not been declared; did you mean ‘io_uring_sqe’?                                           
  479 |   int fd = ::io_uring_setup(1, &tmpParams);                                                                                                                                                               
      |              ^~~~~~~~~~~~~~                                                                                                                                                                               
      |              io_uring_sqe                                                                                                                                                                                 
/raid/dcperf/benchmarks/tao_bench/folly/folly/experimental/io/EventBasePoller.cpp: In member function ‘virtual void folly::detail::{anonymous}::EventBasePollerIoUring::setup()’:                                 
/raid/dcperf/benchmarks/tao_bench/folly/folly/experimental/io/EventBasePoller.cpp:513:17: error: ‘IORING_SETUP_SINGLE_ISSUER’ was not declared in this scope                                                      
  513 |         params, IORING_SETUP_SINGLE_ISSUER | IORING_SETUP_DEFER_TASKRUN);                                                                                                                                 
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                                                                
/raid/dcperf/benchmarks/tao_bench/folly/folly/experimental/io/EventBasePoller.cpp:493:34: note: in definition of macro ‘ENABLE_FLAGS_IF_SUPPORTED’                                                                
  493 |   enableFlagsIfSupported(params, desiredFlags, #desiredFlags)
      |                                  ^~~~~~~~~~~~
/raid/dcperf/benchmarks/tao_bench/folly/folly/experimental/io/EventBasePoller.cpp:513:46: error: ‘IORING_SETUP_DEFER_TASKRUN’ was not declared in this scope
  513 |         params, IORING_SETUP_SINGLE_ISSUER | IORING_SETUP_DEFER_TASKRUN);
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~
/raid/dcperf/benchmarks/tao_bench/folly/folly/experimental/io/EventBasePoller.cpp:493:34: note: in definition of macro ‘ENABLE_FLAGS_IF_SUPPORTED’
  493 |   enableFlagsIfSupported(params, desiredFlags, #desiredFlags)
      |                                  ^~~~~~~~~~~~
/raid/dcperf/benchmarks/tao_bench/folly/folly/experimental/io/EventBasePoller.cpp:515:17: error: ‘IORING_SETUP_COOP_TASKRUN’ was not declared in this scope
  515 |         params, IORING_SETUP_COOP_TASKRUN | IORING_SETUP_TASKRUN_FLAG);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
/raid/dcperf/benchmarks/tao_bench/folly/folly/experimental/io/EventBasePoller.cpp:493:34: note: in definition of macro ‘ENABLE_FLAGS_IF_SUPPORTED’
  493 |   enableFlagsIfSupported(params, desiredFlags, #desiredFlags)
      |                                  ^~~~~~~~~~~~
/raid/dcperf/benchmarks/tao_bench/folly/folly/experimental/io/EventBasePoller.cpp:515:45: error: ‘IORING_SETUP_TASKRUN_FLAG’ was not declared in this scope
  515 |         params, IORING_SETUP_COOP_TASKRUN | IORING_SETUP_TASKRUN_FLAG);
      |                                             ^~~~~~~~~~~~~~~~~~~~~~~~~
/raid/dcperf/benchmarks/tao_bench/folly/folly/experimental/io/EventBasePoller.cpp:493:34: note: in definition of macro ‘ENABLE_FLAGS_IF_SUPPORTED’
  493 |   enableFlagsIfSupported(params, desiredFlags, #desiredFlags)
      |                                  ^~~~~~~~~~~~
[84/939] Building CXX object CMakeFiles/folly_base.dir/folly/experimental/io/IoUring.cpp.o
FAILED: CMakeFiles/folly_base.dir/folly/experimental/io/IoUring.cpp.o

I installed Linux kernel headers as well as liburing-dev. That didn't change anything.

Upon inspection, I realised that liburing2.1 which is shipped with Ubuntu 22.04 is too old to build that particular version of folly which depends on an API only introduced in later version of liburing.

For example IORING_SETUP_SINGLE_ISSUER does not exist in liburing2.1, but was introduced in v2.4.

I removed the distro provided liburing and I manually built and installed a new version (v2.12) of liburing and everything worked fine.

Liburing and its build and install instructions can be found here

https://github.com/axboe/liburing

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions