Package: libboost-dev
Version: 1.74.0.3
Severity: serious
Tags: ftbfs
Justification: fails to build from source (but built successfully in the past)
X-Debbugs-Cc: r4...@i2pd.xyz

When I'm trying to build upstream i2pd, which uses Boost ASIO using g++ with 
C++20 enabled 
(https://github.com/PurpleI2P/i2pd/commit/a6f9a56e40a40f5a9d153e701a067c5251669ac4),
 g++ throws error:

g++ -g -O2 -ffile-prefix-map=/github/workspace=. -fstack-protector-strong 
-Wformat -Werror=format-security -Wall -pedantic -std=c++20 -fPIC -DUSE_UPNP 
-D__AES__ -maes -MMD -MP -Ilibi2pd -Ilibi2pd_client -Ii18n 
-DOPENSSL_SUPPRESS_DEPRECATED  -c -o obj/libi2pd/Crypto.o libi2pd/Crypto.cpp
In file included from /usr/include/boost/asio.hpp:23,
                 from libi2pd/Timestamp.h:16,
                 from libi2pd/TunnelBase.h:14,
                 from libi2pd/Crypto.cpp:17:
/usr/include/boost/asio/awaitable.hpp: In constructor 
‘boost::asio::awaitable<T, Executor>::awaitable(boost::asio::awaitable<T, 
Executor>&&)’:
/usr/include/boost/asio/awaitable.hpp:68:19: error: ‘exchange’ is not a member 
of ‘std’; did you mean ‘std::__atomic_impl::exchange’?
   68 |     : frame_(std::exchange(other.frame_, nullptr))
      |                   ^~~~~~~~
In file included from /usr/include/c++/12/bits/shared_ptr_atomic.h:33,
                 from /usr/include/c++/12/memory:78,
                 from libi2pd/Crypto.cpp:13:
/usr/include/c++/12/bits/atomic_base.h:976:7: note: 
‘std::__atomic_impl::exchange’ declared here
  976 |       exchange(_Tp* __ptr, _Val<_Tp> __desired, memory_order __m) 
noexcept
      |       ^~~~~~~~

Looks like boost is using deprecated or removed C++20 functions.
Tests are done on latest debian:bookworm docker image.


-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-16-amd64 (SMP w/8 CPU threads)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect

Versions of packages libboost-dev depends on:
ii  libboost1.74-dev  1.74.0-18.1

libboost-dev recommends no packages.

Versions of packages libboost-dev suggests:
pn  libboost-doc  <none>

-- no debconf information

Reply via email to