Skip to content
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

Linux build problem #324

Open
wupengcheng6819 opened this issue May 18, 2023 · 4 comments
Open

Linux build problem #324

wupengcheng6819 opened this issue May 18, 2023 · 4 comments

Comments

@wupengcheng6819
Copy link

I was trying to build 7za within the 7-Zip-zstd/CPP/7zip/Bundles/Alone folder, but the final linking (zstd library) always fails:

/usr/bin/ld: _o/ZipAddCommon.o: in function `NArchive::NZip::CAddCommon::Compress(ISequentialInStream*, IOutStream*, bool, bool, unsigned int, unsigned long long, ICompressProgressInfo*, NArchive::NZip::CCompressingResult&)':
ZipAddCommon.cpp:(.text+0x1958): undefined reference to `NCompress::NZSTD::CEncoder::CEncoder()'
/usr/bin/ld: _o/ZipHandler.o: in function `NArchive::NZip::CZstdDecoder::CZstdDecoder()':
ZipHandler.cpp:(.text+0x1e29): undefined reference to `NCompress::NZSTD::CDecoder::CDecoder()'
collect2: error: ld returned 1 exit status

I had " pathTo/zstdmt/programs/zstd/lib/libzstd.a" added to the link command g++ -o _o/7za -s -DNDEBUG _o/7zStream.o _o/Alloc.o ... -lpthread -ldl , but no avail.

The make command is per the standard document:
make -j makefile.gcc

gcc/++ version: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0

@wupengcheng6819
Copy link
Author

Actually I figured out that the ZstdEncoder.o and ZstdDecoder.o were not built, with which the build becomes successful. But now the problem is that the built 7zz is not handling new codec properly, either -m0=ZSTD or -m0=FLZMA doesn't work, while -m0=LZMA works fine.

@mcmilk
Copy link
Owner

mcmilk commented May 28, 2023

Can you add some more work on it and provide some pull request with the needed changes?
I would like to have some building also on linux... but my time is currently very limited.

@wupengcheng6819
Copy link
Author

I am not familiar with Github code management, not sure what I should do...

@hemnstill
Copy link

hemnstill commented Aug 4, 2023

https://www.7-zip.org have "full" standalone version for linux: 7zzs. It builds without problems.
and have a new plan to add zstd: https://sourceforge.net/p/sevenzip/feature-requests/1580/

https://github.com/p7zip-project/p7zip (with zstd) also successfully builds on linux

I want the same thing for this project 7-Zip-zstd Alone2 (7zz)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants