Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation failure with GCC 4.6 #212

Open
karlrupp opened this issue Oct 17, 2016 · 5 comments
Open

Compilation failure with GCC 4.6 #212

karlrupp opened this issue Oct 17, 2016 · 5 comments

Comments

@karlrupp
Copy link

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 > vex::expr_permutation::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)’

@ddemidov
Copy link
Owner

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.

@chrism0dwk
Copy link

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 >::type

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

@ddemidov
Copy link
Owner

ddemidov commented Aug 1, 2017

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.

@chrism0dwk
Copy link

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

@ddemidov
Copy link
Owner

ddemidov commented Aug 2, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants