[Insight-users] CUDA compile error when switching from ITK 3.20 to 4-Git: "The command line is too long"
Dženan Zukić
dzenanz at gmail.com
Tue May 31 06:56:42 EDT 2011
Hi all,
I wanted to try ITK4 from git, among other things because it already
includes IJ contribution
176<http://www.insight-journal.org/browse/publication/176>.
It configures and builds without problems.
However when I switch from ITK 3.20 to it in my project (called "Spine"), I
start getting a new mysterious error:
1>------ Build started: Project: ZERO_CHECK, Configuration: Debug x64 ------
2>------ Build started: Project: Spine, Configuration: Debug x64 ------
2> Building NVCC (Device) object Debug/Spine_generated_LHstuff.cu.obj
2> The command line is too long.
2> CMake Error at CMakeFiles/Spine_generated_LHstuff.cu.obj.cmake:198
(message):
2> Error generating D:/Repo/Spine/Debug/Spine_generated_LHstuff.cu.obj
2>
2>
2>C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error
MSB6006: "cmd.exe" exited with code 1.
3>------ Skipped Build: Project: ALL_BUILD, Configuration: Debug x64 ------
3>Project not selected to build for this solution configuration
========== Build: 1 succeeded, 1 failed, 1 up-to-date, 1 skipped ==========
LHstuff.cu compiles normally, both with CUDA toolkit 3.2 and the recently
installed 4.0. I switched to VS2010 since I installed CUDA 4.0 a few days
ago (when it was released). This is the only CUDA file in my project.
LHstuff.cu has the following custom build command (part of the
CMake-generated .vcxproj):
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E make_directory
D:/Repo/Spine/$(Configuration)
if errorlevel 1 goto :VCEnd
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -D verbose:BOOL=OFF -D
"CCBIN:PATH=$(VCInstallDir)bin" -D
build_configuration:STRING=$(ConfigurationName) -D
generated_file:STRING=D:/Repo/Spine/$(Configuration)/Spine_generated_LHstuff.cu.obj
-D
generated_cubin_file:STRING=D:/Repo/Spine/$(Configuration)/Spine_generated_LHstuff.cu.obj.cubin.txt
-P D:/Repo/Spine/CMakeFiles/Spine_generated_LHstuff.cu.obj.cmake
if errorlevel 1 goto :VCEnd
and the relevant part of "Spine_generated_LHstuff.cu.obj.cmake" (around line
198):
# Generate the dependency file
cuda_execute_process(
"Generating dependency file: ${NVCC_generated_dependency_file}"
COMMAND "${CUDA_NVCC_EXECUTABLE}"
-M
${CUDACC_DEFINE}
"${source_file}"
-o "${NVCC_generated_dependency_file}"
${CCBIN}
${nvcc_flags}
${nvcc_host_compiler_flags}
${depends_CUDA_NVCC_FLAGS}
-DNVCC
${CUDA_NVCC_INCLUDE_ARGS}
)
if(CUDA_result)
message(FATAL_ERROR "Error generating ${generated_file}")
endif()
It seems that deeper directory structure of ITK4 is pushing this command in
"Spine_generated_LHstuff.cu.obj.cmake" over some limit (possibly 255
characters). Do you have any suggestions how to resolve this issue?
Regards,
Dženan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110531/b613a997/attachment.htm>
More information about the Insight-users
mailing list