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

Cmake: Could NOT find OpenSSL #213

Closed
aafanasyev opened this Issue Mar 6, 2015 · 10 comments

Comments

Projects
None yet
5 participants
@aafanasyev

aafanasyev commented Mar 6, 2015

Hi everyone

I just followed the https://github.com/h2o/h2o/blob/master/README.md#installation topic, but I stacked at point:

cmake -DCMAKE_INSTALL_PREFIX=/usr/local .

I am constantly getting this error:

CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
  system variable OPENSSL_ROOT_DIR (missing: OPENSSL_LIBRARIES
  OPENSSL_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-2.8/Modules/FindOpenSSL.cmake:313 (find_package_handle_standard_args)
  CMakeLists.txt:8 (FIND_PACKAGE)


-- Configuring incomplete, errors occurred!
See also "/root/h2o/CMakeFiles/CMakeOutput.log".
See also "/root/h2o/CMakeFiles/CMakeError.log".

My installation steps on a clean Ubuntu 14.04.02:

root@RP-01:~# apt-get install locate git perl python cmake libyaml-0-2 build-essential -y
root@RP-01:~# git clonehttps://github.com/openssl/openssl.git
root@RP-01:~# git clone https://github.com/h2o/h2o.git

root@RP-01:~# apt-get remove openssl libssl-dev
root@RP-01:~# cd openssl/
root@RP-01:~/openssl# ./config
root@RP-01:~/openssl# make
root@RP-01:~/openssl# make test
root@RP-01:~/openssl# make install
root@RP-01:~# /usr/local/ssl/bin/openssl version
OpenSSL 1.1.0-dev xx XXX xxxx

# Looks like ssl is ok! I have no errors here.

According error mentioned above I found this topic:
http://stackoverflow.com/questions/16248775/cmake-not-able-to-find-openssl

And I tried:

cmake -DOPENSSL_ROOT_DIR=/usr/local/ssl -DOPENSSL_LIBRARIES=/usr/local/ssl/lib

However, I am getting the same error. How can I solve it?

Thank you for your help.

Andre

@swinghu

This comment has been minimized.

Contributor

swinghu commented Mar 7, 2015

I meet this problem ,then I follow
cmake -DOPENSSL_ROOT_DIR=/usr/local/ssl -DOPENSSL_LIBRARIES=/usr/local/ssl/lib
then the error gone

@aafanasyev

This comment has been minimized.

aafanasyev commented Mar 8, 2015

By me error still exist. Even I try it like this:

root@RP-01:~/h2o# cmake -DOPENSSL_ROOT_DIR=/usr/local/ssl -DOPENSSL_LIBRARIES=/usr/local/ssl/lib cmake -DCMAKE_INSTALL_PREFIX=/usr/local .
@kazuho

This comment has been minimized.

Member

kazuho commented Mar 8, 2015

Would you mind trying: cmake -DCMAKE_INCLUDE_PATH=/usr/local/ssl/include -DCMAKE_LIBRARY_PATH=/usr/local/ssl/lib?

@aafanasyev

This comment has been minimized.

aafanasyev commented Mar 10, 2015

OK I have some achievements in my installation journey. Required packages (not sure if libyaml-dev 0.1.4 libuv-dev 0.10.22 right versions)

apt-get install locate git cmake build-essential checkinstall autoconf pkg-config libtool python-sphinx libcunit1-dev nettle-dev libyaml-dev libuv-dev -y

I believe later I can produce a ubuntu installation tutorial. ;) However, I have still the pretty same error:

root@RP-01:~/h2o# cmake -DCMAKE_INSTALL_PREFIX=/usr/local .
CMake Error at /usr/share/cmake-2.8/Modules/FindOpenSSL.cmake:278 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:8 (FIND_PACKAGE)


CMake Error at /usr/share/cmake-2.8/Modules/FindOpenSSL.cmake:279 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:8 (FIND_PACKAGE)


CMake Error at /usr/share/cmake-2.8/Modules/FindOpenSSL.cmake:281 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:8 (FIND_PACKAGE)


CMake Error at /usr/share/cmake-2.8/Modules/FindOpenSSL.cmake:283 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:8 (FIND_PACKAGE)


-- Configuring incomplete, errors occurred!
See also "/root/h2o/CMakeFiles/CMakeOutput.log".
See also "/root/h2o/CMakeFiles/CMakeError.log".

@kazuho Thank you for your proposal but I have it now like this:

root@RP-01:~/h2o# cmake -DCMAKE_INCLUDE_PATH=/usr/local/ssl/include -DCMAKE_LIBRARY_PATH=/usr/local/ssl/lib
CMake Error at /usr/share/cmake-2.8/Modules/FindOpenSSL.cmake:278 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:8 (FIND_PACKAGE)


CMake Error at /usr/share/cmake-2.8/Modules/FindOpenSSL.cmake:279 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:8 (FIND_PACKAGE)


CMake Error at /usr/share/cmake-2.8/Modules/FindOpenSSL.cmake:281 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:8 (FIND_PACKAGE)


CMake Error at /usr/share/cmake-2.8/Modules/FindOpenSSL.cmake:283 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:8 (FIND_PACKAGE)


-- Found OpenSSL: /usr/local/ssl/lib/libssl.a;/usr/local/ssl/lib/libcrypto.a (found version ".0.0`") 
-- Found LIBUV: /usr/lib/x86_64-linux-gnu/libuv.so  
-- Found LIBYAML: /usr/lib/x86_64-linux-gnu/libyaml.so  
-- Found WSLAY: /usr/local/lib/libwslay.so  
-- Configuring incomplete, errors occurred!
See also "/root/h2o/CMakeFiles/CMakeOutput.log".
See also "/root/h2o/CMakeFiles/CMakeError.log".
@kazuho

This comment has been minimized.

Member

kazuho commented Mar 13, 2015

@aafanasyev Sorry I have accidentally closed the issue. Please reopen the issue if the problem still persists.

@kishorenc

This comment has been minimized.

kishorenc commented Oct 21, 2016

@kazuho - Is OpenSSL required even when I am building with cmake -DWITH_BUNDLED_SSL=on? That seems to be so, because I get the same Could NOT find OpenSSL error.

@kazuho

This comment has been minimized.

Member

kazuho commented Oct 21, 2016

@kishorenc

Is OpenSSL required even when I am building with cmake -DWITH_BUNDLED_SSL=on?

No.
Could you please post the enter output?

@kishorenc

This comment has been minimized.

kishorenc commented Oct 21, 2016

Sure:

$ cmake -DWITH_BUNDLED_SSL=on .
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- 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
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing:  OPENSSL_LIBRARIES OPENSSL_INCLUDE_DIR)
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-2.8/Modules/FindZLIB.cmake:85 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:46 (FIND_PACKAGE)


-- Configuring incomplete, errors occurred!
@kishorenc

This comment has been minimized.

kishorenc commented Oct 21, 2016

Sorry for the false alarm. I realize that it's actually complaining about ZLIB and not OpenSSL. All good now.

@androidlover5842

This comment has been minimized.

androidlover5842 commented Feb 13, 2017

lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment