trafficserver-9.1.2-10.fc37 fails to build in Fedora 37: libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../include -Dlinux -D_LARGEFILE64_SOURCE=1 -D_COMPILE64BIT_SOURCE=1 -D_REENTRANT -D__STDC_LIMIT_MACROS=1 -D__STDC_FORMAT_MACROS=1 -I/builddir/build/BUILD/trafficserver-9.1.2/iocore/eventsystem -I/builddir/build/BUILD/trafficserver-9.1.2/iocore/net -I/builddir/build/BUILD/trafficserver-9.1.2/iocore/net/quic -I/builddir/build/BUILD/trafficserver-9.1.2/iocore/aio -I/builddir/build/BUILD/trafficserver-9.1.2/iocore/hostdb -I/builddir/build/BUILD/trafficserver-9.1.2/iocore/cache -I/builddir/build/BUILD/trafficserver-9.1.2/iocore/utils -I/builddir/build/BUILD/trafficserver-9.1.2/iocore/dns -I/builddir/build/BUILD/trafficserver-9.1.2/include -I/builddir/build/BUILD/trafficserver-9.1.2/lib -I/builddir/build/BUILD/trafficserver-9.1.2/lib/yamlcpp/include -D_GNU_SOURCE -DOPENSSL_NO_SSL_INTERN -DOPENSSL_API_COMPAT=10002 -DOPENSSL_IS_OPENSSL3 -std=c++17 -g -pipe -Wall -Wextra -Wno-ignored-qualifiers -Wno-unused-parameter -Wno-format-truncation -Wno-cast-function-type -Wno-stringop-overflow -feliminate-unused-debug-symbols -fno-strict-aliasing -Wno-invalid-offsetof -Wno-noexcept-type -mcx16 -O2 -flto=auto -ffat-lto-objects -fexceptions -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 -c ink_file.cc -fPIC -DPIC -o .libs/ink_file.o [...] In file included from /usr/include/linux/fs.h:19, from ink_file.cc:56: /usr/include/linux/mount.h:95:6: error: multiple definition of 'enum fsconfig_command' 95 | enum fsconfig_command { | ^~~~~~~~~~~~~~~~ In file included from ../../include/tscore/ink_file.h:50, from ink_file.cc:27: /usr/include/sys/mount.h:189:6: note: previous definition here 189 | enum fsconfig_command | ^~~~~~~~~~~~~~~~ /usr/include/linux/mount.h:129:8: error: redefinition of 'struct mount_attr' 129 | struct mount_attr { | ^~~~~~~~~~ /usr/include/sys/mount.h:161:8: note: previous definition of 'struct mount_attr' 161 | struct mount_attr | ^~~~~~~~~~ make[1]: *** [Makefile:1451: ink_file.lo] Error 1 A difference between passing and failing build root is at <https://koschei.fedoraproject.org/build/13314849>. An upgrade of kernel-headers from 5.19.0-0.rc7.git0.1.... to 5.19.0-0.rc8.git0.1.... looks suspiciously.
Thanks! I'll check it out and determine an appropriate resolution.
Hitting this with libvirt rawhide build too: https://kojipkgs.fedoraproject.org//work/tasks/8886/90348886/build.log /usr/include/sys/mount.h from glibc has `enum fsconfig_command` /usr/include/linux/mount.h from kernel does too. The kernel one has been there for a while, but the glibc one was added in june, so the glibc change probably tickled this issue. https://sourceware.org/git/?p=glibc.git;a=commit;h=7eae6a91e9b1670330c9f15730082c91c0b1d570
Yes, it's a glibc change, documented here: https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E We couldn't find a good way to work around this on the glibc side.
Fix looks like this: diff -ur src/tscore/ink_file.cc src/tscore/ink_file.cc --- src/tscore/ink_file.cc 2021-11-08 20:01:21.000000000 +0100 +++ src/tscore/ink_file.cc 2022-08-01 17:39:37.461438599 +0200 @@ -52,8 +52,8 @@ #include <linux/hdreg.h> /* for struct hd_geometry */ #endif -#if HAVE_LINUX_FS_H -#include <linux/fs.h> /* for BLKGETSIZE. sys/mount.h is another candidate */ +#if HAVE_SYS_MOUNT_H +#include <sys/mount.h> #endif using ioctl_arg_t = union {
Thanks, Florian. I'm traveling right now but will soon do a mock build with this patch and also submit upstream (if not already fixed).
FWIW here's what I did to fix the libvirt issue, incase anyone else ends up in this bug: https://gitlab.com/libvirt/libvirt/-/commit/c0d9adf220dc0d223330a7bac37b174132d330ba
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle. Changing version to 37.
FEDORA-2022-9e33ef38c1 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-9e33ef38c1
FEDORA-2022-9e33ef38c1 has been pushed to the Fedora 38 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2022-652b52f0ea has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-652b52f0ea
FEDORA-2022-652b52f0ea has been pushed to the Fedora 37 stable repository. If problem still persists, please make note of it in this bug report.