Bug#906605: mapserver: FTBFS in buster/sid (ld: cannot find -lpthreads)

Santiago Vila sanvila at debian.org
Sat Aug 18 17:41:34 BST 2018


Package: src:mapserver
Version: 7.2.0-4
Severity: serious
Tags: ftbfs

Dear maintainer:

I tried to build this package in buster but it failed:

--------------------------------------------------------------------------------
[...]
 debian/rules build-indep
dh build-indep --with python2,pkgkde_symbolshelper \
      --parallel \
      --buildsystem cmake
   dh_testdir -i -O--parallel -O--buildsystem=cmake
   dh_update_autotools_config -i -O--parallel -O--buildsystem=cmake
   debian/rules override_dh_auto_configure
make[1]: Entering directory '/<<PKGBUILDDIR>>'
dh_auto_configure -- -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXE_LINKER_FLAGS="-Wl,-z,relro -Wl,-z,now" -DCMAKE_MODULE_LINKER_FLAGS="-Wl,-z,relro -Wl,-z,now" -DCMAKE_SHARED_LINKER_FLAGS="-Wl,-z,relro -Wl,-z,now" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=1 -DWITH_PROJ=1 -DWITH_KML=1 -DWITH_SOS=1 -DWITH_WMS=1 -DWITH_FRIBIDI=1 -DWITH_HARFBUZZ=1 -DWITH_ICONV=1 -DWITH_CAIRO=1 -DWITH_SVGCAIRO=0 -DWITH_RSVG=1 -DWITH_MYSQL=0 -DWITH_FCGI=1 -DWITH_GEOS=1 -DWITH_POSTGIS=1 -DWITH_GDAL=1 -DWITH_OGR=1 -DWITH_CURL=1 -DWITH_CLIENT_WMS=1 -DWITH_CLIENT_WFS=1 -DWITH_WFS=1 -DWITH_WCS=1 -DWITH_LIBXML2=1 -DWITH_THREAD_SAFETY=1 -DWITH_GIF=1 -DWITH_ORACLESPATIAL=0 -DWITH_ORACLE_PLUGIN=0 -DWITH_MSSQL2008=0 -DWITH_EXEMPI=0 -DWITH_XMLMAPFILE=0 -DWITH_V8=0 -DWITH_PIXMAN=0 \
		     -DWITH_PYTHON=1 \
		     -DWITH_PHP=0 \
		     -DWITH_PERL=1 \
		     -DWITH_RUBY=0 \
		     -DWITH_JAVA=1 \

[... snipped ...]

./obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/./obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
make[3]: *** [CMakeFiles/cmTC_bf51a.dir/build.make:87: cmTC_bf51a] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp'
make[2]: *** [Makefile:121: cmTC_bf51a/fast] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp'

File /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/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
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_ba8bb/fast"
make[2]: Entering directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp'
/usr/bin/make -f CMakeFiles/cmTC_ba8bb.dir/build.make CMakeFiles/cmTC_ba8bb.dir/build
make[3]: Entering directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_ba8bb.dir/CheckFunctionExists.c.o
/usr/bin/cc   -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wl,-z,now -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Werror=format-security -Wdeclaration-after-statement -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_ba8bb.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.12/Modules/CheckFunctionExists.c
Linking C executable cmTC_ba8bb
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ba8bb.dir/link.txt --verbose=1
/usr/bin/cc -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wl,-z,now -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Werror=format-security -Wdeclaration-after-statement -DCHECK_FUNCTION_EXISTS=pthread_create  -Wl,-z,relro -Wl,-z,now  -rdynamic CMakeFiles/cmTC_ba8bb.dir/CheckFunctionExists.c.o  -o cmTC_ba8bb -lpthreads -lm 
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
make[3]: *** [CMakeFiles/cmTC_ba8bb.dir/build.make:87: cmTC_ba8bb] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp'
make[2]: *** [Makefile:121: cmTC_ba8bb/fast] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp'


dh_auto_configure: cd obj-x86_64-linux-gnu && cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON "-GUnix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-z,relro -Wl,-z,now" "-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-z,relro -Wl,-z,now" "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-z,relro -Wl,-z,now" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=1 -DWITH_PROJ=1 -DWITH_KML=1 -DWITH_SOS=1 -DWITH_WMS=1 -DWITH_FRIBIDI=1 -DWITH_HARFBUZZ=1 -DWITH_ICONV=1 -DWITH_CAIRO=1 -DWITH_SVGCAIRO=0 -DWITH_RSVG=1 -DWITH_MYSQL=0 -DWITH_FCGI=1 -DWITH_GEOS=1 -DWITH_POSTGIS=1 -DWITH_GDAL=1 -DWITH_OGR=1 -DWITH_CURL=1 -DWITH_CLIENT_WMS=1 -DWITH_CLIENT_WFS=1 -DWITH_WFS=1 -DWITH_WCS=1 -DWITH_LIBXML2=1 -DWITH_THREAD_SAFETY=1 -DWITH_GIF=1 -DWITH_ORACLESPATIAL=0 -DWITH_ORACLE_PLUGIN=0 -DWITH_MSSQL2008=0 -DWITH_EXEMPI=0 -DWITH_XMLMAPFILE=0 -DWITH_V8=0 -DWITH_PIXMAN=0 -DWITH_PYTHON=1 -DWITH_PHP=0 -DWITH_PERL=1 -DWITH_RUBY=0 -DWITH_JAVA=1 -DWITH_CSHARP=0 .. returned exit code 1
make[1]: *** [debian/rules:85: override_dh_auto_configure] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:73: build-indep] Error 2
dpkg-buildpackage: error: debian/rules build-indep subprocess returned exit status 2
--------------------------------------------------------------------------------

The build was made with "dpkg-buildpackage -A" in my autobuilder.
Most probably, it also fails here in reproducible builds:

https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/mapserver.html

where you can get a full build log if you need it.

If this is really a bug in one of the build-depends, please use reassign and affects,
so that this is still visible in the BTS web page for this package.

Thanks.



More information about the Pkg-grass-devel mailing list