[Pkg-cmake-team] Bug#897560: cmake: CHECK_FUNCTION_EXISTS is broken

Nicolas Braud-Santoni nicolas at braud-santoni.eu
Wed May 2 22:45:38 BST 2018


Package: cmake
Version: 3.11.1-1
Severity: important

Dear cmake maintainers,

CMake's CHECK_FUNCTION_EXISTS was seemingly broken in the last upload, resulting
in configure failures when the function exists in headers but cannot be found by
the linker:

> Determining if the pthread_create exist failed with the following output:
> Change Dir: /<<BUILDDIR>>/libgit2-0.27.0+dfsg.1/build-debian-release/CMakeFiles/CMakeTmp
> 
> Run Build Command:"/usr/bin/make" "cmTC_78338/fast"
> make[2]: Entering directory '/<<BUILDDIR>>/libgit2-0.27.0+dfsg.1/build-debian-release/CMakeFiles/CMakeTmp'
> /usr/bin/make -f CMakeFiles/cmTC_78338.dir/build.make CMakeFiles/cmTC_78338.dir/build
> make[3]: Entering directory '/<<BUILDDIR>>/libgit2-0.27.0+dfsg.1/build-debian-release/CMakeFiles/CMakeTmp'
> Building C object CMakeFiles/cmTC_78338.dir/CheckSymbolExists.c.o
> /usr/bin/cc   -g -O2 -fdebug-prefix-map=/<<BUILDDIR>>/libgit2-0.27.0+dfsg.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2    -o CMakeFiles/cmTC_78338.dir/CheckSymbolExists.c.o   -c /<<BUILDDIR>>/libgit2-0.27.0+dfsg.1/build-debian-release/CMakeFiles/CMakeTmp/CheckSymbolExists.c
> Linking C executable cmTC_78338
> /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_78338.dir/link.txt --verbose=1
> /usr/bin/cc -g -O2 -fdebug-prefix-map=/<<BUILDDIR>>/libgit2-0.27.0+dfsg.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2   -Wl,-z,relro -Wl,-z,now  -rdynamic CMakeFiles/cmTC_78338.dir/CheckSymbolExists.c.o  -o cmTC_78338 
> CMakeFiles/cmTC_78338.dir/CheckSymbolExists.c.o: In function `main':
> ./build-debian-release/CMakeFiles/CMakeTmp/./build-debian-release/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: undefined reference to `pthread_create'
> collect2: error: ld returned 1 exit status
> make[3]: *** [CMakeFiles/cmTC_78338.dir/build.make:87: cmTC_78338] Error 1
> make[3]: Leaving directory '/<<BUILDDIR>>/libgit2-0.27.0+dfsg.1/build-debian-release/CMakeFiles/CMakeTmp'
> make[2]: *** [Makefile:126: cmTC_78338/fast] Error 2
> make[2]: Leaving directory '/<<BUILDDIR>>/libgit2-0.27.0+dfsg.1/build-debian-release/CMakeFiles/CMakeTmp'
> 
> File /<<BUILDDIR>>/libgit2-0.27.0+dfsg.1/build-debian-release/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
> /* */
> #include <pthread.h>
> 
> int main(int argc, char** argv)
> {
>   (void)argv;
> #ifndef pthread_create
>   return ((int*)(&pthread_create))[argc];
> #else
>   (void)argc;
>   return 0;
> #endif
> }


As this results in other packages failing to build, please consider fixing ASAP.


Best,

  nicoo

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.15.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages cmake depends on:
ii  cmake-data    3.11.1-1
ii  libarchive13  3.2.2-3.1
ii  libc6         2.27-3
ii  libcurl3      7.58.0-2
ii  libexpat1     2.2.5-3
ii  libgcc1       1:8-20180425-1
ii  libjsoncpp1   1.7.4-3
ii  librhash0     1.3.6-2
ii  libstdc++6    8-20180425-1
ii  libuv1        1.18.0-3
ii  procps        2:3.3.14-1
ii  zlib1g        1:1.2.8.dfsg-5

Versions of packages cmake recommends:
ii  gcc   4:7.2.0-1d1
ii  make  4.1-9.1

Versions of packages cmake suggests:
pn  cmake-doc    <none>
pn  ninja-build  <none>

-- no debconf information



More information about the Pkg-cmake-team mailing list