vexcl icon indicating copy to clipboard operation
vexcl copied to clipboard

Compilation failure with GCC 4.6

Open karlrupp opened this issue 8 years ago • 5 comments

I run into the following when building on Linux Mint Maya (based on Ubuntu 12.04 LTS):

[ 14%] Building CXX object tests/CMakeFiles/eval.dir/eval.cpp.o In file included from /usr/include/c++/4.6/bits/move.h:53:0, from /usr/include/c++/4.6/bits/stl_pair.h:60, from /usr/include/c++/4.6/utility:71, from /usr/include/boost/config/no_tr1/utility.hpp:21, from /usr/include/boost/config/select_stdlib_config.hpp:33, from /usr/include/boost/config.hpp:40, from /usr/include/boost/test/detail/config.hpp:19, from /usr/include/boost/test/utils/class_properties.hpp:20, from /usr/include/boost/test/predicate_result.hpp:19, from /usr/include/boost/test/test_tools.hpp:19, from /usr/include/boost/test/unit_test.hpp:19, from /home/rupp/development/VexCL/vexcl/tests/eval.cpp:2: /usr/include/c++/4.6/type_traits: In instantiation of ‘std::_Result_of_impl<false, false, vex::traits::multiex_dimension, vex::vector >’: /usr/include/c++/4.6/type_traits:1215:12: instantiated from ‘std::result_ofvex::traits::multiex_dimension(vex::vector<int)>’ /home/rupp/development/VexCL/vexcl/vexcl/vector_view.hpp:667:13: instantiated from ‘vex::vector_view<typename boost::proto::result_of::as_child<const Expr, vex::vector_domain>::type, vex::expr_permutation<Expr> > vex::expr_permutation<Expr>::operator()(const Base&) const [with Base = vex::vector, Expr = const vex::vector&, typename boost::proto::result_of::as_child<const Expr, vex::vector_domain>::type = const vex::vector&]’ /home/rupp/development/VexCL/vexcl/tests/eval.cpp:23:48: instantiated from here /usr/include/c++/4.6/type_traits:1192:9: error: no match for call to ‘(vex::traits::multiex_dimension) (vex::vector)’

karlrupp avatar Oct 17 '16 11:10 karlrupp

Hi Karl,

I've finally managed to install g++ 4.6 (had to use a virtual machine with Ubuntu for that). The first error I got actually comes from boost-1.58. It is described here:

https://svn.boost.org/trac/boost/ticket/11517

After installing boost 1.62 I've got a different error, which still comes from boost and g++ 4.6:

https://svn.boost.org/trac/boost/ticket/11874

Installing boost 1.59 fixes the above errors for me, but I can not reproduce the one you posted here.

ddemidov avatar Oct 26 '16 13:10 ddemidov

Errors are still present with Boost 1.64. Minimum reproducible example:

#include<boost/compute.hpp> #define VEXCL_BACKEND_COMPUTE #include <vexcl/vexcl.hpp>

int main(int argc, char* argv[]) return 0;

$ g++ -I$BOOST_DIR -I$VEXCL_DIR -std=c++11 -o test test.cpp -framework OpenCL -L$BOOST_LIB -lboost_system -lboost_filesystem

First error of 16: /usr/local/include/boost/compute/kernel.hpp:397:31: error: no type named 'type' in 'boost::enable_if<boost::compute::is_fundamental, void>'; 'enable_if' cannot be used to disable this declaration typename boost::enable_if<is_fundamental<T> >::type

System: OSX 10.12.6 with stock Clang compiler, Boost 1.64.

chrism0dwk avatar Aug 01 '17 12:08 chrism0dwk

This looks like an unrelated issue. Moreover, it looks like boost.compute is the source of the error here. Could you please check if the updated example (raw Boost.Compute) fails as well?

#include<boost/compute.hpp>
int main(int argc, char* argv[]) { return 0; }
$ g++ -I$BOOST_DIR -std=c++11 -o test test.cpp -framework OpenCL -L$BOOST_LIB -lboost_system -lboost_filesystem

If that is the case, I would open an issue at Boost.Compute issue tracker here.

ddemidov avatar Aug 01 '17 18:08 ddemidov

Hi Denis,

Your cut down example appears to compile fine, and in fact I've been using boost::compute quite a bit just recently.

It appears to be only when I select the boost::compute backend that the trouble occurs, i.e. by defining VEXCL_BACKEND_COMPUTE as above. If I remove this line, then everything compiles fine, except I can't then interop with boost::compute so well.

Chris

chrism0dwk avatar Aug 01 '17 20:08 chrism0dwk

I see. Could you please open a new issue for this, and provide a more complete error log? I can not reproduce the error on a Linux system.

ddemidov avatar Aug 02 '17 05:08 ddemidov