Bug 2042336 - boost-iostreams is missing zstd support
Summary: boost-iostreams is missing zstd support
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: boost
Version: 35
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Thomas Rodgers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-19 09:22 UTC by Sergio Losilla
Modified: 2022-07-30 01:25 UTC (History)
6 users (show)

Fixed In Version: boost-1.76.0-5.fc35
Clone Of:
Environment:
Last Closed: 2022-07-30 01:25:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
main.cpp (260 bytes, text/plain)
2022-01-19 09:22 UTC, Sergio Losilla
no flags Details

Description Sergio Losilla 2022-01-19 09:22:30 UTC
Created attachment 1851830 [details]
main.cpp

Description of problem:

The distributed boost-iostreams libraries are not built with zstd support. However, the headers distributed with boost-devel contain all the necessary declarations.

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

1.76.0-4.fc35

How reproducible:

Always.

Steps to Reproduce:
1. Create main.cpp with the following content (or download attached file).

    #include <boost/iostreams/filter/zstd.hpp>
    #include <boost/iostreams/filtering_streambuf.hpp>

    int main(int argc, char** argv)
    {
        boost::iostreams::filtering_streambuf<boost::iostreams::input> in;
        in.push(boost::iostreams::zstd_decompressor());
    }

2. g++ -lboost_iostreams main.cpp

Actual results:

Many undefined reference errors,
collect2: error: ld returned 1 exit status

Expected results:

No errors, a.out is compiled successfully.

Comment 1 Tom Shield 2022-01-20 17:39:30 UTC
I have the same problem.  

If you get the src rpm, boost-1.76.0-4.fc35.src.rpm, and use rpmbuild to prepare the sources, running b2 (after building it with the bootstrap.sh script) in libs/iostreams will build a library that gives the following output (I've already put my updated library in /usr/lib64):

root@taylor lib64]# nm -gDC /usr/lib64/libboost_iostreams.so | grep zstd
00000000000100aa T boost::iostreams::zstd_error::check(unsigned long)
000000000001003e T boost::iostreams::zstd_error::zstd_error(unsigned long)
000000000001003e T boost::iostreams::zstd_error::zstd_error(unsigned long)
0000000000011f20 R boost::iostreams::zstd::best_speed
0000000000011f30 R boost::iostreams::zstd::stream_end
0000000000011f24 R boost::iostreams::zstd::best_compression
0000000000011f28 R boost::iostreams::zstd::default_compression
0000000000011f3c R boost::iostreams::zstd::run
0000000000011f2c R boost::iostreams::zstd::okay
0000000000011f38 R boost::iostreams::zstd::flush
0000000000011f34 R boost::iostreams::zstd::finish
0000000000010266 T boost::iostreams::detail::zstd_base::after(char const*&, char*&, bool)
0000000000010478 T boost::iostreams::detail::zstd_base::reset(bool, bool)
00000000000101cc T boost::iostreams::detail::zstd_base::before(char const*&, char const*, char*&, char*)
00000000000102c8 T boost::iostreams::detail::zstd_base::deflate(int)
0000000000010522 T boost::iostreams::detail::zstd_base::do_init(boost::iostreams::zstd_params const&, bool, void* (*)(void*, unsigned long, unsigned long), void (*)(void*, void*), void*)
00000000000103c6 T boost::iostreams::detail::zstd_base::inflate(int)
000000000001010c T boost::iostreams::detail::zstd_base::zstd_base()
000000000001010c T boost::iostreams::detail::zstd_base::zstd_base()
000000000001016a T boost::iostreams::detail::zstd_base::~zstd_base()
000000000001016a T boost::iostreams::detail::zstd_base::~zstd_base()
0000000000017c80 V typeinfo for boost::wrapexcept<boost::iostreams::zstd_error>
0000000000017cc8 V typeinfo for boost::iostreams::zstd_error
0000000000011f40 V typeinfo name for boost::wrapexcept<boost::iostreams::zstd_error>
0000000000011f80 V typeinfo name for boost::iostreams::zstd_error
0000000000017be0 V vtable for boost::wrapexcept<boost::iostreams::zstd_error>
0000000000017c58 V vtable for boost::iostreams::zstd_error

doing this command on the library from boost-iostreams-1.76.0-4.fc35.x86_64 produces no output.

So perhaps libzstd-devel was missing on the build machine, because it does not seem to be a configuration issue with the sources.

Comment 2 Jonathan Wakely 2022-01-20 18:54:46 UTC
It's not "missing" from the build machine, because all RPMs are built in a clean environment with only the necessary packages installed. That set of packages includes only what has been explicitly configured for the RPM being built.

We just need to add "BuildRequires: libzstd-devel" to the spec file, so that it's added the the build root.

Comment 3 Fedora Update System 2022-04-27 19:40:59 UTC
FEDORA-2022-ce38a6e391 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-ce38a6e391

Comment 4 Fedora Update System 2022-04-28 05:11:42 UTC
FEDORA-2022-ce38a6e391 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-ce38a6e391`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-ce38a6e391

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

Comment 5 Fedora Update System 2022-05-07 04:33:33 UTC
FEDORA-2022-ce38a6e391 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2022-07-14 21:31:05 UTC
FEDORA-2022-4b3c2b910c has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-4b3c2b910c

Comment 7 Fedora Update System 2022-07-15 02:09:19 UTC
FEDORA-2022-4b3c2b910c has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-4b3c2b910c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-4b3c2b910c

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

Comment 8 Fedora Update System 2022-07-30 01:25:48 UTC
FEDORA-2022-4b3c2b910c has been pushed to the Fedora 35 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.