On Thu, Jan 20, 2022 at 07:50:58AM -0500, Kaleb Keithley wrote:
> I thought I'd solved all my gcc-12-isms in ceph by running --scratch
> --arch-override=x86_64 builds, so I tried a full build and ran into this on
> aarch64. :-(
>
> In file included from /usr/include/boost/integer.hpp:20,
> from /usr/include/boost/integer/integer_mask.hpp:16,
> from /usr/include/boost/random/mersenne_twister.hpp:26,
> from /usr/include/boost/uuid/random_generator.hpp:17,
> from /usr/include/boost/uuid/uuid_generators.hpp:17,
> from /builddir/build/BUILD/ceph-16.2.7/src/include/uuid.h:16,
> from
> /builddir/build/BUILD/ceph-16.2.7/src/include/types.h:21,
> from
> /builddir/build/BUILD/ceph-16.2.7/src/msg/msg_types.h:23,
> from
> /builddir/build/BUILD/ceph-16.2.7/src/common/ceph_context.h:36,
> from /builddir/build/BUILD/ceph-16.2.7/src/common/dout.h:29,
> from /builddir/build/BUILD/ceph-16.2.7/src/common/debug.h:18,
> from
> /builddir/build/BUILD/ceph-16.2.7/src/mgr/ActivePyModule.cc:16:
> /usr/include/boost/integer_traits.hpp:83:64: error: narrowing
> conversion of '255' from 'int' to 'char' [-Wnarrowing]
> 83 | public detail::integer_traits_base<char, CHAR_MIN, CHAR_MAX>
> |
>
> https://koji.fedoraproject.org/koji/taskinfo?taskID=81520773
>
> Are we expecting an update to boost by any chance?
Thanks for the preprocessed source. That clearly shows a bug in
python3:
# 1681 "/usr/include/python3.10/pyconfig-64.h" 3 4
#define _DARWIN_C_SOURCE 1
#define _FILE_OFFSET_BITS 64
#define _GNU_SOURCE 1
#define _LARGEFILE_SOURCE 1
#define _NETBSD_SOURCE 1
#define _POSIX_C_SOURCE 200809L
#define _PYTHONFRAMEWORK ""
#define _REENTRANT 1
#define _XOPEN_SOURCE 700
#define _XOPEN_SOURCE_EXTENDED 1
#define __BSD_VISIBLE 1
#define __CHAR_UNSIGNED__ 1
__CHAR_UNSIGNED__ is a gcc predefined macro that is defined iff
-funsigned-char is in effect (by default or explicit), while it
shouldn't be defined if -fsigned-char is in effect (by default or
explicit). As you used -fsigned-char option on -funsigned-char
defaulting arch, gcc correctly doesn't predefine __CHAR_UNSIGNED__.
But this python header defines it anyway which is just wrong,
because it breaks -fsigned-char explicit option on arches that default
to -funsigned-char - glibc limits.h that is included later will:
/* Minimum and maximum values a `char' can hold. */
# ifdef __CHAR_UNSIGNED__
# define CHAR_MIN 0
# define CHAR_MAX UCHAR_MAX
# else
# define CHAR_MIN SCHAR_MIN
# define CHAR_MAX SCHAR_MAX
# endif
and so CHAR_{MIN,MAX} won't match what char actually is.
If python wants in configure some macro for its own purposes,
it shouldn't use __CHAR_UNSIGNED__ but should use some
ideally non-reserved namespace identifier of its own.
Jakub
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam on the list, report it:
https://pagure.io/fedora-infrastructure