id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 6629,NVCC chokes on boost/mpl/map,gshao@…,Aleksey Gurtovoy,"We're now receiving a bug report from our customers that they are hitting a problem compiling a code including boost with NVCC. The bug report from our customer: ----------------------------------------- Unfortunately I’m now hitting a real problem with NVCC elsewhere in boost too. Once again, merely including the header is enough to trip up NVCC (but only on Windows): boost_mpl_map.cu: #include int main( int argc, char ** argv ) { } C:\>nvcc boost_mpl_map.cu -o boost_mpl_map.exe -Iboost/include/boost-1_44 boost_mpl_map.cu tmpxft_00000764_00000000-3_boost_mpl_map.cudafe1.gpu tmpxft_00000764_00000000-8_boost_mpl_map.cudafe2.gpu boost_mpl_map.cu tmpxft_00000764_00000000-3_boost_mpl_map.cudafe1.cpp tmpxft_00000764_00000000-14_boost_mpl_map.ii stuff/boost/include/boost-1_44\boost/mpl/aux_/order_impl.hpp(35) : error C2064: term does not evaluate to a function taking 2 arguments stuff/boost/include/boost-1_44\boost/mpl/aux_/order_impl.hpp(57) : see reference to class template instantiation 'boost::mpl::x_order_impl' being compiled As with the previous issues, compiling as a .cpp (still using NVCC) is fine. This affects both CUDA 4.0 and CUDA 4.1, and I’m using VS2010 for CL. A workaround would be greatly appreciated if you can find one as I haven’t managed to come up with one yet! ----------------------------------------- This issue has been investigated by our developers and finally it was root caused as a boost issue. He downloaded boost 1.44.0, and found that boost is doing something special when __CUDACC__ is defined. boost_1_44_0$ grep -IR CUDACC * boost/config/select_compiler_config.hpp:#elif defined __CUDACC__ boost/concept/detail/has_constraints.hpp:#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580) || defined(__CUDACC__) boost/type_traits.hpp:#if !defined(__BORLANDC__) && !defined(__CUDACC__) Unfortunately, this special workaround in boost does not work properly. If he just compile the example code supplied in the description with the Microsoft compiler, after renaming it to .cpp, with __CUDACC__ defined, the compilation fails. U:\> type main.cpp #include int main(int argc, char *argv[]) { return 0; } U:\> cl -D__CUDACC__ -Iboost_1_44_0 main.cpp Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved. main.cpp boost_1_44_0\boost/mpl/aux_/order_impl.hpp(50) : error C2064: term does not evaluate to a function taking 2 arguments boost_1_44_0\boost/mpl/aux_/order_impl.hpp(57) : see reference to class template instantiation 'boost::mpl::x_order_impl' being compiled So, this might be a bug in boost. If the boost implementers put this special treatment for nvcc due to a bug in nvcc, we are willing to work on the real bug, but this one is a bug in the special treatment code. Best regards, Andrew Shao",Bugs,new,To Be Determined,mpl,Boost 1.44.0,Problem,,CUDA,gshao@…