[Libwebsockets] CMAKE error with while doing MIPS cross-compilation on x86 with OPENSSL support

Hemant Kumar hkumar at arubanetworks.com
Fri Oct 11 19:37:50 CEST 2013


Hi

I am getting following error when I try to cross-compile libwebsockets with cmake.

I have created cross-compilation file with following content:

# Name of C compiler.
set(CMAKE_C_COMPILER "${CROSS_PATH}/bin/mipsisa32-xlr-linux-gcc")
set(CMAKE_CXX_COMPILER "${CROSS_PATH}/bin/mipsisa32-xlr-linux-g++")


-- Looking for zlib.h
-- Looking for zlib.h - not found
-- Looking for 4 include files stdlib.h, ..., float.h
-- Looking for 4 include files stdlib.h, ..., float.h - found
-- Found ZLIB: /home/hkumar/adu/views/hkumar6.4/utils/zlib/nebbiolo_obj/libz.a (found version "1.1.4")
ZLib include dirs: /home/hkumar/adu/views/hkumar6.4/utils/zlib
ZLib libraries: /home/hkumar/adu/views/hkumar6.4/utils/zlib/nebbiolo_obj/libz.a
Compiling with SSL support
CMake Error at /usr/local/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) (found
  version "1.0.0")
Call Stack (most recent call first):
  /usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/share/cmake-2.8/Modules/FindOpenSSL.cmake:303 (find_package_handle_standard_args)
  CMakeLists.txt:442 (find_package)

Using following command:

I am providing the .so location for mips Netlogic XLR platform cross-compiled for OPENSSL library and also header files. It detect the header files and as we can see above says 1.0.0 as version, but fails to acknowledge the ssl library and room directory.

bash-4.1$ cmake ..  -DZLIB_LIBRARY="/home/hkumar/hkumar6.4/utils/zlib/nebbiolo_obj/libz.a" -DZLIB_INCLUDE_DIR="/home/hkumar/hkumar6.4/utils/zlib/"  -DOPENSSL_ROOT_DIR="/home/hkumar/hkumar6.4/openssl-regular/openssl-1.0.1c/" -DOPENSSL_LIBRARIES="/home/hkumar/hkumar6.4/Default/nebbiolo/openssl-regular/openssl-1.0.1c/libssl.so" -DOPENSSL_INCLUDE_DIR="/home/hkumar/hkumar6.4/openssl-regular/openssl-1.0.1c/include/openssl" -DWITH_SSL=1 -DCMAKE_TOOLCHAIN_FILE=../cross-mips-linux-gnueabihf.cmake

Please help me resolve this issue.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20131011/6ef7bbeb/attachment.html>


More information about the Libwebsockets mailing list