You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Jiri Daněk (Jira)" <ji...@apache.org> on 2021/09/16 13:01:00 UTC
[jira] [Created] (PROTON-2435) ninja: error: '-lpthread', needed by
'c/libqpid-proton.so.11.14.0', missing and no known rule to make it
Jiri Daněk created PROTON-2435:
----------------------------------
Summary: ninja: error: '-lpthread', needed by 'c/libqpid-proton.so.11.14.0', missing and no known rule to make it
Key: PROTON-2435
URL: https://issues.apache.org/jira/browse/PROTON-2435
Project: Qpid Proton
Issue Type: Bug
Components: build, proton-c
Affects Versions: proton-c-0.35.0
Reporter: Jiri Daněk
When building Qpid Proton on CentOS 7 in Docker, using
{noformat}
Step 8/9 : RUN cmake .. -GNinja -DCMAKE_INSTALL_PREFIX=/root/Work/qpid-install
---> Running in 290c464d8c69
-- The C compiler identification is GNU 4.8.5
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Found OpenSSL: /usr/lib64/libssl.so;/usr/lib64/libcrypto.so (found version "1.0.2k")
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR)
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.27.1")
-- Found CyrusSASL: /usr/lib64/libsasl2.so (found version "2.1.26")
-- Found PythonInterp: /usr/bin/python3.6 (found suitable version "3.6.8", minimum required is "3.6")
-- Found PythonLibs: /usr/lib64/libpython3.6m.so (found suitable exact version "3.6.8")
-- Looking for a CXX compiler
-- Looking for a CXX compiler - /usr/bin/c++
-- The CXX compiler identification is GNU 4.8.5
-- Check for working CXX compiler using: Ninja
-- Check for working CXX compiler using: Ninja -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Build type is "RelWithDebInfo" (has debug symbols)
-- PN_VERSION: 0.36.0 (SNAPSHOT)
-- Looking for clock_gettime
-- Looking for clock_gettime - found
-- Looking for strerror_r
-- Looking for strerror_r - found
-- Looking for epoll_wait
-- Looking for epoll_wait - found
-- Building the epoll proactor
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Could NOT find JsonCpp (missing: JsonCpp_LIBRARY JsonCpp_INCLUDE_DIR)
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring done
-- Generating done
-- Build files have been written to: /qpid-proton/build
Removing intermediate container 290c464d8c69
---> 6832cb8c68ac
Step 9/9 : RUN ninja install
---> Running in 4dc6c077dce0
ninja: error: '-lpthread', needed by 'c/libqpid-proton.so.11.14.0', missing and no known rule to make it
{noformat}
I suspect this is because {{-lpthread}} is not an actual library on disk, but simply an alias for {{-pthread}} gcc switch. Older CMake cannot be told to prefer the switch variant, and it tries the library first, which succeeds for the purposes of the CMake project config check.
C.f. {{THREADS_PREFER_PTHREAD_FLAG}}, from https://cmake.org/cmake/help/v3.1/module/FindThreads.html
Workaround is to build project with {{make}}.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org