Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 871372

Summary: net-misc/ntp-4.2.8_p15-r1 - configure: error: could not locate pthread_detach()
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: arsen, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=871288
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 870412    
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tar.bz2
logs.tar.bz2
net-misc:ntp-4.2.8_p15-r1:20220918-113918.log
temp.tar.bz2

Description Toralf Förster gentoo-dev 2022-09-18 13:17:00 UTC
checking for thr_yield... no
checking for pthread_kill... yes
checking for pthread_rwlock_destroy with <pthread.h>... yes
checking for pthread_detach with <pthread.h>... no
configure: error: could not locate pthread_detach()

!!! Please attach the following file when seeking support:

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_plasma_systemd-j4-20220917-010004

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-12.2.0 *
clang/llvm (if any):
clang version 15.0.0
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/15/bin
/usr/lib/llvm/15
15.0.0
Python 3.10.7
Available Ruby profiles:
  (none found)
Available Rust versions:
  [1]   rust-bin-1.63.0 *
The Glorious Glasgow Haskell Compilation System, version 9.0.2
php cli (if any):
  [1]   php7.4
  [2]   php8.0
  [3]   php8.1 *
GNU Make 4.3.90

  HEAD of ::gentoo
commit 4cccc95c4b995aec41eb1440471c5cc21a8a7f5a
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Sun Sep 18 10:31:50 2022 +0000

    2022-09-18 10:31:49 UTC

emerge -qpvO net-misc/ntp
[ebuild  N    ] net-misc/ntp-4.2.8_p15-r1  USE="ipv6 openntpd readline samba ssl threads -caps -debug -parse-clocks (-selinux) -snmp -vim-syntax -zeroconf"
Comment 1 Toralf Förster gentoo-dev 2022-09-18 13:17:01 UTC
Created attachment 811246 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2022-09-18 13:17:02 UTC
Created attachment 811249 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2022-09-18 13:17:04 UTC
Created attachment 811252 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2022-09-18 13:17:05 UTC
Created attachment 811255 [details]
etc.portage.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2022-09-18 13:17:06 UTC
Created attachment 811258 [details]
logs.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2022-09-18 13:17:07 UTC
Created attachment 811261 [details]
net-misc:ntp-4.2.8_p15-r1:20220918-113918.log
Comment 7 Toralf Förster gentoo-dev 2022-09-18 13:17:08 UTC
Created attachment 811264 [details]
temp.tar.bz2
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-24 01:54:18 UTC
configure:23452: checking for pthread_detach with <pthread.h>
configure:23475: clang-15 -o conftest -O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -Wreturn-type      -ggdb3 -fdebug-default-version=4 -gdwarf-4   -D_GNU_SOURCE -Wl,-O1 -Wl,--as-ne
eded -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,-z,pack-relative-relocs conftest.c    >&5
conftest.c:165:16: error: incompatible pointer to integer conversion passing 'void *' to parameter of type 'pthread_t' (aka 'unsigned long') [-Wint-conversion]
pthread_detach(NULL);
               ^~~~
/usr/lib/llvm/15/bin/../../../../lib/clang/15.0.5/include/stddef.h:89:16: note: expanded from macro 'NULL'
#  define NULL ((void*)0)
               ^~~~~~~~~~
/usr/include/pthread.h:269:38: note: passing argument to parameter '__th' here
extern int pthread_detach (pthread_t __th) __THROW;
                                     ^
1 error generated.
configure:23475: $? = 1
configure: failed program was:
| /* confdefs.h */

Issue is shared with OpenLDAP. It uses their macro.
Comment 9 Larry the Git Cow gentoo-dev 2022-11-24 11:27:28 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a7bf0374fbbec07e09c5c977e994939c6b79008

commit 2a7bf0374fbbec07e09c5c977e994939c6b79008
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-11-24 11:25:27 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-11-24 11:25:33 +0000

    net-misc/ntp: fix configure w/ clang 16
    
    Refresh OpenLDAP macro & use patched variant from Arsen (bug 871288).
    
    Closes: https://bugs.gentoo.org/871372
    Bug: https://bugs.gentoo.org/871288
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/ntp-4.2.8_p15-configure-clang16.patch    | 582 +++++++++++++++++++++
 net-misc/ntp/ntp-4.2.8_p15-r2.ebuild               | 144 +++++
 2 files changed, 726 insertions(+)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4d1d9ed527058cf86b22407cc492944f9b1e6e5

