Package: libboost-serialization1.74-dev
Version: 1.74.0+ds1-20
Severity: important
X-Debbugs-Cc: jsupert...@dnmx.org

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***

How to reproduce: create a simple project that includes 
boost/serialization/optional.hpp, like so:
CMakeLists.txt:
cmake_minimum_required(VERSION 3.25)
project(BoostTest LANGUAGES CXX)

find_package(Boost REQUIRED COMPONENTS serialization)

add_library(mylibrary SHARED
        main.cpp)
        
target_link_libraries(mylibrary INTERFACE Boost::serialization)

main.cpp:
#include <boost/serialization/optional.hpp>

void main (int argc, char* argv[])
{
        return 0;
}


This configures fine, but breaks when compiling. 
CMake output:
$ cmake ..
-- The CXX compiler identification is GNU 12.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake 
(found version "1.74.0") found components: serialization 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sdebian/custom-deb/boosttest/build

Compiler output:
$ make
[ 50%] Building CXX object CMakeFiles/mylibrary.dir/main.cpp.o
In file included from /home/sdebian/custom-deb/boosttest/main.cpp:1:
/usr/include/boost/serialization/optional.hpp:98:8: error: ‘version’ is not a 
class template
   98 | struct version<boost::optional<T> > {
      |        ^~~~~~~
/home/sdebian/custom-deb/boosttest/main.cpp:3:1: error: ‘::main’ must return 
‘int’
    3 | void main (int argc, char* argv[])
      | ^~~~
make[2]: *** [CMakeFiles/mylibrary.dir/build.make:76: 
CMakeFiles/mylibrary.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/mylibrary.dir/all] Error 2
make: *** [Makefile:91: all] Error 2



-- System Information:
Debian Release: 12.0
  APT prefers testing-security
  APT policy: (500, 'testing-security'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-6-amd64 (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libboost-serialization1.74-dev depends on:
ii  libboost-serialization1.74.0  1.74.0+ds1-20
ii  libboost1.74-dev              1.74.0+ds1-20

libboost-serialization1.74-dev recommends no packages.

libboost-serialization1.74-dev suggests no packages.

-- no debconf information

Reply via email to