microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.97k stars 6.34k forks source link

[openssl] Build error #32787

Open esvyhled opened 1 year ago

esvyhled commented 1 year ago

Package: openssl:x64-windows -> 3.1.1#1

Host Environment

To Reproduce

vcpkg install openssl:x64-windows

Failure logs

-- Using cached openssl-openssl-openssl-3.1.1.tar.gz.
-- Cleaning sources at C:/src/vcpkg/buildtrees/openssl/src/nssl-3.1.1-53a8e40f57.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/src/vcpkg/downloads/openssl-openssl-openssl-3.1.1.tar.gz
-- Applying patch disable-apps.patch
-- Applying patch disable-install-docs.patch
-- Applying patch script-prefix.patch
-- Applying patch windows/install-layout.patch
-- Applying patch windows/install-pdbs.patch
-- Applying patch unix/android-cc.patch
-- Applying patch unix/move-openssldir.patch
-- Applying patch unix/no-empty-dirs.patch
-- Applying patch unix/no-static-libs-for-shared.patch
-- Using source at C:/src/vcpkg/buildtrees/openssl/src/nssl-3.1.1-53a8e40f57.clean
-- Found external ninja('1.11.0').
-- Getting CMake variables for x64-windows
-- Getting CMake variables for x64-windows
-- Prerunning x64-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:112 (message):
    Command failed: C:/Windows/PERL Configure enable-static-engine enable-capieng no-ssl3 no-weak-ssl-ciphers no-tests shared no-apps no-makedepend VC-WIN64A --debug --prefix=C:\\src\\vcpkg\\packages\\openssl_x64-windows\\debug --openssldir=C:\\src\\vcpkg\\packages\\openssl_x64-windows\\debug AS=C:\\src\\vcpkg\\downloads\\tools\\nasm\\nasm-2.16.01\\nasm.exe "CC=C:\\Program Files\\Microsoft Visual Studio\\2022\\Professional\\VC\\Tools\\MSVC\\14.36.32532\\bin\\Hostx64\\x64\\cl.exe" "CFLAGS=  -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -MP  -D_DEBUG -MDd -Z7 -Ob0 -Od -RTC1  " "AR=C:\\Program Files\\Microsoft Visual Studio\\2022\\Professional\\VC\\Tools\\MSVC\\14.36.32532\\bin\\Hostx64\\x64\\lib.exe" "ARFLAGS=-machine:x64 -nologo" "LD=C:\\Program Files\\Microsoft Visual Studio\\2022\\Professional\\VC\\Tools\\MSVC\\14.36.32532\\bin\\Hostx64\\x64\\link.exe" "LDFLAGS= -machine:x64 -nologo    -debug -INCREMENTAL "
    Working Directory: C:/src/vcpkg/buildtrees/openssl/x64-windows-dbg
    Error code: %1 is not a valid Win32 application
    See logs for more information:

Call Stack (most recent call first):
  scripts/cmake/vcpkg_build_nmake.cmake:125 (vcpkg_execute_required_process)
  ports/openssl/windows/portfile.cmake:50 (vcpkg_build_nmake)
  ports/openssl/portfile.cmake:68 (include)
  scripts/ports.cmake:147 (include)

Additional context

Cheney-W commented 1 year ago

I can't reproduce this issue in my side with the latest vcpkg 2023-07-19-814b7ec837b59f1c8778f72351c1dd7605983cd2. According to the error log you provided: Error code: %1 is not a valid Win32 application, I think you could remove the path of the local perl from the environment variable and use the perl installed by vcpkg.

gdurban-desacc commented 1 year ago

I'm also having trouble build openssl, I checked out 202.07.21

the error log has:

crypto\ec\ecp_nistz256-x86_64.asm:7934: error: parser: instruction expected
crypto\ec\ecp_nistz256-x86_64.asm:7940: error: parser: instruction expected
crypto\ec\ecp_nistz256-x86_64.asm:7941: warning: label alone on a line without a colon might be in error [-w+label-orphan]
NMAKE : fatal error U1077: '"C:\Users\GlynDurban\source\repos\DCE-6\vcpkg\downloads\tools\nasm\nasm-2.16.01\nasm.exe"  -Ox -f win64 -DNEAR -g -o crypto\ec\libcrypto-lib-ecp_nistz256-x86_64.obj "crypto\ec\ecp_nistz256-x86_64.asm"' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\bin\Hostx64\x64\nmake.exe" /LU                 _build_libs' : return code '0x2'
Stop.
esvyhled commented 1 year ago

The problem persists with the most current vcpkg. vcpkg-tool version: 2023-07-19-814b7ec837b59f1c8778f72351c1dd7605983cd2. vcpkg-scripts version: 980ec0f49 2023-08-02 I do not have local perl at all.

dg0yt commented 1 year ago

@gdurban-desacc You face #30645.

dg0yt commented 1 year ago

I do not have local perl at all.

Then the question is why C:/Windows/PERL is invoked as perl interpreter. It doesn't even carry .exe.

github-actions[bot] commented 1 year ago

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

luzpaz commented 1 year ago

Is this issue also reproducible with latest v3.1.3 https://github.com/openssl/openssl/releases/tag/openssl-3.1.3 ?

dg0yt commented 1 year ago

Is this issue also reproducible with latest v3.1.3 https://github.com/openssl/openssl/releases/tag/openssl-3.1.3 ?

i.e. please test #33890...

dg0yt commented 1 year ago

... but I don't expect the openssl 3.1.3 update to be the fix for vcpkg running perl wrongly. (I still suppose that C:/Windows/PERL isn't perl.exe. Maybe whitespace in the perl installation path, such as C:/Windows/PERL 1.2.3/bin/perl.exe ?)

esvyhled commented 1 year ago

still failing with with latest v3.1.3 https://github.com/openssl/openssl/releases/tag/openssl-3.1.3.

github-actions[bot] commented 11 months ago

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.