Build issues on OSX 10.10 with XCode 6.1

Nov 12, 2014 at 12:27 AM
I'm trying to build development branch of casablanca on OSX10.10 with XCode 6.1 and I have problem running cmake. I have installed CMake 3.0.2, boost 1.56.0 and openssl 1.0.1j and when trying to generate the makefile, the cmake process fails with the problem below. It clearly finds openssl 1.0.1j, but it complains it is not a version at least 1.0.0 (although it is 1.0.1j).

Overriding the OPENSSL_ROOT_DIR variable makes no difference ...

cmake ../Release -DCMAKE_BUILD_TYPE=Release

Make Error at /usr/local/Cellar/cmake/3.0.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:136 (message):
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
system variable OPENSSL_ROOT_DIR: Found unsuitable version "0.9.8za", but
required is at least "1.0.0" (found
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.0.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:341 (_FPHSA_FAILURE_MESSAGE)
/usr/local/Cellar/cmake/3.0.2/share/cmake/Modules/FindOpenSSL.cmake:318 (find_package_handle_standard_args)
CMakeLists.txt:69 (find_package)
Nov 12, 2014 at 1:48 AM
It looks like there is probably a homebrew packaging error -- the binary is identifying itself as "0.9.8za":
Found unsuitable version "0.9.8za", ...
Do you still get an issue if you ask homebrew to install version 1.0.1i?

Nov 12, 2014 at 4:00 AM
Well, this is what is confusing. Brew version claims it is 1.0.1j. I have also version 1.0.1i, but it makes no difference (when I specify this in the system variable).
Dec 9, 2014 at 11:39 PM
Anyone found the solution to this?

cmake does not honor the environment variables.
Dec 10, 2014 at 5:49 AM
Edited Dec 10, 2014 at 5:53 AM
Well, I ended up customizing the cmake script to make sure it can find the right package. This is the diff of the stuff I did:
diff --git a/Release/CMakeLists.txt b/Release/CMakeLists.txt
index ccaa761..3b21a94 100644
--- a/Release/CMakeLists.txt
+++ b/Release/CMakeLists.txt
@@ -82,7 +82,13 @@ elseif(UNIX) # This includes OSX
   # This should prevent linking against the system provided 0.9.8y
-  find_package(OpenSSL 1.0.0 REQUIRED)
+  # find_package(OpenSSL 1.0.1 REQUIRED)
+    set(OPENSSL_INCLUDE_DIR "/usr/local/Cellar/openssl/1.0.1j/include")
+      "/usr/local/Cellar/openssl/1.0.1j/lib/libssl.a"
+      "/usr/local/Cellar/openssl/1.0.1j/lib/libcrypto.a"
+      )

   option(BUILD_SHARED_LIBS "Build shared Libraries." ON)
   option(BUILD_TESTS "Build tests." ON)
Dec 28, 2014 at 11:25 PM
This is due to a preset openssl version takes effects before finding the brew ones. a PR is sent for this:
Jan 9, 2015 at 11:02 PM
We've just merged a PR which should fix this issue. Thanks to everyone who helped investigate it!!/tab/comments