Synergy fails to compile with missing pthread_ references. LDFLAGs=-pthread seems to help. Reproducible: Always Steps to Reproduce: Linking CXX executable /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/bin/synergys cd /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16_p1969_build/src/cmd/synergys && /usr/bin/cmake -E cmake_link_script CMakeFiles/synergys.dir/link.txt --verbose=1 /usr/bin/x86_64-pc-linux-gnu-g++ -march=native -O2 -fomit-frame-pointer -pipe -Wl,-O1 -Wl,--as-needed CMakeFiles/synergys.dir/synergys.o CMakeFiles/synergys.dir/CXWindowsServerTaskBarReceiver.o -o /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/bin/synergys -rdynamic /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libarch.a /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libbase.a /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libclient.a /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libcommon.a /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libio.a /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libmt.a /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libnet.a /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libipc.a /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libplatform.a /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libserver.a /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libsynergy.a -lcryptopp -lpthread -lcurl -lSM -lICE -lXtst -lX11 -lXext -lXinerama -lXrandr -lXi /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libclient.a /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libipc.a /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libplatform.a /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libserver.a /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libsynergy.a -lpthread -lcurl -lSM -lICE -lXtst -lX11 -lXext -lXinerama -lXrandr -lXi /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libarch.a /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libbase.a /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libcommon.a /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libnet.a /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libio.a -lcryptopp /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libmt.a /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::newMutex()': CArchMultithreadPosix.cpp:(.text+0x339): undefined reference to `pthread_mutexattr_init' /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::raiseSignal(IArchMultithread::ESignal)': CArchMultithreadPosix.cpp:(.text+0x45b): undefined reference to `pthread_kill' /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::threadSignalHandler(void*)': CArchMultithreadPosix.cpp:(.text+0x4b0): undefined reference to `pthread_detach' /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::CArchMultithreadPosix()': CArchMultithreadPosix.cpp:(.text+0x77d): undefined reference to `pthread_sigmask' CArchMultithreadPosix.cpp:(.text+0x79e): undefined reference to `pthread_sigmask' /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::startSignalHandler()': CArchMultithreadPosix.cpp:(.text+0x8c5): undefined reference to `pthread_sigmask' CArchMultithreadPosix.cpp:(.text+0x8e5): undefined reference to `pthread_sigmask' CArchMultithreadPosix.cpp:(.text+0x907): undefined reference to `pthread_create' /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::newThread(void* (*)(void*), void*)': CArchMultithreadPosix.cpp:(.text+0x9f0): undefined reference to `pthread_create' /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::closeThread(CArchThreadImpl*)': CArchMultithreadPosix.cpp:(.text+0xb5d): undefined reference to `pthread_detach' /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::cancelThread(CArchThreadImpl*)': CArchMultithreadPosix.cpp:(.text+0x5c3): undefined reference to `pthread_kill' collect2: error: ld returned 1 exit status src/cmd/synergyd/CMakeFiles/synergyd.dir/build.make:110: recipe for target '/var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/bin/synergyd' failed make[2]: *** [/var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16-Source/bin/synergyd] Error 1 make[2]: Leaving directory '/var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16_p1969_build' CMakeFiles/Makefile2:851: recipe for target 'src/cmd/synergyd/CMakeFiles/synergyd.dir/all' failed make[1]: *** [src/cmd/synergyd/CMakeFiles/synergyd.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... make[2]: Leaving directory '/var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16_p1969_build' make -f src/test/integtests/CMakeFiles/integtests.dir/build.make src/test/integtests/CMakeFiles/integtests.dir/build make[2]: Entering directory '/var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16_p1969_build' /usr/bin/cmake -E cmake_progress_report /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16_p1969_build/CMakeFiles 27 /usr/bin/cmake -E cmake_progress_report /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16_p1969_build/CMakeFiles /usr/bin/cmake -E cmake_progress_report /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16_p1969_build/CMakeFiles 28 /usr/bin/cmake -E cmake_progress_report /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16_p1969_build/CMakeFiles 29 /usr/bin/cmake -E cmake_progress_report /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16_p1969_build/CMakeFiles /usr/bin/cmake -E cmake_progress_report /var/tmp/portage/x11-misc/synergy-1.4.16_p1969/work/synergy-1.4.16_p1969_build/CMakeFiles 30
Same here.
1) Please post your `emerge --info' output in a comment. 2) Please attach the entire build log to this bug report.
--- ChangeLog 2014-02-19 13:02:03.000000000 +0100 +++ ChangeLog.new 2014-02-20 15:02:44.493971600 +0100 @@ -2,6 +2,10 @@ # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 # $Header: /var/cvsroot/gentoo-x86/x11-misc/synergy/ChangeLog,v 1.106 2014/02/19 12:02:03 jer Exp $ + 20 Feb 2014; Jeroen Roovers <jer@gentoo.org> synergy-1.4.16_p1969.ebuild, + +files/synergy-1.4.16_p1969-pthread.patch: + Set C*FLAGS=-pthread (possibly fixes bug #501806 by Alex Barker). I ported the 1.4.12-pthread patch to 1.4.16. Please sync your tree and try again.
I had the same problem and can confirm that it installs correctly now.