PowerDNS / pdns

PowerDNS Authoritative, PowerDNS Recursor, dnsdist
https://www.powerdns.com/
GNU General Public License v2.0
3.7k stars 908 forks source link

recursor: building on system without libboost_thread #8464

Open James-TR opened 5 years ago

James-TR commented 5 years ago

Short description

Recursor is bringing in a dependency on libboost_thread even though it is not required on Linux. This is causing OpenWRT's build system to pick up an erroneous unwanted dependency that's only used in the Configure script.

Environment

Steps to reproduce

  1. Install the minimal required boost libraries to build recursor
  2. Run the build with standard configure options on linux
  3. Check to see if built files have a dependency on libboost_thread

Expected behaviour

Recursor would build without any missing library errors

Actual behaviour

Recursor build shows missing libboost_thread

Other information

OpenWRT removed a dependency from their libboost_context package on libboost_thread which caused this issue because the package stopped being brought in.

pieterlexis commented 5 years ago

According to boost.m4:

# BOOST_CONTEXT([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
# -----------------------------------
# Look for Boost.Context.  For the documentation of PREFERRED-RT-OPT, see the
# documentation of BOOST_FIND_LIB above.
[...]
# * A dependency on boost_thread appears in 1.57.0
[...]
James-TR commented 5 years ago

The boost.m4 check for boost_thread is incorrect, as this isn't linked where <mutex> is available.

Here's the relevant commit: https://github.com/boostorg/context/commit/01d3c901e45d8e5c93133112563953380caaf059

And the lines of code in the version of boost OpenWRT is using: https://github.com/boostorg/context/blob/boost-1.71.0/build/Jamfile.v2#L783-L789

James-TR commented 5 years ago

I've opened an issue in the upstream boost.m4 repository https://github.com/tsuna/boost.m4/issues/117