#1123541 `libboost-iostreams-dev` has implicit dependencies

Package:
libboost-iostreams-dev
Source:
libboost-iostreams-dev
Description:
Boost.Iostreams Library development files (default version)
Submitter:
andrej730@icloud.com
Date:
2025-12-17 15:07:03 UTC
Severity:
normal
#1123541#5
Date:
2025-12-17 14:27:39 UTC
From:
To:
Hi! Stumbled upon `libboost-iostreams-dev` not providing all dependencies, leading to issue during linking.

For example:
```sh
sudo apt-get install -y libboost-iostreams-dev
mkdir build && cd build
cmake ..
# /usr/bin/ld: cannot find -lbz2: No such file or directory
# /usr/bin/ld: cannot find -llzma: No such file or directory
# /usr/bin/ld: cannot find -lz: No such file or directory
# /usr/bin/ld: cannot find -lzstd: No such file or directory
make

sudo apt-get install -y liblzma-dev libzstd-dev libbz2-dev zlib1g-dev
# Build succeeds.
make
```

Issue is caused by cmake config `libboost_iostreams-variant-static.cmake` having those libraries as dependencies:
```cmake
if(CMAKE_CONFIGURATION_TYPES)
  set_property(TARGET Boost::iostreams APPEND PROPERTY INTERFACE_LINK_LIBRARIES
    "$<$<CONFIG:release>:bz2;lzma;z;zstd>")
else()
  set_property(TARGET Boost::iostreams APPEND PROPERTY INTERFACE_LINK_LIBRARIES
    bz2 lzma z zstd)
endif()
```

cmake file used:
```cmake
cmake_minimum_required(VERSION 3.21)
project(test-cmake)

set(Boost_USE_STATIC_LIBS ON)
find_package(Boost CONFIG REQUIRED COMPONENTS iostreams)
# main.cpp is not important - just some hello world.
add_executable(main main.cpp)
message(STATUS "libs are ${Boost_LIBRARIES}")
target_link_libraries(main PRIVATE Boost::iostreams)
```