Is this linux or mac? I know with 10.6 Apple changed the default build from 32 to 64 bits, but the 3.0 CUDA runtime (which most of use) only supports 32 bit builds. Start off with an empty build directory and set the following environment variables:<br>
<br> CFLAGS=-m32<br> CXXFLAGS=-m32<br><br>Also try running 'make VERBOSE=1' to get the full command being used to compile your code.<br><br>You should also try and see if this error has appeared on the NVIDIA developer forum.<br>
<br>James<br><br><div class="gmail_quote">On Fri, Mar 26, 2010 at 12:57 PM, James C. Sutherland <span dir="ltr"><<a href="mailto:James.Sutherland@utah.edu">James.Sutherland@utah.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I am trying to use CMake to build a very simple CUDA program. I am seeing the following errors when I try to build:<br>
<br>
> /usr/include/c++/4.2.1/new(95): error: first parameter of allocation function must be of type "size_t"<br>
> /usr/include/c++/4.2.1/new(96): error: first parameter of allocation function must be of type "size_t"<br>
> /usr/include/c++/4.2.1/new(99): error: first parameter of allocation function must be of type "size_t"<br>
> /usr/include/c++/4.2.1/new(100): error: first parameter of allocation function must be of type "size_t"<br>
> /usr/include/c++/4.2.1/new(105): error: first parameter of allocation function must be of type "size_t"<br>
> /usr/include/c++/4.2.1/new(106): error: first parameter of allocation function must be of type "size_t"<br>
><br>
> 6 errors detected in the compilation of "/tmp/tmpxft_0000284b_00000000-4_device.cpp1.ii".<br>
> CMake Error at CMakeFiles/test_generated_device.cu.o.cmake:235 (message):<br>
> Error generating file<br>
> /Users/u0033394/Downloads/examples/cpp_integration/build/./test_generated_device.cu.o<br>
<br>
Any ideas on what would be causing this?<br>
<br>
My CMakeLists.txt file looks like:<br>
<br>
> cmake_minimum_required(VERSION 2.6)<br>
> project( JCSCudaTest CXX )<br>
><br>
> find_package(CUDA)<br>
><br>
> cuda_add_executable(test<br>
> <a href="http://device.cu" target="_blank">device.cu</a><br>
> host.cpp<br>
> )<br>
<br>
<br>
James<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br>