bundy
bundy copied to clipboard
bundy does not build with boost 1.60
When I attempt to build bundy with boost version 1.60, it fails with these errors because the BOOST_PFTO_WRAPPER() macro is no longer part of boost:
In file included from encode/base_n.cc:15:
../../../src/lib/util/encode/base32hex_from_binary.h:90:49: error: expected ')'
base32hex_from_binary(BOOST_PFTO_WRAPPER(T) start) :
^
../../../src/lib/util/encode/base32hex_from_binary.h:90:26: note: to match this '('
base32hex_from_binary(BOOST_PFTO_WRAPPER(T) start) :
^
../../../src/lib/util/encode/base32hex_from_binary.h:92:57: error: use of undeclared identifier 'start'
Base(BOOST_MAKE_PFTO_WRAPPER(static_cast<T>(start))),
^
../../../src/lib/util/encode/base32hex_from_binary.h:90:56: error: only constructors take base initializers
base32hex_from_binary(BOOST_PFTO_WRAPPER(T) start) :
^
In file included from encode/base_n.cc:16:
../../../src/lib/util/encode/binary_from_base32hex.h:99:50: error: expected ')'
binary_from_base32hex(BOOST_PFTO_WRAPPER(T) start) :
^
../../../src/lib/util/encode/binary_from_base32hex.h:99:26: note: to match this '('
binary_from_base32hex(BOOST_PFTO_WRAPPER(T) start) :
^
../../../src/lib/util/encode/binary_from_base32hex.h:101:57: error: use of undeclared identifier 'start'
Base(BOOST_MAKE_PFTO_WRAPPER(static_cast<T>(start))),
^
../../../src/lib/util/encode/binary_from_base32hex.h:99:57: error: only constructors take base initializers
binary_from_base32hex(BOOST_PFTO_WRAPPER(T) start) :
^
In file included from encode/base_n.cc:17:
../../../src/lib/util/encode/base16_from_binary.h:88:46: error: expected ')'
base16_from_binary(BOOST_PFTO_WRAPPER(T) start) :
^
../../../src/lib/util/encode/base16_from_binary.h:88:23: note: to match this '('
base16_from_binary(BOOST_PFTO_WRAPPER(T) start) :
^
../../../src/lib/util/encode/base16_from_binary.h:90:57: error: use of undeclared identifier 'start'
Base(BOOST_MAKE_PFTO_WRAPPER(static_cast<T>(start))),
^
../../../src/lib/util/encode/base16_from_binary.h:88:53: error: only constructors take base initializers
base16_from_binary(BOOST_PFTO_WRAPPER(T) start) :
^
In file included from encode/base_n.cc:18:
../../../src/lib/util/encode/binary_from_base16.h:96:47: error: expected ')'
binary_from_base16(BOOST_PFTO_WRAPPER(T) start) :
^
../../../src/lib/util/encode/binary_from_base16.h:96:23: note: to match this '('
binary_from_base16(BOOST_PFTO_WRAPPER(T) start) :
^
../../../src/lib/util/encode/binary_from_base16.h:98:57: error: use of undeclared identifier 'start'
Base(BOOST_MAKE_PFTO_WRAPPER(static_cast<T>(start))),
^
../../../src/lib/util/encode/binary_from_base16.h:96:54: error: only constructors take base initializers
binary_from_base16(BOOST_PFTO_WRAPPER(T) start) :
^
encode/base_n.cc:307:19: error: no matching conversion for functional-style cast from 'bundy::util::encode::
Sorry for not looking at this earlier. I'm not sure what the BOOST_PFTO_WRAPPER
macro does, so I'm not sure what to do about it. I'll continue to dig into this at some point, but if anyone knows what this is for it would be a big help. :smiley:
Poking around in https://github.com/boostorg/serialization I find this:
commit 5a94e5e4eb01cd8c941db725e5f89965a91740a9
Author: Robert Ramey <[email protected]>
Date: Mon Mar 23 15:29:57 2015 -0700
removed pfto
And https://kea.isc.org/ticket/4006 suggests a workaround which works for me!
diff --git a/src/lib/util/encode/base_n.cc b/src/lib/util/encode/base_n.cc
index 688792b..2c1463b 100644
--- a/src/lib/util/encode/base_n.cc
+++ b/src/lib/util/encode/base_n.cc
@@ -12,6 +12,10 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
+// workaround for PFTO (Partial Function Template Ordering) being removed from Boost 1.59
+#define BOOST_PFTO_WRAPPER(T) T
+#define BOOST_MAKE_PFTO_WRAPPER(t) t
+
#include <util/encode/base32hex_from_binary.h>
#include <util/encode/binary_from_base32hex.h>
#include <util/encode/base16_from_binary.h>
Created PR #104.