baresip / baresip-win32

Baresip cross-compiled for Windows using Mingw
https://github.com/baresip/baresip
BSD 3-Clause "New" or "Revised" License
9 stars 4 forks source link

Openssl could not find Error - Cross-compiling #6

Open jasper-mistral opened 2 years ago

jasper-mistral commented 2 years ago

The libraries libcrypto.a & libssl.a generated in openssl folder using 'make openssl' command Got below errors in 'make' command

Error Log :

j@LAP3U:~/baresip_win32/baresip-win32$ make cmake \ -S re \ -B re/build \ -DCMAKE_TOOLCHAIN_FILE=/home/j/baresip_win32/baresip-win32/cmake/mingw-w64-x86_64.cmake \ -DOPENSSL_ROOT_DIR=/home/j/baresip_win32/baresip-win32/openssl -- Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR) -- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY) (found version "1.1.1m") CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: LIB_EAY (ADVANCED) linked by target "re" in directory /home/j/baresip_win32/baresip-win32/re linked by target "re-shared" in directory /home/j/baresip_win32/baresip-win32/re SSL_EAY (ADVANCED) linked by target "re" in directory /home/j/baresip_win32/baresip-win32/re linked by target "re-shared" in directory /home/j/baresip_win32/baresip-win32/re

-- Configuring incomplete, errors occurred! See also "/home/j/baresip_win32/baresip-win32/re/build/CMakeFiles/CMakeOutput.log". See also "/home/j/baresip_win32/baresip-win32/re/build/CMakeFiles/CMakeError.log". make: *** [Makefile:104: libre.a] Error 1

sreimers commented 2 years ago

Which system do you use? Works with CI and my test systems. Are there any openssl compile errors?

jasper-mistral commented 2 years ago

System Info : No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS Release: 20.04 Codename: focal x86_64 GNU/Linux

Attached the openssl logs (make openssl) Got few warnings, no errors. Library files are generated. log.txt

alfredh commented 2 years ago

can you check if your openssl dir is in the list of ROOT_PATH variable?

https://github.com/baresip/baresip-win32/blob/main/cmake/mingw-w64-x86_64.cmake#L17

zaped212 commented 1 year ago

I am having this same issue: I added: message( ${CMAKE_FIND_ROOT_PATH} ) to the cmake/mingw-w64-x86_64.cmake file

Heres the log I see. ` cmake \ -S re \ -B re/build \ -DCMAKE_C_FLAGS="-Werror" \ -DCMAKE_TOOLCHAIN_FILE=/home/user/source/baresip-win32/cmake/mingw-w64-x86_64.cmake \ -DOPENSSL_ROOT_DIR=/home/user/source/baresip-win32/openssl

/usr/x86_64-w64-mingw32/home/user/source/baresip-win32/re/../openssl/home/user/source/baresip-win32/re/../re/build/home/user/source/baresip-win32/re/../rem/build

-- Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR) -- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) -- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY) (found suitable version "1.1.1m", minimum required is "1.1.1") -- Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR) -- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) -- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY) (found suitable version "1.1.1m", minimum required is "1.1.1") CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: LIB_EAY (ADVANCED) linked by target "retest" in directory /home/user/source/baresip-win32/re/test SSL_EAY (ADVANCED) linked by target "retest" in directory /home/user/source/baresip-win32/re/test

-- Configuring incomplete, errors occurred! See also "/home/user/source/baresip-win32/re/build/CMakeFiles/CMakeOutput.log". See also "/home/user/source/baresip-win32/re/build/CMakeFiles/CMakeError.log". make: *** [Makefile:88: libre.a] Error 1 `

zaped212 commented 1 year ago

It may also be neat if you had a pre-generated version available for download through github as well.

sanbroz commented 5 months ago

I also recommend a precompiled windows binary in github

iTommix commented 4 months ago

Have the same Problem on Ubuntu "Jammy":

`-- Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR) -- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) -- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY) (found suitable version "1.1.1m", minimum required is "1.1.1") -- Configuring done CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: LIB_EAY (ADVANCED) linked by target "retest" in directory /home/esil/sip/baresip-win32/re/test SSL_EAY (ADVANCED) linked by target "retest" in directory /home/esil/sip/baresip-win32/re/test

-- Generating done CMake Generate step failed. Build files cannot be regenerated correctly. make: *** [Makefile:88: libre.a] Error 1 `

sreimers commented 4 months ago

How does find openssl -name "*.a" looks like? Can you re-try with updated readme and newer openssl?