microsoft / vcpkg

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

[openssl] libcrypto-3-x64.dll relie on absolute path for legacy.dll #36482

Closed cvermot closed 2 months ago

cvermot commented 8 months ago

Library

OpenSSL 3.2.0 used to build PoDoFo 0.10.3

Architecture

x64-windows

Build env

Tested on Windows 10 22H2 and Windows 11 23H2 vcpkg 2024-01-11-710a3116bbd615864eef5f9010af178034cb9b44

Problem : Discussed in https://github.com/microsoft/vcpkg/discussions/36403

Originally posted by **cvermot** January 27, 2024 I used vcpkg to deploy PoDoFo library in a MSVC project. This library use among other things openssl. When I execute my application on my dev machine, all is working. When I deploy this app on my target machine, I get an error "_The application was unable to start correctly (0xc0000142)_". I first thought that it was a DLL problem, so I double checked that all required DLL was on my app side. Everything seemed to be there. I used Dependency Walker's profiling function which gave me the answer: the openSSL `libcrypto-3-x64.dll` library rely on `legacy.dll`, which seems to be linked with the absolute path of my vcpkg installation on my development computer (DW give me the exact path of legacy.dll on my dev computer) ! If I recreate on my target computer the exact path of legacy.dll on my development computer, my app run ! DW error : ``` DllMain(0x00007FFD7F430000, DLL_PROCESS_ATTACH, 0x000000EEE40FF3A0) in "PODOFO.DLL" called. LoadLibraryA("C:\vcpkg\packages\openssl_x64-windows\bin\legacy.dll") called from "LIBCRYPTO-3-X64.DLL" at address 0x00007FFD79D5E72E. LoadLibraryA("C:\vcpkg\packages\openssl_x64-windows\bin\legacy.dll") returned NULL. Error: Le module sp_cifi_ est introuvable (126). ```
github-actions[bot] commented 2 months ago

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