Bug#978172: evolution-data-server: FTBFS: CheckFunctionExists.c:17: undefined reference to `res_query'

Andreas Henriksson andreas at fatal.se
Fri Jan 1 20:22:44 GMT 2021


Hello,

Seems like intentional(?) changes in libphonennumber caused this.

Adding recipient Matthias Klose, who uploaded the latest libphonenumber
version, to hopefully get a comment on if this is something than should
get fixed in libphonenumber or in e-d-s.

Please note that the libphonenumber Vcs-Git repo seems outdated so it's
not possible to track down exact commit which changed debian/control and
get more details!

On Sat, Dec 26, 2020 at 10:12:40PM +0100, Lucas Nussbaum wrote:
> Source: evolution-data-server
> Version: 3.38.2-2
> Severity: serious
> Justification: FTBFS on amd64
> Tags: bullseye sid ftbfs
> Usertags: ftbfs-20201226 ftbfs-bullseye
> 
> Hi,
> 
> During a rebuild of all packages in sid, your package failed to build
> on amd64.
> 
> Relevant part (hopefully):
> > /usr/bin/ld: CMakeFiles/cmTC_9ba60.dir/CheckFunctionExists.c.o: in function `main':
> > /usr/share/cmake-3.18/Modules/CheckFunctionExists.c:17: undefined reference to `res_query'
> > collect2: error: ld returned 1 exit status

Nope, this is a wild goose.... 

> 
> The full build log is available from:
>    http://qa-logs.debian.net/2020/12/26/evolution-data-server_3.38.2-2_unstable.log
[...]


Hopefully actually relevant part (because I have to say finding the
actual error from CMake builds is horrible!):

```
gmake[3]: Entering directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_24d88.dir/src.cxx.o
/usr/bin/c++ -DI18N_PHONENUMBERS_USE_BOOST  -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Dphone_number_with_boost_thread-mt -fPIE -o CMakeFiles/cmTC_24d88.dir/src.cxx.o -c /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/src.cxx
<command-line>: warning: ISO C++11 requires whitespace after the macro name
In file included from /usr/include/phonenumbers/phonenumberutil.h:32,
                 from /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/src.cxx:1:
/usr/include/phonenumbers/base/memory/scoped_ptr.h:10:10: fatal error: boost/scoped_ptr.hpp: No such file or directory
   10 | #include <boost/scoped_ptr.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[3]: *** [CMakeFiles/cmTC_24d88.dir/build.make:85: CMakeFiles/cmTC_24d88.dir/src.cxx.o] Error 1
gmake[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp'
gmake[2]: *** [Makefile:140: cmTC_24d88/fast] Error 2
```

So this looks like a bug in libphonenumber to me.... Interestingly
this is part of libphonenumber 7.1.0-7 changelog:
 * Don't build using boost, not required on recent Linux versions.

... and in /usr/include/phonenumbers/base/memory/scoped_ptr.h we can
see that the boost header is conditionally included based on
`#if defined(I18N_PHONENUMBERS_USE_BOOST)`.

That define in turn is apparently set by evolution-data-server:
./cmake/modules/FindPhonenumber.cmake:set(PHONENUMBER_DEFINITIONS -DI18N_PHONENUMBERS_USE_BOOST CACHE STRING "libphonenumber compile definitions, default is -DI18N_PHONENUMBERS_USE_BOOST")

Does that mean evolution-data-server is supposed to open-code the
dependencies needed by libphonenumber on boost ?
I think it would be better if the libphonenumber-dev pulled in
everything needed in every supported configuration (or alternatively
provided 2 separate -dev packages, eg. libphonenumber-boost-dev which
deps on libphonennumber-dev plus required boost parts but that seems
too complex for little gain - not to mention needing to go through NEW).



Regards,
Andreas Henriksson



More information about the pkg-gnome-maintainers mailing list