Opened 11 years ago
Last modified 10 years ago
#6629 new Bugs
NVCC chokes on boost/mpl/map
Reported by: | Owned by: | Aleksey Gurtovoy | |
---|---|---|---|
Milestone: | To Be Determined | Component: | mpl |
Version: | Boost 1.44.0 | Severity: | Problem |
Keywords: | CUDA | Cc: | gshao@… |
Description
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 <boost/mpl/map.hpp> 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<Seq,Key>' 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