PowerDNS / pdns

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

dnsdist 1.7.2 and master do not build on amazonlinux 2 #12142

Open cmueller9999 opened 1 year ago

cmueller9999 commented 1 year ago

Short description

compilation error

Environment

Steps to reproduce

./configure make

Expected behaviour

Actual behaviour

CXX dnsdist-lua-bindings.o dnsdist-lua-bindings.cc: In lambda function: dnsdist-lua-bindings.cc:438:92: error: ‘class boost::optional’ has no member named ‘value_or’; did you mean ‘get_value_or’? return std::make_shared(v4Config, v6Config, qnameConfig, format, external.value_or(false)); ^~~~ get_value_or dnsdist-lua-bindings.cc: In lambda function: dnsdist-lua-bindings.cc:470:72: error: ‘class boost::optional’ has no member named ‘value_or’; did you mean ‘get_value_or’? return bpf->block(qname, BPFFilter::MatchAction::Drop, qtype.value_or(255)); ^~~~ get_value_or dnsdist-lua-bindings.cc:488:49: error: ‘class boost::optional’ has no member named ‘value_or’; did you mean ‘get_value_or’? return bpf->block(qname, match, qtype.value_or(255)); ^~~~ get_value_or make[2]: [dnsdist-lua-bindings.o] Error 1 make[2]: Leaving directory `/root/dnsdist-1.7.2' make[1]: [all-recursive] Error 1 make[1]: Leaving directory `/root/dnsdist-1.7.2' make: *** [all] Error 2

Other information

phonedph1 commented 1 year ago

I got past these by using amazon linux 2 gcc10 and building the latest version of boost (amazon linux 2 version is quite old). My build isn't done yet but I suspect you'd have success doing that.

Relevant: #9089

Habbie commented 1 year ago

Our own amazon-2 package build (via builder/build.sh) is broken because of this since 053a020a8c8a23c9c7471a9d6e1161606738b6a6

Habbie commented 1 year ago

Indeed Boost 1.53 does not have value_or (https://www.boost.org/doc/libs/1_53_0/libs/optional/doc/html/boost_optional/synopsis.html)

Habbie commented 1 year ago

Digging into this, I find:

the amazon-2 build is also affected by #12104

the master (so not 1.7.x) build is broken for different reasons (dependency issues):

Error: Package: boost169-numpy3-1.69.0-2.el7.x86_64 (epel)
           Requires: libpython3.6m.so.1.0()(64bit)
Error: Package: python36-numpy-1.12.1-3.el7.x86_64 (epel)
           Requires: python(abi) = 3.6
Habbie commented 1 year ago

the master (so not 1.7.x) build is broken for different reasons (dependency issues):

since 6f7f89d95f10d0a9b58d935def06d80f6e77ffb6

Habbie commented 1 year ago

Indeed Boost 1.53 does not have value_or (https://www.boost.org/doc/libs/1_53_0/libs/optional/doc/html/boost_optional/synopsis.html)

It's new in 1.56