Skip to content
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

Fix cmake for OpenSSL 1.0.2a #277

Open
evmuc opened this issue Apr 8, 2015 · 2 comments
Open

Fix cmake for OpenSSL 1.0.2a #277

evmuc opened this issue Apr 8, 2015 · 2 comments
Labels
FAQ

Comments

@evmuc
Copy link

@evmuc evmuc commented Apr 8, 2015

Hi there,

is it possible to fix the FindOpenSSL routine in cmake for supporting OpenSSL 1.0.2a?

http://www.cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c5d9a8283cfac15b4a5a07f18d5eb10c1f388505

Would be perfect ....

@kazuho
Copy link
Member

@kazuho kazuho commented Apr 10, 2015

Thank you for the suggestion.

How did you specify the path to openssl? I suspect that a workaround could be to use PKG_CONFIG_PATH, e.g. PKG_CONFIG_PATH=/usr/local/openssl-1.0.2a/lib/pkgconfig cmake ..

The reason I prefer to ask using an workaround is because generally speaking I would not want to maintain a copy of a cmake module by myself.

@kazuho
Copy link
Member

@kazuho kazuho commented Apr 10, 2015

Tried myself, and confirmed that by specifying PKG_CONFIG_PATH it is possible to build using OpenSSL 1.0.2a. Below are the log of the cmake command for cmake version 3.1.0 and 2.8.12.

$ PKG_CONFIG_PATH=/usr/local/openssl-1.0.2/lib/pkgconfig /usr/local/cmake-3.1.0/bin/cmake ../..
-- The C compiler identification is AppleClang 6.0.0.6000056
-- The CXX compiler identification is AppleClang 6.0.0.6000056
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.28") 
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Found OpenSSL: /usr/local/openssl-1.0.2/lib/libssl.a;/usr/local/openssl-1.0.2/lib/libcrypto.a (found version "1.0.2a") 
-- checking for module 'libuv>=1.0.0'
--   found libuv, version 1.0.0
-- checking for module 'libwslay'
--   found libwslay, version 0.1.1
-- Configuring done
-- Generating done
-- Build files have been written to: /mydev/h2o/build/osx
$ PKG_CONFIG_PATH=/usr/local/openssl-1.0.2/lib/pkgconfig cmake ../..
-- The C compiler identification is Clang 6.0.0
-- The CXX compiler identification is Clang 6.0.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.28") 
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Found OpenSSL: /usr/local/openssl-1.0.2/lib/libssl.a;/usr/local/openssl-1.0.2/lib/libcrypto.a (found version "1.0.2a") 
-- checking for module 'libuv>=1.0.0'
--   found libuv, version 1.0.0
-- checking for module 'libwslay'
--   found libwslay, version 0.1.1
-- Configuring done
-- Generating done
-- Build files have been written to: /mydev/h2o/build/osx

Also confirmed that if cmake (both 2.8.12 and 3.1.0) fails to detect OpenSSL if I set OPENSSL_ROOT_DIR=/usr/local/openssl-1.0.2 instead of PKG_CONFIG_PATH.

@kazuho kazuho added the FAQ label Apr 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.