-
-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to compile boost library with iostream's compression #4866
Comments
try this patch #4868 |
Sorry for late reply, it does compile however i get link time error when using library. #include <boost/iostreams/filter/lzma.hpp>
#include <boost/iostreams/filtering_stream.hpp>
void main() {
boost::iostreams::filtering_ostream out;
out.push(boost::iostreams::lzma_compressor());
} Produces the following:
|
Fixed aee0395, try it again |
Now its a different error, related to lzma
|
It weird. This error is caused when boost not use xmake-repo/packages/b/boost/xmake.lua Lines 317 to 320 in aee0395
|
Huh, you're right, my bad, i was also adding package the code: #include <boost/iostreams/filter/gzip.hpp>
#include <boost/iostreams/filtering_stream.hpp>
#include <boost/iostreams/copy.hpp>
#include <boost/iostreams/device/array.hpp>
#include <vector>
#include <iostream>
void main() {
// Compressed code
static constexpr char compressedCode[] = { 0x1F, 0x8B, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0xF3, 0x48, 0xCD, 0xC9, 0xC9, 0xD7, 0x51, 0x8, 0xCF, 0x2F, 0xCA, 0x49, 0x51, 0x4, 0x0, 0xD0, 0xC3, 0x4A, 0xEC, 0xD, 0x0, 0x0, 0x0 };
// Decompressed code
std::vector<char> decompressedCode;
namespace bio = boost::iostreams;
bio::filtering_istream stream;
stream.push(bio::gzip_decompressor());
stream.push(bio::array_source(compressedCode, sizeof(compressedCode)));
bio::copy(stream, std::back_inserter(decompressedCode));
// Print decompressed code
std::cout << std::string(decompressedCode.data(), decompressedCode.size()) << std::endl;
} the error:
|
After explicitly handling |
Xmake Version
v2.9.4+HEAD.e85b001f1
Operating System Version and Architecture
Windows 11 23H2
Describe Bug
As the title says, i get
attempt to index a nil value (local 'dep')
error when attempting to install boost with iostreams+lzma.Expected Behavior
The boost with iostreams+lzma library to be correctly installed.
Project Configuration
Additional Information and Error Logs
boost.log
The text was updated successfully, but these errors were encountered: