I would like to use cygwin with the CUDA tools to build CUDA applications on XP.
I tried using the --foreign option with nvcc but the attempt to compile the matrixMul.cu file fails with the following types of errors from cudafe:
nvcc --foreign --keep --verbose -dp /local/cygwin/ -I /c/local/NVIDIA_CUDA_SDK/common/inc/ matrixMul.cu 2>&1 | head -30
#$ _SPACE_=
#$ _HERE_=c:\local\CUDA\bin
#$ TOP=c:\local\CUDA\bin/..
#$ PATH=... # too long to print
#$ INCLUDES="-Ic:\local\CUDA\bin/../include" "-Ic:\local\CUDA\bin/../include/cudart"
#$ LIBRARIES= "c:\local\CUDA\bin/../lib/cuda.lib" "c:\local\CUDA\bin/../lib/cudart.lib" /OPT:NOICF
#$ PTXAS_FLAGS=
#$ OPENCC_FLAGS=
#$ gcc -E -x c++ -DCUDA_FLOAT_MATH_FUNCTIONS -DCUDA_NO_SM_11_ATOMIC_INTRINSICS "-Ic:\local\CUDA\bin/../include" "-Ic:\local\CUDA\bin/../include/cudart" -I. -D__CUDACC__ -C -I"/c/local/NVIDIA_CUDA_SDK/common/inc/" -include "cuda_runtime.h" -m32 -malign-double -o "matrixMul.cpp1.ii" "matrixMul.cu"
#$ cudafe --m32 "-Ic:\local\CUDA\bin/../include" "-Ic:\local\CUDA\bin/../include/cudart" -I. --gen_c_file_name "matrixMul.cudafe1.c" --gen_device_file_name "matrixMul.cudafe1.gpu" --include_file_name matrixMul.fatbin.c --diag_error=host_device_limited_call --no_exceptions -tused -I"/c/local/NVIDIA_CUDA_SDK/common/inc/" "matrixMul.cpp1.ii"
"c:/local/CUDA/bin/../include/vector_types.h", line 66: error: expected a type
specifier
struct __attribute__((aligned(2))) char2
^
"c:/local/CUDA/bin/../include/vector_types.h", line 66: error: function
"aligned" returns incomplete type "__attribute__"
struct __attribute__((aligned(2))) char2
^
"c:/local/CUDA/bin/../include/vector_types.h", line 66: error: expected a "{"
struct __attribute__((aligned(2))) char2
^
"c:/local/CUDA/bin/../include/vector_types.h", line 69: warning: missing
return statement at end of non-void function "aligned"
};
^
"c:/local/CUDA/bin/../include/vector_types.h", line 68: warning: variable "x"
...
I had hoped that since gcc was supported for linux, it would be possible to use cygwin gcc tools under windows. The problem line:
struct __attribute__((aligned(2))) char2
works fine with gcc but cudafe reports an error. Has anyone gotten the CUDA tools to work with cygwin rather than MSVC? Is it even possible?
Suggestions welcome.
Thanks much.