Skip to content

0.12.0 undefined reference pthreads #625

Closed

Description

@susnux

When compiling 0.12.0 for openSUSE tumbleweed I get this error (see bottom).

My fast fix for this is applying this patch: http://pastie.org/10789411

CMakeFiles/cppnetlib-client-connections.dir/client.cpp.o: In function asio::detail::posix_global_impl<asio::system_executor::context_impl>::~posix_global_impl()': [ 43s] client.cpp:(.text._ZN4asio6detail17posix_global_implINS_15system_executor12context_implEED2Ev[_ZN4asio6detail17posix_global_implINS_15system_executor12context_implEED5Ev]+0xdb): undefined reference topthread_join'
[ 43s] client.cpp:(.text._ZN4asio6detail17posix_global_implINS_15system_executor12context_implEED2Ev[_ZN4asio6detail17posix_global_implINS_15system_executor12context_implEED5Ev]+0xf9): undefined reference to `pthread_detach'
[ 43s] collect2: error: ld returned 1 exit status
[ 43s] libs/network/src/CMakeFiles/cppnetlib-client-connections.dir/build.make:99: recipe for target 'libs/network/src/libcppnetlib-client-connections.so.0.12.0' failed
[ 43s] make[2]: *** [libs/network/src/libcppnetlib-client-connections.so.0.12.0] Error 1
[ 43s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/cpp-netlib-0.12.0-final/build'
[ 43s] CMakeFiles/Makefile2:129: recipe for target 'libs/network/src/CMakeFiles/cppnetlib-client-connections.dir/all' failed
[ 43s] make[1]: *** [libs/network/src/CMakeFiles/cppnetlib-client-connections.dir/all] Error 2
[ 43s] make[1]: Leaving directory '/home/abuild/rpmbuild/BUILD/cpp-netlib-0.12.0-final/build'
[ 43s] Makefile:141: recipe for target 'all' failed
[ 43s] make: *** [all] Error 2

Cmake config output:

[ 19s] -- The C compiler identification is GNU 5.3.1
[ 19s] -- The CXX compiler identification is GNU 5.3.1
[ 19s] -- Check for working C compiler: /usr/bin/cc
[ 19s] -- Check for working C compiler: /usr/bin/cc -- works
[ 19s] -- Detecting C compiler ABI info
[ 19s] -- Detecting C compiler ABI info - done
[ 19s] -- Detecting C compile features
[ 19s] -- Detecting C compile features - done
[ 19s] -- Check for working CXX compiler: /usr/bin/c++
[ 19s] -- Check for working CXX compiler: /usr/bin/c++ -- works
[ 19s] -- Detecting CXX compiler ABI info
[ 20s] -- Detecting CXX compiler ABI info - done
[ 20s] -- Detecting CXX compile features
[ 20s] -- Detecting CXX compile features - done
[ 20s] -- Linking boost testing libs dynamically...
[ 20s] -- Boost version: 1.60.0
[ 20s] -- Found OpenSSL: /usr/lib64/libssl.so;/usr/lib64/libcrypto.so (found version "1.0.2g")
[ 20s] -- Looking for pthread.h
[ 20s] -- Looking for pthread.h - found
[ 20s] -- Looking for pthread_create
[ 20s] -- Looking for pthread_create - not found
[ 20s] -- Looking for pthread_create in pthreads
[ 20s] -- Looking for pthread_create in pthreads - not found
[ 20s] -- Looking for pthread_create in pthread
[ 20s] -- Looking for pthread_create in pthread - found
[ 20s] -- Found Threads: TRUE
[ 20s] -- Found PythonInterp: /usr/bin/python (found version "2.7.10")
[ 20s] -- Configuring done
[ 20s] -- Generating done

Activity

  1. deanberris commented on Apr 8, 2016

    @deanberris
    Member

    Huh. That's not good. Let me start a 0.12-release branch where we can start incorporating fixes for this. Let me ping back when that's done. Then can you send that as a pull request instead?

  2. deanberris commented on Apr 8, 2016

    @deanberris
    Member

    That's done -- can you send a pull request against the 0.12-release branch?

  3. susnux commented on Apr 8, 2016

    @susnux
    Author

    Ok I will do in few hours.

  4. added a commit that references this issue on Apr 10, 2016
    5209246
  5. susnux commented on Apr 20, 2016

    @susnux
    Author

    Should I also send a PR for master?

  6. deanberris commented on Apr 25, 2016

    @deanberris
    Member

    @susnux Yes please, send a PR for master.

  7. susnux commented on Apr 26, 2016

    @susnux
    Author

    OK done

  8. added a commit that references this issue on Apr 26, 2016
    b106a8a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions