Project

General

Profile

Compilation problem with boost 1.64

Added by Alex G almost 7 years ago

I am unable to compile Wt with boost 1.64.

OpenGL is disabled but I get error while compiling WGLWidget.C:

from /home/a/Codx/PubApp/wt-3.3.7/src/Wt/WGLWidget.C:7:

/home/alexg/CodEx/PubApp/boost_1_64_0/boost/numeric/ublas/storage.hpp: In member function 'void boost::numeric::ublas::unbounded_array<T, ALLOC>::serialize(Archive&, unsigned int)':

/home/alexg/CodEx/PubApp/boost_1_64_0/boost/numeric/ublas/storage.hpp:299:18: error: 'make_array' is not a member of 'boost::serialization'

ar & serialization::make_array(data_, s);


Replies (2)

RE: Compilation problem with boost 1.64 - Added by Keith Bennett almost 7 years ago

I also have this trouble. Worth noting that Boost 1.62 does not have this trouble.

I really want to use Boost 1.64 for the new boost.process library though, so this is a rather unfortunate thing. This patch seems like a workaround (unless Wt team wants to kick the issue upstream to Boost maintenance):

diff --git a/src/Wt/WGenericMatrix b/src/Wt/WGenericMatrix
index ce48703..4fe3cb6 100644
--- a/src/Wt/WGenericMatrix
+++ b/src/Wt/WGenericMatrix
@@ -15,6 +15,7 @@
 #pragma warning( disable : 4267 )
 #endif
 #define BOOST_SERIALIZATION_NO_LIB
+#include <boost/serialization/array_wrapper.hpp>
 #include <boost/numeric/ublas/matrix.hpp>
 #ifdef _MSC_VER
 #pragma warning( pop )

Specifically, it looks like boost.numeric.ublas uses boost::serialization::make_array without including the header for it. I haven't looked through the change history to determine what/why/etc though.

FYI if you're using the Github repository, I created a pull request with the above fix here: https://github.com/emweb/wt/pull/114

RE: Compilation problem with boost 1.64 - Added by Roel Standaert almost 7 years ago

I've merged the pull request.

    (1-2/2)