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

Performing Test HAVE_LZMA_STREAM_ENCODER_MT - Failed #816

Open
tpgxyz opened this issue Oct 29, 2016 · 11 comments
Open

Performing Test HAVE_LZMA_STREAM_ENCODER_MT - Failed #816

tpgxyz opened this issue Oct 29, 2016 · 11 comments

Comments

@tpgxyz
Copy link
Contributor

tpgxyz commented Oct 29, 2016

Looks like test for HAVE_LZMA_STREAM_ENCODER_MT is wrong as it always fails, and finally libarchive is not compiled with MT support, which does have negative impact on overall performance.

Logs can be found here:
http://file-store.openmandriva.org/api/v1/file_stores/c859a292f42a4ee076b98a173626f4ecaa9eb61f.log?show=true

@jsonn
Copy link
Contributor

jsonn commented Oct 29, 2016

You didn't include the actual cmake log and I don't even know if your distribution is shipping a version of liblzma that has working MT encoding. E.g. Debian certainly ships broken versions of it.

@tpgxyz
Copy link
Contributor Author

tpgxyz commented Oct 30, 2016

@jsonn We are using xz-5.2.2 as liblzma
https://github.com/OpenMandrivaAssociation/xz/blob/master/xz.spec

I'll try to provide cmake log

@mmatuska
Copy link
Member

@tpgxyz any news on this?

@codicodi
Copy link

codicodi commented Jan 5, 2017

I reproduced this issue, test fails with
Cannot open include file: 'lzma.h': No such file or directory
so I think the test is simply not fed with correct include dir.
Edit: adding this before test:

set(CMAKE_REQUIRED_INCLUDES ${LZMA_INCLUDE_DIR})
set(CMAKE_REQUIRED_LIBRARIES ${LZMA_LIBRARIES})

seems to make it finally succeed.

@tpgxyz
Copy link
Contributor Author

tpgxyz commented Jan 9, 2017

@jsonn @mmatuska Here are the logs
http://file-store.openmandriva.org/api/v1/file_stores/6ccbc92a17a5383240e5fe20c9bf60365c303611.log?show=true

sorry for the delay.

With @codicodi suggests i've prepared patch:
https://github.com/OpenMandrivaAssociation/libarchive/blob/master/libarchive-3.2.2-fix-lzma.h-detect.patch

Building with patch applied i get:
-- Performing Test HAVE_LZMA_STREAM_ENCODER_MT - Success

@tpgxyz
Copy link
Contributor Author

tpgxyz commented Feb 21, 2017

@mmatuska @kientzle Guys can you please merge this patch ?

@bradking
Copy link
Contributor

@mmatuska I don't think commit 5f70aa2 is the correct fix anymore. It logically conflicts with 30e1b7e. The latter renamed the variables that we need to reference.

@mmatuska mmatuska reopened this Feb 22, 2017
@mmatuska
Copy link
Member

mmatuska commented Feb 22, 2017

Thank you @bradking.
@tpgxyz please test with libarchive 3.3, we have changed the way how LibLzma is detected.

mmatuska added a commit to mmatuska/libarchive that referenced this issue Feb 22, 2017
This reverts commit 5f70aa2.
Additional information needed in libarchive#816
@tpgxyz
Copy link
Contributor Author

tpgxyz commented Feb 23, 2017

@mmatuska @kientzle Ok, i've tried 3.3.0 version unfortunately i got
-- Performing Test HAVE_LZMA_STREAM_ENCODER_MT - Failed

See logs here
https://abf.openmandriva.org/build_lists/98436

I've sent a PR #875

@craigholm
Copy link

I'm not sure if this is the problem others are having, but in my case the HAVE_LZMA_STREAM_ENCODER_MT test is failing (with 3.3.2) because I'm using liblzma as a static library. The relevant lines from CMakeError.log:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\CL.exe /c /IE:\Projects\include /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D _WINDOWS /D WITHOUT_LZMA_API_STATIC /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_d86e5.dir\Debug\\" /Fd"cmTC_d86e5.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue "E:\Projects\libarchive-3.3.2\CMakeFiles\CMakeTmp\src.c"
[...]
src.obj : error LNK2019: unresolved external symbol __imp_lzma_stream_encoder_mt referenced in function main [E:\Projects\libarchive-3.3.2\CMakeFiles\CMakeTmp\cmTC_7058d.vcxproj]

CMake correctly sets LZMA_API_STATIC in the resulting project output (which builds correctly with or without HAVE_LZMA_STREAM_ENCODER_MT) because the initial WITHOUT_LZMA_API_STATIC test fails, but it still sets WITHOUT_LZMA_API_STATIC, not LZMA_API_STATIC, when it performs the HAVE_LZMA_STREAM_ENCODER_MT test.

@kientzle
Copy link
Contributor

kientzle commented Feb 18, 2018 via email

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

No branches or pull requests

7 participants