commit d4d1d9ed527058cf86b22407cc492944f9b1e6e5
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-11-24 11:17:03 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-11-24 11:25:33 +0000

    net-nds/openldap: fix configure+build w/ clang 16
    
    This affects the macro which ntp bundles too.
    
    Closes: https://bugs.gentoo.org/871288
    Bug: https://bugs.gentoo.org/871372
    Bug: https://bugs.gentoo.org/882183
    Signed-off-by: Sam James <sam@gentoo.org>

 .../openldap/files/openldap-2.6.3-clang16.patch    | 139 ++++
 net-nds/openldap/openldap-2.6.3-r1.ebuild          | 797 +++++++++++++++++++++
 2 files changed, 936 insertions(+)
Comment 10 Larry the Git Cow gentoo-dev 2022-11-25 07:05:49 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4480ce48447af4d8b6e35ca61f494f91698d5fe6

commit 4480ce48447af4d8b6e35ca61f494f91698d5fe6
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-11-25 07:04:24 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-11-25 07:05:08 +0000

    net-misc/ntp: fix configure w/ clang 16 deux
    
    Refresh OpenLDAP macro & use patched variant from Arsen (bug 871288).
    
    Closes: https://bugs.gentoo.org/871372
    Bug: https://bugs.gentoo.org/871288
    See: 2a7bf0374fbbec07e09c5c977e994939c6b79008
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/ntp-4.2.8_p15-configure-clang16.patch    | 80 ++++++++++++----------
 ...4.2.8_p15-r2.ebuild => ntp-4.2.8_p15-r3.ebuild} |  0
 2 files changed, 45 insertions(+), 35 deletions(-)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a87f975e56106632436903be3e94e2f272d9269d

commit a87f975e56106632436903be3e94e2f272d9269d
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-11-25 06:59:15 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-11-25 07:05:07 +0000

    net-nds/openldap: fix configure+build w/ clang 16 deux
    
    The previous patch wasn't enough on some systems.
    
    This affects the macro which ntp bundles too.
    
    Closes: https://bugs.gentoo.org/871288
    Bug: https://bugs.gentoo.org/871372
    Bug: https://bugs.gentoo.org/882183
    Fixes: d4d1d9ed527058cf86b22407cc492944f9b1e6e5
    Signed-off-by: Sam James <sam@gentoo.org>

 .../openldap/files/openldap-2.6.3-clang16.patch    | 48 ++++++++++++++++++----
 ...ap-2.6.3-r1.ebuild => openldap-2.6.3-r2.ebuild} |  0
 2 files changed, 39 insertions(+), 9 deletions(-)
Comment 11 jon R-B 2022-11-27 22:41:18 UTC
Unfortunately ntp-4.2.8_p15-r3 won't build for me now ( 4.2.8_p15-r1 did). Exact same error 



checking for pthread_yield... no
checking for thr_yield... no
checking for pthread_kill... yes
checking for pthread_rwlock_destroy with <pthread.h>... yes
checking for pthread_detach with <pthread.h>... no
configure: error: could not locate pthread_detach()




emerge --info
Portage 3.0.39 (python 3.10.8-final-0, default/linux/amd64/17.1/desktop, gcc-12, glibc-2.36-r6, 6.0.8-gentoo x86_64)
=================================================================
System uname: Linux-6.0.8-gentoo-x86_64-AMD_Ryzen_5_1600_Six-Core_Processor-with-glibc2.36
KiB Mem:    32829968 total,  13478444 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sun, 27 Nov 2022 22:02:01 +0000
Head commit of repository gentoo: 1027085481e4a53e4f54b1aa07499d9ce8b2c6d3

sh bash 5.2_p12
ld GNU ld (Gentoo 2.39 p5) 2.39.0
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.2_p12::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.36.0-r1::gentoo
dev-lang/python:           3.10.8_p3::gentoo, 3.11.0_p2::gentoo
dev-lang/rust:             1.65.0::gentoo
dev-util/cmake:            3.25.0::gentoo
dev-util/meson:            0.64.1::gentoo
sys-apps/baselayout:       2.9::gentoo
sys-apps/openrc:           0.45.2-r1::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.71-r5::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.39-r4::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/clang:           15.0.5::gentoo
sys-devel/gcc:             12.2.1_p20221008::gentoo
sys-devel/gcc-config:      2.8::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/lld:             15.0.5::gentoo
sys-devel/llvm:            15.0.5::gentoo
sys-devel/make:            4.4::gentoo
sys-kernel/linux-headers:  6.0::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r6::gentoo
sys-libs/libselinux:       3.4::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-git-verify-commit-signature: true

local
    location: /var/db/repos/local
    masters: gentoo

Installed sets: @steam
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
AR="llvm-ar"
CBUILD="x86_64-pc-linux-gnu"
CC="clang"
CFLAGS="-O3 -pipe -march=x86-64-v3  -mtune=native -flto=thin"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXX="clang++"
CXXFLAGS="-O3 -pipe -march=x86-64-v3  -mtune=native -flto=thin"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=5 --load-average=5.0 --with-bdeps y"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync metadata-transfer multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.bytemark.co.uk/gentoo/ http://www.mirrorservice.org/sites/distfiles.gentoo.org/"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_GB uk"
MAKEOPTS="-j8"
NM="llvm-nm"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
RANLIB="llvm-ranlib"
SHELL="/bin/bash"
USE="X a52 aac acl acpi aiglx alsa amd64 bash-completion binddist branding bzip2 cairo cblas-external cdda cdr clang cleartype cli corefonts crypt dri dts elogind encode eselect-ldso evdev exif ffmpeg flac fortran gcc64 gdbm gegl gif gles1 gles2 gpm graphite gstreamer gtk gui iconv icu imlib introspection ipv6 jpeg lcms libglvnd libnotify libtirpc llvm-libunwind lto mad mng mp3 mp4 mpeg multilib ncurses nls nptl nptlonly nsplugin ogg opengl openmp oss pam pango pcre pdf pgo pipewire png ppds pulseaudio python qt5 readline samba screencast sdl seatd seccomp smbclient spell split-usr ssl startup-notification svg test-rust threads tiff truetype type1 udev udisks unicode upower usb vorbis vulkan wayland wxwidgets xattr xcb xml xulrunner xv xvid zlib" ABI_X86="64 32" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="f16c mmx mmxext popcnt sse sse2 sse3 sse4a ssse avx sse4_2 sse4_1 ssse3" CURL_SSL="gnutls" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 efi-32" INPUT_DEVICES="keyboard mouse libinput" KERNEL="linux" L10N="en en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AMDGPU" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby31" USERLAND="GNU" VIDEO_CARDS="vesa amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, ARFLAGS, AS, ASFLAGS, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-28 11:13:14 UTC
ol_cv_pthread_select_yields Check needs one more fix
Comment 13 Larry the Git Cow gentoo-dev 2022-12-01 05:17:50 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56ef5ce33891feec34cd0c39a0a774a81a587dc7

commit 56ef5ce33891feec34cd0c39a0a774a81a587dc7
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-12-01 05:12:50 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-01 05:12:59 +0000

    net-misc/ntp: another pthread configure fix
    
    Closes: https://bugs.gentoo.org/871372
    Signed-off-by: Sam James <sam@gentoo.org>

 .../ntp/files/ntp-4.2.8_p15-configure-clang16.patch    | 18 ++++++++++++++++++
 ...ntp-4.2.8_p15-r3.ebuild => ntp-4.2.8_p15-r4.ebuild} |  0
 2 files changed, 18 insertions(+)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2796665929bb8baa0d9ffa0e17d1c573b9fdef02

commit 2796665929bb8baa0d9ffa0e17d1c573b9fdef02
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-12-01 05:08:28 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-01 05:12:58 +0000

    net-nds/openldap: another pthread configure fix
    
    Bug: https://bugs.gentoo.org/871372
    Signed-off-by: Sam James <sam@gentoo.org>

 .../openldap/files/openldap-2.6.3-clang16.patch    | 22 +++++++++++++++++++---
 ...ap-2.6.3-r2.ebuild => openldap-2.6.3-r3.ebuild} |  0
 2 files changed, 19 insertions(+), 3 deletions(-)