- changed status to resolved
Compilation fail with boost 1.64
Issue #28
resolved
Hi,
I'm running into the error described here while attempting to compile using boost 1.64: https://stackoverflow.com/questions/44534516/error-make-array-is-not-a-member-of-boostserialization
g++ -o src/metabat.o -c -Wall -g -std=c++11 -fopenmp -O3 -DNDEBUG -Wno-unknown-pragmas -Wno-deprecated-declarations -Wno-overflow -Wno-unused-variable -Iinclude -I/gnu/store/vibpj5yad50vsp5c75isj65r0f7imljn-boost-1.64.0/include src/metabat.cpp
In file included from /gnu/store/vibpj5yad50vsp5c75isj65r0f7imljn-boost-1.64.0/include/boost/numeric/ublas/vector.hpp:21:0,
from /gnu/store/vibpj5yad50vsp5c75isj65r0f7imljn-boost-1.64.0/include/boost/numeric/ublas/matrix.hpp:18,
from src/metabat.h:38,
from src/metabat.cpp:1:
/gnu/store/vibpj5yad50vsp5c75isj65r0f7imljn-boost-1.64.0/include/boost/numeric/ublas/storage.hpp: In member function ‘void boost::numeric::ublas::unbounded_array<T, ALLOC>::serialize(Archive&, unsigned int)’:
/gnu/store/vibpj5yad50vsp5c75isj65r0f7imljn-boost-1.64.0/include/boost/numeric/ublas/storage.hpp:299:18: error: ‘make_array’ is not a member of ‘boost::serialization’
ar & serialization::make_array(data_, s);
^
/gnu/store/vibpj5yad50vsp5c75isj65r0f7imljn-boost-1.64.0/include/boost/numeric/ublas/storage.hpp: In member function ‘void boost::numeric::ublas::bounded_array<T, N, ALLOC>::serialize(Archive&, unsigned int)’:
/gnu/store/vibpj5yad50vsp5c75isj65r0f7imljn-boost-1.64.0/include/boost/numeric/ublas/storage.hpp:494:18: error: ‘make_array’ is not a member of ‘boost::serialization’
ar & serialization::make_array(data_, s);
^
In file included from src/metabat.h:38:0,
from src/metabat.cpp:1:
/gnu/store/vibpj5yad50vsp5c75isj65r0f7imljn-boost-1.64.0/include/boost/numeric/ublas/matrix.hpp: In member function ‘void boost::numeric::ublas::c_matrix<T, M, N>::serialize(Archive&, unsigned int)’:
/gnu/store/vibpj5yad50vsp5c75isj65r0f7imljn-boost-1.64.0/include/boost/numeric/ublas/matrix.hpp:5977:18: error: ‘make_array’ is not a member of ‘boost::serialization’
ar & serialization::make_array(data_, N);
^
scons: *** [src/metabat.o] Error 1
scons: building terminated because of errors.
I realise that this is not a bug in metabat per se, but I was able to work around it by adding headers as suggested in metabat.h and metabat2.h. I'm not sure if anything should necessarily be done with the metabat code base itself, I suppose this is more of an advise to others, at least.
Comments (3)
-
-
OK, thanks. Be careful though - my understanding is that for older versions of boost, boost/serialization/array_wrapper.hpp does not exist, leading to a different compilation error.
-
Yes. It's included only for 1.64.
- Log in to comment
Thanks for the information. We fixed the issue to include array_wrapper.hpp for boost 1.64. Hopefully version 1.65 will fix this.