G-Node / nix

Neuroscience information exchange format
https://readthedocs.org/projects/nixio/
Other
67 stars 36 forks source link

Build fails with boost 1.60.0 #570

Closed achilleas-k closed 8 years ago

achilleas-k commented 8 years ago

The following error occurs when attempting to build nix against boost 1.60.0

In file included from /home/achilleas/code/gnode/nix/src/Value.cpp:11:0:
/home/achilleas/code/gnode/nix/include/nix/Value.hpp: In instantiation of ‘T nix::Value::get() const [with T = boost::none_t]’:
/home/achilleas/code/gnode/nix/include/nix/Value.hpp:132:24:   required from ‘void nix::Value::swap_helper(nix::Value&) [with T = boost::none_t]’
/home/achilleas/code/gnode/nix/src/Value.cpp:184:58:   required from here
/home/achilleas/code/gnode/nix/include/nix/Value.hpp:106:11: error: no matching function for call to ‘boost::none_t::none_t()’
         T temp;
           ^
In file included from /usr/include/boost/none.hpp:16:0,
                 from /usr/include/boost/optional/optional.hpp:51,
                 from /usr/include/boost/optional.hpp:15,
                 from /home/achilleas/code/gnode/nix/include/nix/None.hpp:14,
                 from /home/achilleas/code/gnode/nix/include/nix/Value.hpp:16,
                 from /home/achilleas/code/gnode/nix/src/Value.cpp:11:
/usr/include/boost/none_t.hpp:32:12: note: candidate: boost::none_t::none_t(boost::none_t::init_tag)
   explicit none_t(init_tag){} // to prevent default constructor
            ^
/usr/include/boost/none_t.hpp:32:12: note:   candidate expects 1 argument, 0 provided
/usr/include/boost/none_t.hpp:29:8: note: candidate: constexpr boost::none_t::none_t(const boost::none_t&)
 struct none_t
        ^
/usr/include/boost/none_t.hpp:29:8: note:   candidate expects 1 argument, 0 provided
/usr/include/boost/none_t.hpp:29:8: note: candidate: constexpr boost::none_t::none_t(boost::none_t&&)
/usr/include/boost/none_t.hpp:29:8: note:   candidate expects 1 argument, 0 provided
make[2]: *** [CMakeFiles/nix.dir/src/Value.cpp.o] Error 1
make[1]: *** [CMakeFiles/nix.dir/all] Error 2
make: *** [all] Error 2

Is this related to the change in boost::none in 1.60.0? Changed the implementation of boost::none again. Now it is a const object with internal linkage (as any other tag). This fixes #11203.

stoewer commented 8 years ago

Hello Achilleas, as far as I can tell the error is indeed related to the changes in boost 1.60.0. Until this issue is resolved it is best to use boost versions from 1.55 to 1.58.

achilleas-k commented 8 years ago

Thanks for the response. I'll hold back updating until it's resolved.

gicmo commented 8 years ago

I have a patch to fix this in the split_variant branch. I will try to get some more work done in that branch to make the split more useful and then create a pull request.