[ 
https://issues.apache.org/jira/browse/PROTON-2788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17803841#comment-17803841
 ] 

Jiri Daněk commented on PROTON-2788:
------------------------------------

Looking at the CMakeLists.txt, everything looks good and the openssl header 
_should_ be available to the compilation just fine after openssl is found. I'll 
try to reproduce the specific scenario from above next, and investigate what's 
happening.

> proton-c cannot build with openssl outside of system include directories?
> -------------------------------------------------------------------------
>
>                 Key: PROTON-2788
>                 URL: https://issues.apache.org/jira/browse/PROTON-2788
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>    Affects Versions: proton-c-0.39.0
>            Reporter: Jiri Daněk
>            Assignee: Jiri Daněk
>            Priority: Trivial
>
> 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.
> {noformat}
> + 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
> {noformat}
> {noformat}
> 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.
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to