[Boost-bugs] [Boost C++ Libraries] #13517: Boost Small Container chokes MSVC+NVCC CUDA 9.1

Subject: [Boost-bugs] [Boost C++ Libraries] #13517: Boost Small Container chokes MSVC+NVCC CUDA 9.1
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-04-12 06:36:18


#13517: Boost Small Container chokes MSVC+NVCC CUDA 9.1
------------------------------+---------------------------
 Reporter: kandel3@… | Owner: Ion Gaztañaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: container
  Version: Boost 1.66.0 | Severity: Showstopper
 Keywords: |
------------------------------+---------------------------
 I wanted to file a bug to a problem I had a year ago that seems to be
 present in newer version of boost
 (https://stackoverflow.com/questions/42308279/is-boosts-small-vector-
 compatible-with-nvcc-8)

 Basically nvcc chokes when you include small_vector

 Steps to reproduce

 1. One line program in kernel.cu

 #include <boost/container/small_vector.hpp>
 //look ma, no main

 2. Build with typical settings, on my machine:

 1>------ Build started: Project: boost_test, Configuration: Debug x64
 ------
 1> Compiling CUDA source file kernel.cu...
 1>
 1> C:\Users\Misha\documents\visual studio
 2015\Projects\boost_test\boost_test>"C:\Program Files\NVIDIA GPU Computing
 Toolkit\CUDA\v9.1\bin\nvcc.exe"
 -gencode=arch=compute_30,code=\"sm_30,compute_30\" --use-local-env --cl-
 version 2015 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio
 14.0\VC\bin\x86_amd64" -x cu -I"C:\Program Files\NVIDIA GPU Computing
 Toolkit\CUDA\v9.1\include" -I"C:\Program Files\NVIDIA GPU Computing
 Toolkit\CUDA\v9.1\include" -G --keep-dir x64\Debug -maxrregcount=0
 --machine 64 --compile -cudart static -g -DWIN32 -DWIN64 -D_DEBUG
 -D_CONSOLE -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /FS /Zi /RTC1 /MDd "
 -o x64\Debug\kernel.cu.obj "C:\Users\Misha\documents\visual studio
 2015\Projects\boost_test\boost_test\kernel.cu"
 1> kernel.cu
 1>C:\Boost\include\boost-1_66\boost/container/small_vector.hpp(484): error
 C2332: 'struct': missing tag name
 1> C:\Boost\include\boost-1_66\boost/container/small_vector.hpp(608):
 note: see reference to class template instantiation
 'boost::container::small_vector<T,N,Allocator>' being compiled
 1>C:\Boost\include\boost-1_66\boost/container/small_vector.hpp(484):
 warning C4346:
 'boost::container::vector<T,boost::container::small_vector_allocator<Allocator>>::initial_capacity_t':
 dependent name is not a type
 1> C:\Boost\include\boost-1_66\boost/container/small_vector.hpp(484):
 note: prefix with 'typename' to indicate a type
 1>C:\Boost\include\boost-1_66\boost/container/small_vector.hpp(484): error
 C3646: 'initial_capacity_t': unknown override specifier
 1>C:\Boost\include\boost-1_66\boost/container/small_vector.hpp(484): error
 C3254: 'boost::container::small_vector<T,N,Allocator>': class contains
 explicit override 'initial_capacity_t' but does not derive from an
 interface that contains the function declaration
 1>C:\Boost\include\boost-1_66\boost/container/small_vector.hpp(484): error
 C2838: 'initial_capacity_t': illegal qualified name in member declaration
 1>c:\users\misha\appdata\local\temp\tmpxft_0000af9c_00000000-6_kernel.cudafe1.stub.c(2):
 warning C4103: alignment changed after including header, may be due to
 missing #pragma pack(pop)
 1>tmpxft_0000af9c_00000000-6_kernel.cudafe1.stub.c(1): warning C4103:
 alignment changed after including header, may be due to missing #pragma
 pack(pop)
 1>C:\Program Files
 (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\BuildCustomizations\CUDA
 9.1.targets(707,9): error MSB3721: The command ""C:\Program Files\NVIDIA
 GPU Computing Toolkit\CUDA\v9.1\bin\nvcc.exe"
 -gencode=arch=compute_30,code=\"sm_30,compute_30\" --use-local-env --cl-
 version 2015 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio
 14.0\VC\bin\x86_amd64" -x cu -I"C:\Program Files\NVIDIA GPU Computing
 Toolkit\CUDA\v9.1\include" -I"C:\Program Files\NVIDIA GPU Computing
 Toolkit\CUDA\v9.1\include" -G --keep-dir x64\Debug -maxrregcount=0
 --machine 64 --compile -cudart static -g -DWIN32 -DWIN64 -D_DEBUG
 -D_CONSOLE -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /FS /Zi /RTC1 /MDd "
 -o x64\Debug\kernel.cu.obj "C:\Users\Misha\documents\visual studio
 2015\Projects\boost_test\boost_test\kernel.cu"" exited with code 2.
 ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
 ==========

-- 
Ticket URL: <https://svn.boost.org/trac10/ticket/13517>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2018-04-12 06:42:44 UTC