Opened 19 months ago

Closed 18 months ago

Last modified 15 months ago

#67324 closed defect (fixed)

boost1{76..80}: +clang16 doesn't build

Reported by: blair (Blair Zajac) Owned by: mascguy (Christopher Nielsen)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: michaelld (Michael Dickens), sambthompson (Sam Thompson)
Port: boost176 boost177 boost178 boost179 boost180

Description

Trying to build boost176 +clang16 fails:

In file included from libs/python/src/converter/builtin_converters.cpp:21:
In file included from ./boost/cast.hpp:18:
In file included from ./boost/numeric/conversion/cast.hpp:33:
In file included from ./boost/numeric/conversion/converter.hpp:13:
In file included from ./boost/numeric/conversion/conversion_traits.hpp:13:
In file included from ./boost/numeric/conversion/detail/conversion_traits.hpp:18:
In file included from ./boost/numeric/conversion/detail/int_float_mixture.hpp:19:
In file included from ./boost/mpl/integral_c.hpp:32:
./boost/mpl/aux_/integral_wrapper.hpp:73:31: error: integer value -1 is outside the valid range of values [0, 3] for this enumeration type [-Wenum-constexpr-conversion]
    typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value - 1)) ) prior;
                              ^

Building with the +clang15 variant compiles fine.

Any suggestions?

Attachments (1)

boost-clang16-cpp17-compat.diff (4.2 KB) - added by sambthompson (Sam Thompson) 19 months ago.
patch file to meet c++17 compliance enforcement of deprecations in clang16

Download all attachments as: .zip

Change History (7)

comment:1 Changed 19 months ago by jmroot (Joshua Root)

Cc: mascguy added
Owner: set to michaelld
Status: newassigned

comment:2 Changed 19 months ago by sambthompson (Sam Thompson)

Found this issue as well when rebuilding mkvtoolnix after the changes discussed in ticket:65895. Relates to a bug fix applied to clang-16 and later, discussed here: https://github.com/llvm/llvm-project/issues/50055

Fixed it by cherry-picking this commit https://github.com/boostorg/numeric_conversion/commit/50a1eae942effb0a9b90724323ef8f2a67e7984a to the boost176 installation, found on Boost's version of this issue at https://github.com/boostorg/mpl/issues/69. This fix didn't land until Boost 1.81, so probably needs application to versions 1.77 thru 1.80 as well if clang16 support is wanted for these earlier versions.

For mkvtoolnix, I also needed the fix for BOOST_NO_CXX98_FUNCTION_BASE found in https://github.com/boostorg/config/pull/440, which related to this issue: https://github.com/boostorg/container_hash/issues/24. This also didn't land until 1.81.

Last edited 19 months ago by sambthompson (Sam Thompson) (previous) (diff)

comment:3 Changed 19 months ago by sambthompson (Sam Thompson)

Cc: sambthompson added

Changed 19 months ago by sambthompson (Sam Thompson)

patch file to meet c++17 compliance enforcement of deprecations in clang16

comment:4 Changed 18 months ago by mascguy (Christopher Nielsen)

Cc: michaelld added; mascguy removed
Owner: changed from michaelld to mascguy
Port: boost177 boost178 boost179 boost180 added
Summary: boost176 +clang16 doesn't buildboost1{76..80}: +clang16 doesn't build

comment:5 Changed 18 months ago by Christopher Nielsen <mascguy@…>

Resolution: fixed
Status: assignedclosed

In f84fa6745d9d0f9e15b80e384e315e828539ec73/macports-ports (master):

boost1{76..80}: add upstream patch for clang16/cxx17
Fixes: #67324

comment:6 Changed 15 months ago by chrstphrchvz (Christopher Chavez)

In 7c8b67b176e40af955155b989241842500d79f5c/macports-ports (master):

mysql8, mysql81: fix LLVM Clang 16 build

See: #67324

Note: See TracTickets for help on using tickets.