Bug 2112282 - trafficserver-9.1.2-10.fc37 FTBFS: /usr/include/linux/mount.h:95:6: error: multiple definition of 'enum fsconfig_command'
Summary: trafficserver-9.1.2-10.fc37 FTBFS: /usr/include/linux/mount.h:95:6: error: mu...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: trafficserver
Version: 37
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jered Floyd
QA Contact: Fedora Extras Quality Assurance
URL: https://koschei.fedoraproject.org/pac...
Whiteboard:
Depends On:
Blocks: F38FTBFS F37FTBFS
TreeView+ depends on / blocked
 
Reported: 2022-07-29 08:44 UTC by Petr Pisar
Modified: 2022-08-11 19:31 UTC (History)
16 users (show)

Fixed In Version: trafficserver-9.1.3-1.fc38 trafficserver-9.1.3-1.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-11 19:28:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Pisar 2022-07-29 08:44:11 UTC
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.

Comment 1 Jered Floyd 2022-07-29 14:17:20 UTC
Thanks! I'll check it out and determine an appropriate resolution.

Comment 2 Cole Robinson 2022-08-01 15:29:34 UTC
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

Comment 3 Florian Weimer 2022-08-01 15:33:31 UTC
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.

Comment 4 Florian Weimer 2022-08-01 15:45:06 UTC
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 {

Comment 5 Jered Floyd 2022-08-01 16:12:49 UTC
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).

Comment 6 Cole Robinson 2022-08-02 19:00:42 UTC
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

Comment 7 Ben Cotton 2022-08-09 13:23:15 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle.
Changing version to 37.

Comment 8 Fedora Update System 2022-08-11 19:26:48 UTC
FEDORA-2022-9e33ef38c1 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-9e33ef38c1

Comment 9 Fedora Update System 2022-08-11 19:28:08 UTC
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.

Comment 10 Fedora Update System 2022-08-11 19:30:14 UTC
FEDORA-2022-652b52f0ea has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-652b52f0ea

Comment 11 Fedora Update System 2022-08-11 19:31:08 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.