[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
Mon Jun 6 03:39:26 EDT 2011


Hi Luis,

when I try to configure Spine to use "C:\Program Files\ITK", it does not
accept this path. Precisely:
0. I "installed" ITK4
1. I set ITK_DIR to C:\Program Files\ITK
2. I click configure in CMake
3. Now ITK_DIR has value "D:/SDK/ITK4build", not "C:/Program Files/ITK"

If I click generate directly the effect is the same (ITK_DIR first gets
changed to D:/SDK/ITK4build).

Any more suggestions?

Thanks,
Dženan

2011/6/6 Luis Ibanez <luis.ibanez at kitware.com>

> Hi  Dženan,
>
> If the command line is getting too long,
> you can do:
>
> 1) build ITK
> 2) install ITK
> 3) build Spine versus the installed version of ITK
>
> In that way, you will have less paths in the
> command line.
>
>
>     Luis
>
>
> ------------------------------------
> 2011/5/31 Dženan Zukić <dzenanz at gmail.com>:
> > Hi all,
> > I wanted to try ITK4 from git, among other things because it already
> > includes IJ contribution 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
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Kitware offers ITK Training Courses, for more information visit:
> > http://www.kitware.com/products/protraining.html
> >
> > Please keep messages on-topic and check the ITK FAQ at:
> > http://www.itk.org/Wiki/ITK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.itk.org/mailman/listinfo/insight-users
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110606/3a7d270e/attachment.htm>


More information about the Insight-users mailing list