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

[7zip:x64-linux] build failure #13793

Closed
n4z4m3 opened this issue Sep 28, 2020 · 4 comments · Fixed by #13821
Closed

[7zip:x64-linux] build failure #13793

n4z4m3 opened this issue Sep 28, 2020 · 4 comments · Fixed by #13821
Assignees
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist

Comments

@n4z4m3
Copy link
Contributor

n4z4m3 commented Sep 28, 2020

  • OS: Ubuntu 20.04.1 LTS
  • Compiler: gcc-10

To Reproduce:
./vcpkg install 7zip

Failure logs:
buildtrees/7zip/install-x64-linux-dbg-out.log

[1/259] /usr/bin/c++ -DEXTERNAL_CODECS -DUNICODE -D_7ZIP_LARGE_PAGES -D_UNICODE -fPIC -g /wd5043 -MD -MT CMakeFiles/7zip.dir/CPP/7zip/Archive/Common/ItemNameUtils.cpp.o -MF CMakeFiles/7zip.dir/CPP/7zip/Archive/Common/ItemNameUtils.cpp.o.d -o CMakeFiles/7zip.dir/CPP/7zip/Archive/Common/ItemNameUtils.cpp.o -c /home/nmercer/vcpkg/buildtrees/7zip/src/19.00-d6071f9706.clean/CPP/7zip/Archive/Common/ItemNameUtils.cpp
FAILED: CMakeFiles/7zip.dir/CPP/7zip/Archive/Common/ItemNameUtils.cpp.o
/usr/bin/c++ -DEXTERNAL_CODECS -DUNICODE -D_7ZIP_LARGE_PAGES -D_UNICODE -fPIC -g /wd5043 -MD -MT CMakeFiles/7zip.dir/CPP/7zip/Archive/Common/ItemNameUtils.cpp.o -MF CMakeFiles/7zip.dir/CPP/7zip/Archive/Common/ItemNameUtils.cpp.o.d -o CMakeFiles/7zip.dir/CPP/7zip/Archive/Common/ItemNameUtils.cpp.o -c /home/nmercer/vcpkg/buildtrees/7zip/src/19.00-d6071f9706.clean/CPP/7zip/Archive/Common/ItemNameUtils.cpp
c++: error: /wd5043: No such file or directory

[7/259] ml -DEXTERNAL_CODECS -DUNICODE -D_7ZIP_LARGE_PAGES -D_UNICODE /wd5043 -Dx64 /c /Fo CMakeFiles/7zip.dir/Asm/x86/AesOpt.asm.o /home/nmercer/vcpkg/buildtrees/7zip/src/19.00-d6071f9706.clean/Asm/x86/AesOpt.asm
FAILED: CMakeFiles/7zip.dir/Asm/x86/AesOpt.asm.o
ml -DEXTERNAL_CODECS -DUNICODE -D_7ZIP_LARGE_PAGES -D_UNICODE /wd5043 -Dx64 /c /Fo CMakeFiles/7zip.dir/Asm/x86/AesOpt.asm.o /home/nmercer/vcpkg/buildtrees/7zip/src/19.00-d6071f9706.clean/Asm/x86/AesOpt.asm
/bin/sh: 1: ml: not found
install-x64-linux-dbg-out.log

@NancyLi1013 NancyLi1013 added category:port-bug The issue is with a library, which is something the port should already support category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist and removed category:port-bug The issue is with a library, which is something the port should already support labels Sep 29, 2020
@cngzhnp
Copy link
Contributor

cngzhnp commented Sep 29, 2020

There are many problems with this cmake file as far as I understood. First of all, the problem that you got is related to the "warning disabled" parameter that was available for only Windows. So, it should be rewritten for Linux. On the other hand, ASM_MASM language option available for only Windows not for Linux. The language option should be parametric even supporting Linux.

Also, I checked that the source code of 7zip is located in a different URL than the current one. So, it has to be compiled /handled explicitly, I guess. So, it takes more time than I expect to figure out how to work in POSIX world.

@NancyLi1013
Copy link
Contributor

Hi @nazame
Thanks for posting this issue. Currently, 7zip only supports windows.

@cngzhnp
Thanks for your above information. It's awesome. We need to update CMakeLists.txt to make it work on both Windows and Linux.

@n4z4m3
Copy link
Contributor Author

n4z4m3 commented Sep 29, 2020

@NancyLi1013 I looked more at this and I think you are right that 7zip only supports windows and I really don't think there is much we can do about it. The source code makes heavy usage of Windows only features. This is supported by the fact that the 7zip tool is only available for windows and in Linux you would instead need to use p7zip which is a port with Linux support.

Personally I just use 7zip for LZMA support, but it looks like if I want my code to be cross-platform I will need to use a different compression library such as liblzma, libarchive, or libzip.

Therefore, I think for this issue, we may just need to add the vcpkg_fail_port_install(ON_TARGET ...) command to the portfile with all non-windows targets.

@NancyLi1013
Copy link
Contributor

@nazame
Thanks for your deep investigation for 7zip. I also went through 7zip official website and found that there was another archive file for Linux platform. As you said above, it is p7zip. I also checked the archive .The latest version seems a bit older, which is 16.04.
Since they are two different ports, we might consider to add p7zip as a new port if possible. I think your suggestion is suitable and we should add the unsupported message for 7zip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants