Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-2788

Static build of the Proton TLS library fails when openssl is located outside of default system include directories

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • proton-c-0.39.0
    • proton-c-0.40.0
    • build, proton-c
    • None

    Description

      I have a cross compile setup. Cmake is able to find openssl, but it is later not able to include it. This seems like some omission in cmake configs which is revealed in such unusual environment.

      I intend to investigate if there's something to be done, and if it can be fixed without too much weirdness, I want to fix it. Meanwhile, I'm going to add -isystem switches to compiler.

      + cmake -S /build/proton/app -B /build/proton/app/build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_LINKTIME_OPTIMIZATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DBUILD_TLS=ON -DSSL_IMPL=openssl -DBUILD_STATIC_LIBS=ON -DBUILD_BINDINGS=python -DBUILD_TOOLS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=/build/proton/app/build/install
      -- The C compiler identification is Clang 16.0.6
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /usr/local/bin/zig - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Found OpenSSL: /usr/lib64/libcrypto.so (found version "3.0.7")  
      -- Looking for pthread.h
      -- Looking for pthread.h - found
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
      -- Found Threads: TRUE  
      -- Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR) 
      -- Found PkgConfig: /usr/bin/pkg-config (found version "1.7.3") 
      -- Found CyrusSASL: /usr/lib64/libsasl2.so (found version "2.1.27") 
      -- Found Python: /usr/bin/python3.9 (found suitable version "3.9.18", minimum required is "3.8") found components: Interpreter Development Development.Module Development.Embed 
      -- Looking for a CXX compiler
      -- Looking for a CXX compiler - /usr/local/bin/zig
      -- The CXX compiler identification is Clang 16.0.6
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /usr/local/bin/zig - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Build type is "RelWithDebInfo" (has debug symbols)
      -- PN_VERSION: 0.40.0 (dev)
      -- Looking for clock_gettime
      -- Looking for clock_gettime - not found
      -- Looking for clock_gettime in rt
      -- Looking for clock_gettime in rt - found
      -- Looking for strerror_r
      -- Looking for strerror_r - not found
      -- Looking for epoll_wait
      -- Looking for epoll_wait - found
      -- Building the epoll proactor
      -- Building the raw connection TLS library
      -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
      -- Looking for Python module sphinx - not found
      -- Sphinx modules not found; doc generation disabled.
      -- Looking for Python module setuptools - found
      -- Looking for Python module wheel - not found
      -- Looking for Python module cffi - not found
      -- Looking for Python module flake8 - not found
      -- Looking for Python module tox - not found
      -- The tox tool is not available; skipping the python-tox-tests
      -- Configuring done
      -- Generating done
      -- Build files have been written to: /build/proton/app/build
      ++ nproc
      + cmake --build /build/proton/app/build --parallel 12 --verbose
      
      cd /build/proton/app/build/c && /usr/local/bin/zig  cc -target aarch64-linux-gnu.2.34 -L/usr/lib64 -L/usr/local/lib64 -DPROTON_DECLARE_STATIC -I/build/proton/app/c/include -I/build/proton/app/c/src -I/build/proton/app/build/c/include -I/build/proton/app/build/c/src -fvisibility=hidden -O2 -g -DNDEBUG -flto=thin -std=c99 -Werror -Wall -pedantic -Wno-unused-parameter -Wstrict-prototypes -Wvla -Wsign-compare -Wwrite-strings -Wimplicit-fallthrough  -MD -MT c/CMakeFiles/qpid-proton-tls-static.dir/src/tls/openssl.c.o -MF CMakeFiles/qpid-proton-tls-static.dir/src/tls/openssl.c.o.d -o CMakeFiles/qpid-proton-tls-static.dir/src/tls/openssl.c.o -c /build/proton/app/c/src/tls/openssl.c
      /build/proton/app/c/src/tls/openssl.c:53:10: fatal error: 'openssl/ssl.h' file not found
      #include <openssl/ssl.h>
               ^~~~~~~~~~~~~~~
      1 error generated.
      

      Attachments

        Activity

          People

            jdanek Jiri Daněk
            jdanek Jiri Daněk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: