Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 501806 - x11-misc/synergy-1.4.16_p1969 - CArchMultithreadPosix.cpp:(.text+0x339): undefined reference to `pthread_mutexattr_init'
Summary: x11-misc/synergy-1.4.16_p1969 - CArchMultithreadPosix.cpp:(.text+0x339): unde...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Desktop Misc. Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-19 17:23 UTC by Alex Barker
Modified: 2014-02-21 13:25 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Barker 2014-02-19 17:23:02 UTC
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
Comment 1 Ivan Iraci 2014-02-20 11:01:57 UTC
Same here.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-02-20 13:46:36 UTC
1) Please post your `emerge --info' output in a comment.
2) Please attach the entire build log to this bug report.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2014-02-20 14:03:30 UTC
--- 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.
Comment 4 Neil Bothwick 2014-02-20 17:12:58 UTC
I had the same problem and can confirm that it installs correctly now.