Bug 1818723 - /usr/include/boost/format/alt_sstream_impl.hpp incompatible with -std=c++20 (std::allocator::allocate hint argument)
Summary: /usr/include/boost/format/alt_sstream_impl.hpp incompatible with -std=c++20 (...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: boost
Version: 32
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jonathan Wakely
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-30 08:24 UTC by Stephan Bergmann
Modified: 2020-04-15 21:01 UTC (History)
3 users (show)

Fixed In Version: boost-1.69.0-15.fc32
Clone Of:
Environment:
Last Closed: 2020-04-07 05:05:10 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Stephan Bergmann 2020-03-30 08:24:56 UTC
Description of problem:

> $ cat test.cc
> #include <boost/format.hpp>
> int main() {
>   boost::format("");
> }

> $ g++ -std=c++20 test.cc
> In file included from /usr/include/boost/format/alt_sstream.hpp:174,
>                  from /usr/include/boost/format/internals.hpp:24,
>                  from /usr/include/boost/format.hpp:38,
>                  from test.cc:1:
> /usr/include/boost/format/alt_sstream_impl.hpp: In instantiation of ‘boost::io::basic_altstringbuf<Ch, Tr, Alloc>::int_type boost::io::basic_altstringbuf<Ch, Tr, Alloc>::overflow(boost::io::basic_altstringbuf<Ch, Tr, Alloc>::int_type) [with Ch = char; Tr = std::char_traits<char>; Alloc = std::allocator<char>; boost::io::basic_altstringbuf<Ch, Tr, Alloc>::int_type = int]’:
> /usr/include/boost/format/alt_sstream_impl.hpp:227:9:   required from here
> /usr/include/boost/format/alt_sstream_impl.hpp:261:45: error: no matching function for call to ‘std::allocator<char>::allocate(std::size_t&, char*)’
>   261 |                     newptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0);
>       |                              ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from /usr/include/c++/10/vector:64,
>                  from /usr/include/boost/format.hpp:17,
>                  from test.cc:1:
> /usr/include/c++/10/bits/allocator.h:171:7: note: candidate: ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = char; std::size_t = long unsigned int]’
>   171 |       allocate(size_t __n)
>       |       ^~~~~~~~
> /usr/include/c++/10/bits/allocator.h:171:7: note:   candidate expects 1 argument, 2 provided


Version-Release number of selected component (if applicable):

boost-devel-1.69.0-14.fc32.x86_64
gcc-c++-10.0.1-0.9.fc32.x86_64


Additional info:

Upstream fix waiting at <https://github.com/boostorg/format/pull/70> "Removed deprecated std::allocator<void>".

(Not sure if Fedora would actually want to make this work out of the box, or rather treats g++ -std=c++20 as experimental.)

Comment 1 Jonathan Wakely 2020-03-30 08:40:58 UTC
GCC's C++20 support definitely is experimental, but that doesn't mean we can't patch Boost to work with it.

Comment 2 Jonathan Wakely 2020-03-30 17:10:56 UTC
Fixed in rawhide by boost-1.69.0-15.fc33.

The fix for F32 needs to wait for https://bodhi.fedoraproject.org/updates/FEDORA-2020-b2de059578 to reach the buildroot.

I'll also fix it for F31 and F30, so people using their own GCC 10 builds don't hit the issue.

Comment 3 Fedora Update System 2020-03-30 21:21:14 UTC
FEDORA-2020-e9c132ec6a has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2020-e9c132ec6a

Comment 4 Fedora Update System 2020-03-30 21:21:15 UTC
FEDORA-2020-c347d1cbdf has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-c347d1cbdf

Comment 5 Fedora Update System 2020-03-31 02:25:43 UTC
FEDORA-2020-c347d1cbdf has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-c347d1cbdf`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-c347d1cbdf

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2020-03-31 03:34:27 UTC
FEDORA-2020-e9c132ec6a has been pushed to the Fedora 30 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-e9c132ec6a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-e9c132ec6a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Jonathan Wakely 2020-03-31 11:36:34 UTC
Fixed everywhere *except* F32 so far. There was a gcc/annobin SNAFU in the testing repo so I'll try again tomorrow.

I didn't use the upstream patch, because it's wrong.

Comment 8 Fedora Update System 2020-04-02 15:51:24 UTC
FEDORA-2020-c4282b0c5f has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-c4282b0c5f

Comment 9 Fedora Update System 2020-04-03 19:56:22 UTC
FEDORA-2020-c4282b0c5f has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-c4282b0c5f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-c4282b0c5f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2020-04-07 05:05:10 UTC
FEDORA-2020-c4282b0c5f has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2020-04-07 13:16:06 UTC
FEDORA-2020-c4282b0c5f has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2020-04-15 20:32:50 UTC
FEDORA-2020-c347d1cbdf has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2020-04-15 21:01:02 UTC
FEDORA-2020-e9c132ec6a has been pushed to the Fedora 30 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.