emerge =net-misc/ntp-4.2.8-r1 returns the error below if libevent was compiled without USE-flag "threads": /usr/lib/gcc/i686-pc-linux-gnu/4.8.3/../../../../i686-pc-linux-gnu/bin/ld: cannot find -levent_pthreads If libevent was compiled with USE flag "threads", emerge =net-misc/ntp-4.2.8-r1 works fine. Seen on: amd64 and x86-hardened Proposed solution: The ebuilds for net-misc/ntp-4.2.8* should explicitly require libevent compiled with USE-flag "threads" Reproducible: Always
Confirm it. I reported this there: https://bugs.gentoo.org/show_bug.cgi?id=533076#c17
*** Bug 533670 has been marked as a duplicate of this bug. ***
ntp's configure script has a couple of flags that may be relevant: --enable-thread-support s use threads (+ if available) --with-threads with threads [auto] So, instead of depending on libevent[threads] unconditionally, it may be possible to toggle threads support in ntp instead.
Created attachment 392522 [details, diff] Add threads use flag The --enable-thread-support flag seems to do the trick. Here is my suggested solution.
@Mike Gilbert: nice patch! I can confirm that Mike's patch fixes the problem. With Mike's patch, ntp can be build successfully with both variants: USE="threads" emerge --oneshot libevent ntp USE="-threads" emerge --oneshot libevent ntp Thanks!
(In reply to Michael Hofmann from comment #5) [...] > I can confirm that Mike's patch fixes the problem. i can confirm this for non-threaded system(s) too.
Anything preventing this from going in and live?
Are we supposed to create our own fork to get the issue fixed, or will the package maintainers take care of this? I've several servers running a vulnarable NTPD because the default packages don't provide a fix for this problem. Would be nice if the provided patch is included, shouldn't take more than 5 minutes work.
(In reply to Wim van Ravesteijn from comment #8) Please remember that we are all volunteers here, and you are not entitled to any form of support from us. Go buy a Red Hat contract if you require some SLA. Anyway, a very simple workaround for you would be to enable the threads use flag on libevent.
+ 26 Feb 2015; Mike Gilbert <floppym@gentoo.org> ntp-4.2.8-r2.ebuild: + Add threads use flag, bug 533548.
(In reply to Wim van Ravesteijn from comment #8) not only to echo Mike's sentiments, but why exactly would you need to fork to workaround this ? reinstall libevent once by hand and you're done. or add the flag to EXTRA_ECONF for the package's env. or tweak your USE flags. please refrain from making more out of an issue than there really is to it.
(In reply to Mike Gilbert from comment #9) Sorry for pushing to get a solution in portage tree, but the bug was open for almost 2 months while a solution (patch) was already proposed. I know you are all volunteers, but I don't have the access to build the fix myself. I understand you'll not fix this issue within an hour after it has been reported, but 2 months is too long if you ask me. In any case, thanks a lot for the fix, compiling now goes fine without changing any use flags. Tested on both x86 and amd64.