When compiling ceph on amd64 the compilation fails with: FAILED: src/cls/CMakeFiles/cls_lua.dir/lua/cls_lua.cc.o /usr/bin/x86_64-pc-linux-gnu-g++ -DBOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE -D__CEPH__ -D__STDC_FORMAT_MACROS -D__linux__ -Dcls_lua_EXPORTS -I/var/tmp/portage/sys-cluster/ceph-18.2.1-r2/work/ceph-18.2.1_build/src/include -I/var/tmp/portage/sys-cluster/ceph-18.2.1-r2/work/ceph-18.2.1/src -I/var/tmp/portage/sys-cluster/ceph-18.2.1-r2/work/ceph-18.2.1/src/cls -isystem /var/tmp/portage/sys-cluster/ceph-18.2.1-r2/work/ceph-18.2.1_build/include -isystem /var/tmp/portage/sys-cluster/ceph-18.2.1-r2/work/ceph-18.2.1/src/xxHash -isystem /var/tmp/portage/sys-cluster/ceph-18.2.1-r2/work/ceph-18.2.1/src/fmt/include -march=znver3 -O2 -pipe -std=c++20 -fPIC -fvisibility=hidden -U_FORTIFY_SOURCE -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -Wall -fno-strict-aliasing -fsigned-char -Wtype-limits -Wignored-qualifiers -Wpointer-arith -Werror=format-security -Winit-self -Wno-unknown-pragmas -Wnon-virtual-dtor -Wno-ignored-qualifiers -ftemplate-depth-1024 -Wpessimizing-move -Wredundant-move -Wstrict-null-sentinel -Woverloaded-virtual -fstack-protector-strong -fdiagnostics-color=auto -MD -MT src/cls/CMakeFiles/cls_lua.dir/lua/cls_lua.cc.o -MF src/cls/CMakeFiles/cls_lua.dir/lua/cls_lua.cc.o.d -o src/cls/CMakeFiles/cls_lua.dir/lua/cls_lua.cc.o -c /var/tmp/portage/sys-cluster/ceph-18.2.1-r2/work/ceph-18.2.1/src/cls/lua/cls_lua.cc /var/tmp/portage/sys-cluster/ceph-18.2.1-r2/work/ceph-18.2.1/src/cls/lua/cls_lua.cc:8:10: fatal error: lua.hpp: No such file or directory 8 | #include <lua.hpp> | ^~~~~~~~~ compilation terminated. It fails on both versions: sys-cluster/ceph-17.2.7 and sys-cluster/ceph-18.2.1-r2. A workaround: sed -i 's/lua.hpp/lua5.4\/lua.hpp/g' ./ceph-18.2.1/src/cls/lua/cls_lua.cc sed -i 's/lua.hpp/lua5.4\/lua.hpp/g' ./ceph-18.2.1/src/cls/lua/cls_lua.h sed -i 's/lua.hpp/lua5.4\/lua.hpp/g' ./ceph-18.2.1/src/cls/lua/lua_bufferlist.cc ceph is configured with the below use flags(needed mainly for librados): USE="parquet ssl (system-boost) tcmalloc uring -babeltrace -cephfs -custom-cflags -diskprediction (-dpdk) -fuse -grafana -jaeger -jemalloc -kafka -kerberos -ldap -lttng -mgr -pmdk -rabbitmq -radosgw -rbd-rwl -rbd-ssd -rdma -rgw-lua (-selinux) -spdk -sqlite -systemd -test -xfs -zbd -zfs" CPU_FLAGS_X86="avx2 pclmul sse sse2 sse3 sse4_1 sse4_2 ssse3 -avx512f" LUA_SINGLE_TARGET="lua5-4 -lua5-3" PYTHON_TARGETS="python3_12 -python3_10 -python3_11" 0 KiB Reproducible: Always
USE="-cephfs -radosgw" is the issue. In src/CMakeLists.txt # RGW also support Lua scripting if(WITH_CEPHFS OR WITH_RADOSGW) find_package(Lua 5.4 EXACT REQUIRED) endif() In src/cls/CMakeLists.txt it is used unconditionally: if (NOT WIN32) # cls_lua set(cls_lua_srcs lua/cls_lua.cc lua/lua_bufferlist.cc) add_library(cls_lua SHARED ${cls_lua_srcs}) set_target_properties(cls_lua PROPERTIES VERSION "1.0.0" SOVERSION "1" INSTALL_RPATH "" CXX_VISIBILITY_PRESET hidden) install(TARGETS cls_lua DESTINATION ${cls_dir}) target_link_libraries(cls_lua ${LUA_LIBRARIES} json_spirit) target_include_directories(cls_lua PRIVATE "${LUA_INCLUDE_DIR}") endif (NOT WIN32) Upstream build is totally broken, sorry. :) Undefined cmake variables are a logic error, but don't trigger a parse error.