I have a 64 bit Ubuntu 14.04 VM and I am trying to compile a 32 bit
application that depends on openssl and I keep getting the following error:
-- 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/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
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) (found
version "1.0.1f")
I have created the following test case to reproduce the error.
**DockerFile**
FROM ubuntu:trusty
LABEL maintainer="[email protected]"
LABEL version="1.0"
RUN dpkg --add-architecture i386 && \
apt-get update && \
apt-get install -y \
git\
cmake\
curl:i386\
libcurl4-openssl-dev:i386\
libssl-dev:i386\
uuid-dev:i386
RUN apt-get install -y \
gcc-multilib\
g++-multilib
**CMakeLists.txt**
cmake_minimum_required(VERSION 2.8)
find_package(OpenSSL REQUIRED)
**x86_32.cmake**
SET(CMAKE_SYSTEM_NAME Linux)
# which compilers to use for C and C++
set(CMAKE_C_COMPILER gcc)
set(CMAKE_C_FLAGS -m32)
set(CMAKE_CXX_COMPILER g++)
set(CMAKE_CXX_FLAGS -m32)
Run the following commands
mkdir cmake
cd cmake
cmake -DCMAKE_TOOLCHAIN_FILE=x86_32.cmake ..
Thanks in advance
*Bakary Diarra*
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake