ntp FTBFS with GCC 14 (pthread_detach() check failure)
Description:
Hi,
Whlist trying to rebuild ntp package with pkgctl build
(which gcc package version is 14.1.1+r1+g43b730b9134-1), it
FTBFS at configure
step in build()
function. Specifically, configure
erred out on pthread_detach()
check:
configure:23231: checking for pthread_detach with <pthread.h>
configure:23254: cc -o conftest -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/ntp/src=/usr/src/debug/ntp -flto=auto -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto conftest.c >&5
conftest.c: In function 'main':
conftest.c:168:16: error: passing argument 1 of 'pthread_detach' makes integer from pointer without a cast [-Wint-conversion]
168 | pthread_detach(NULL);
| ^~~~
| |
| void *
In file included from conftest.c:160:
/usr/include/pthread.h:269:38: note: expected 'pthread_t' {aka 'long unsigned int'} but argument is of type 'void *'
269 | extern int pthread_detach (pthread_t __th) __THROW;
| ~~~~~~~~~~^~~~
configure:23254: $? = 1
The proposed patch from upstream bug report also fails to apply.
Full logs attached below.
Additional info:
- package version(s): 4.2.8.p17
- config and/or log files:
- link to upstream bug report, if any:
Steps to reproduce:
- Clone the package:
$ pkgctl clone --protocol https ntp
- Build:
$ pkgctl build --clean