<div dir="ltr"><div><div>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:</div><div><br></div><div>    -- The C compiler identification is GNU 4.8.4</div><div>    -- The CXX compiler identification is GNU 4.8.4</div><div>    -- Check for working C compiler: /usr/bin/gcc</div><div>    -- Check for working C compiler: /usr/bin/gcc -- works</div><div>    -- Detecting C compiler ABI info</div><div>    -- Detecting C compiler ABI info - done</div><div>    -- Check for working CXX compiler: /usr/bin/g++</div><div>    -- Check for working CXX compiler: /usr/bin/g++ -- works</div><div>    -- Detecting CXX compiler ABI info</div><div>    -- Detecting CXX compiler ABI info - done</div><div>    CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):</div><div>      Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the</div><div>      system variable OPENSSL_ROOT_DIR (missing: OPENSSL_LIBRARIES) (found</div><div>      version "1.0.1f")</div><div><br></div><div>I have created the following test case to reproduce the error.</div><div><br></div><div>**DockerFile**</div><div><br></div><div>    FROM ubuntu:trusty</div><div>    </div><div>    LABEL maintainer="<a href="mailto:Diarra_Bakary@test.com">Diarra_Bakary@test.com</a>"</div><div>    LABEL version="1.0"</div><div>    </div><div>    RUN dpkg --add-architecture i386 && \</div><div>        apt-get update && \</div><div>        apt-get install -y \</div><div>        git\</div><div>        cmake\</div><div>        curl:i386\</div><div>        libcurl4-openssl-dev:i386\</div><div>        libssl-dev:i386\</div><div>        uuid-dev:i386</div><div>    RUN apt-get install -y \</div><div>        gcc-multilib\</div><div>        g++-multilib</div><div><br></div><div>**CMakeLists.txt**</div><div><br></div><div>    cmake_minimum_required(VERSION 2.8)</div><div>    </div><div>    find_package(OpenSSL REQUIRED)</div><div><br></div><div>**x86_32.cmake**</div><div><br></div><div>    SET(CMAKE_SYSTEM_NAME Linux)</div><div>    </div><div>    # which compilers to use for C and C++</div><div>    set(CMAKE_C_COMPILER gcc)</div><div>    set(CMAKE_C_FLAGS -m32)</div><div>    set(CMAKE_CXX_COMPILER g++)</div><div>    set(CMAKE_CXX_FLAGS -m32)</div><div><br></div><div>Run the following commands</div><div><br></div><div>    mkdir cmake</div><div>    cd cmake</div><div>    cmake -DCMAKE_TOOLCHAIN_FILE=x86_32.cmake ..</div><div><br></div><div>Thanks in advance</div></div><br clear="all"><div><div class="gmail_signature"><font face="'comic sans ms', sans-serif"><b>Bakary Diarra</b></font><br></div></div>
</div>