On Sun, 2020-06-21 at 21:52 +0200, Lucas Nussbaum wrote:
> During a rebuild of all packages in sid, your package failed to build
> on amd64.
Thanks for the report Lucas.
I tried reproducing locally with:
sbuild -n -A -s --force-orig-source --apt-update -d unstable -v
--no-run-lintian cmake-format_0.6.10-2.dsc
but the build was successful.
> Relevant part (hopefully):
> > /usr/bin/ld: CMakeFiles/cmTC_892ca.dir/src.c.o: in function `main':
> > ./.pybuild/cpython3_3.8/build/CMakeFiles/CMakeTmp/./.pybuild/cpython3_3.8/build/CMakeFiles/CMakeTmp/src.c:11:
> > undefined reference to `pthread_create'
> > /usr/bin/ld:
> > ./.pybuild/cpython3_3.8/build/CMakeFiles/CMakeTmp/./.pybuild/cpython3_3.8/build/CMakeFiles/CMakeTmp/src.c:12:
> > undefined reference to `pthread_detach'
> > /usr/bin/ld:
> > ./.pybuild/cpython3_3.8/build/CMakeFiles/CMakeTmp/./.pybuild/cpython3_3.8/build/CMakeFiles/CMakeTmp/src.c:13:
> > undefined reference to `pthread_join'
> > collect2: error: ld returned 1 exit status
There's also a little earlier:
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
Which is not present in the successful builds.
What's weird is that in my local build and on the buildd I see:
dh_auto_configure -O--buildsystem=pybuild
pybuild --configure -i python{version} -p 3.8
I: pybuild base:217: python3.8 setup.py config
running config
dh_auto_build -O--buildsystem=pybuild
pybuild --build -i python{version} -p 3.8
I: pybuild base:217: /usr/bin/python3 setup.py build
(buildd is slightly different since it has an extra `-i`)
Whereas in your log I see:
dh_auto_configure -O--buildsystem=pybuild
pybuild --configure -i python{version} -p 3.8
I: pybuild base:217: dh_auto_configure --buildsystem=cmake
--builddirectory="/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build" -- <...snip...>
cd .pybuild/cpython3_3.8/build && <...>
It seems like pybuild has some heuristics for picking the build plugin
to use, for me (and buildd) it selects plugin_distutils.py but for you
it is selecting plugin_cmake.py. I can't see why. If you somehow had a
`CMakeCache.txt` in the package directory that might explain it, but
there's no reason for one of those to be there (I assume you'd have
said if this was e.g. a repeated build without cleaning the package dir
in the middle, but even if it was I don't think I'd ).
In the absence of a local repro I'm going to throw in a
'PYBUILD_SYSTEM=distutils' which ought to force things to go the
desired way no matter what. Fingers crossed!
Cheers,
Ian.