-
Notifications
You must be signed in to change notification settings - Fork 168
[Bug]: Windows Build: Missing OpenSSL dependencies #717
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
Comments
As I spend more time trying to resolve this I'm now realizing OpenSSL does get built when building the dependencies, so now trying to determine why FFMPEG is complaining about it. |
I noticed another warning during my build which could be related:
Pulling the thread on this it got me to this cmake file: https://github.com/AcademySoftwareFoundation/OpenRV/blob/main/cmake/dependencies/openssl.cmake#L241 The OUTPUT specifies 2 DLLs in the LIB folder, but the copies below copy these DLLs in the BIN folder. |
I managed to make a little bit more progress thanks to #469 1) get PCRE2 buildingI had to edit the block in # Platform specific issues
NO_UNDEFINED=
EXPORT_ALL_SYMBOLS=
case $host_os in
- cygwin* | mingw* )
+ cygwin* | mingw* | msys* )
if test X"$enable_shared" = Xyes; then
NO_UNDEFINED="-no-undefined"
EXPORT_ALL_SYMBOLS="-Wl,--export-all-symbols"
fi
;;
esac It's not ideal because it's a file that's not part of this project, but I did not find any way to pass it from cmake, everything I tried failed. 2) Get PCRE2 building with the right nameCmake attempts to copy Taking a page out of the OpenSSL cmake, I first make a copy of the DLLs with the right names, then let it do the copy, that seems to work. I wasn't sure if renaming instead of copying would break something else.
IF(RV_TARGET_WINDOWS)
SET(_pcre2_libname
libpcre2-8-0${CMAKE_SHARED_LIBRARY_SUFFIX}
)
SET(_pcre2_libname_posix
libpcre2-posix-3${CMAKE_SHARED_LIBRARY_SUFFIX}
)
+ SET(_pcre2_badlibname
+ msys-pcre2-8-0${CMAKE_SHARED_LIBRARY_SUFFIX}
+ )
+ SET(_pcre2_badlibname_posix
+ msys-pcre2-posix-3${CMAKE_SHARED_LIBRARY_SUFFIX}
+ )
SET(_pcre2_implibname
libpcre2-8.dll.a
)
SET(_pcre2_implibname_posix
libpcre2-posix.dll.a
)
SET(_pcre2_libpath
${_bin_dir}/${_pcre2_libname}
)
SET(_pcre2_libpath_posix
${_bin_dir}/${_pcre2_libname_posix}
)
+ SET(_pcre2_badlibpath
+ ${_bin_dir}/${_pcre2_badlibname}
+ )
+ SET(_pcre2_badlibpath_posix
+ ${_bin_dir}/${_pcre2_badlibname_posix}
+ )
SET(_pcre2_implibpath
${_lib_dir}/${_pcre2_implibname}
)
SET(_pcre2_implibpath_posix
${_lib_dir}/${_pcre2_implibname_posix}
)
ENDIF() # PCRE is not used for Linux and MacOS (Boost regex is used) in the current code.
ADD_CUSTOM_COMMAND(
TARGET ${_target}
POST_BUILD
+ COMMENT "Fixing bad lib names ${_pcre2_badlibname} and ${_pcre2_badlibname_posix} to ${_pcre2_libname} and ${_pcre2_libname_posix}"
+ COMMAND ${CMAKE_COMMAND} -E copy ${_pcre2_badlibpath} ${_pcre2_libpath}
+ COMMAND ${CMAKE_COMMAND} -E copy ${_pcre2_badlibpath_posix} ${_pcre2_libpath_posix}
COMMENT "Installing ${_target}'s shared library into ${RV_STAGE_BIN_DIR}"
# Copy library files manually since there are tools that are not needed in the bin folder.
COMMAND ${CMAKE_COMMAND} -E copy ${_pcre2_libpath} ${_pcre2_libpath_posix} -t ${RV_STAGE_BIN_DIR}
) 3) Fixing openssl not foundI'm still stuck here. I have attempted the patch suggested in https://github.com/Neumann-A/vcpkg/blob/eecdbfaec03c1e8dec3225dd17efa2daf779b89d/ports/ffmpeg/0002-detect-openssl.patch with no luck. I wonder if it's again something related to msys, I get a suspiciously high number of syntax errors in my ffbuild/config.log, Since I started yesterday trying to compile OpenRv that has been the recurrent issue (#712 yesterday..) |
I feel dumb, apparently I'm supposed to use |
I'm glad to hear that you've made progress. Using the correct executable for Perhaps we should put the notice to use When you get the chance, update back here with the new errors and we'll see what we can do. |
Thanks @cedrik-fuoco-adsk, I don't know if necessarily at the top of the page, but maybe make it a little bit more explicit. Maybe this could just add "Do not use msys2.exe or any of the other executables installed by msys", for those like me who are exposed to msys for the very first time. Regarding the cmpilation: I restarted from scratch today (reverted my changes, plus This is the current errors I get. I had other higher priorities today so I did not look at it in details, but if these ring a bell I'd happily take a pointer.
If not I'll resume next time I have a few hours in front of me. |
I finally managed to build RV but I don't quite know how. I did a full reboot of my machine, re-pulled everything, and was able to build the dependencies right away. Upon building the main executable, however, I still had the error:
However, simply retrying to build the main executable a second time in the same session without cleaning things made it go through. I'm going to keep this ticket open for a little bit, there were a couple of legit issues above that I might make MRs for. |
The switch to MSYS2 MINGW64 with a reinstall also got me through the openssl error. Thanks for the reminder! |
What happened?
Hello.
I'm attempting to complete my first build of OpenRV, and when building run into issues with OpenSSL.
I have been following the instructions from https://github.com/AcademySoftwareFoundation/OpenRV/blob/main/docs/build_system/config_windows.md and the only mention of OpenSSL is in the Qt section.
Possibly somewhat related tickets:
#581 #682
List all the operating systems versions where this is happening
Windows 11
On what computer hardware is this happening?
Core i9-12900, Nvidia RTX 3080 Ti, 64Gb RAM
Relevant console log output
Environment variables
No response
Extra information
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: