folly
folly copied to clipboard
openssl/opensslv.h file not found
Got this 'openssl/opensslv.h' file not found
build error on case sensitive file system (macOS Monterey 12.4)
@Romick2005 I am also getting same issue, have you solved this issue. Please help me on this.
So all you need to do is to create a symlink for openssl to OpenSSL. I have added this into ios/Podfile:
target '[Name]' do
...
post_install do |installer|
...
## Fix openssl incompatibility on case-sensitive fs. The real directory is Pods. In case-sensitive file systems the file won't exists.
unless File.exist? "pods"
system("cd Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_armv7 && ln -sfh OpenSSL.framework openssl.framework")
end
...
end
end
PS. There are multiple plaforms inside OpenSSL.xcframework folder, so you need to select one depending on your architecture.
My system information: MacOS 13.3.1 (22E261)
For me, since I installed openssl using brew, from line 27 to line 29 in CMakeLists.txt, I have to set the OPENSSL_ROOT_DIR, OPENSSL_LIBRARIES, OPENSSL_INCLUDE_DIR to the followings:
set(OPENSSL_ROOT_DIR "/opt/homebrew/opt/[email protected]" ) set(OPENSSL_LIBRARIES "/opt/homebrew/opt/[email protected]/lib" ) set(OPENSSL_INCLUDE_DIR "/opt/homebrew/opt/[email protected]/include" )
I also discovered that sometimes CMAKE_SYSTEM_NAME failed to detect my system as "Darwin", so I also have to manually set the above variables in the ELSE() block of the CMakeLists.txt.
So I think you should check the installation directory of your ssl and check whether they match with the paths set in the CMakeLists.txt.