Hi all,
I have been trying to build the CUDA module on Win32 again. From the
CUDA side, things are simple, in theory, and there are two options:
1. Pass "--foreign" to nvcc. This will attempt to use gcc on win32 insead of cl.
2. Use nvcc to compile, i.e. pass "-c" instead of "-cuda" to nvcc.
This uses MSVC to compile.
In practice, of course, things are complicated :)
Using 1, the cudafe.exe distributed with CUDA crashes, and I have no idea why.
Using 2, the cuda_entry_points.obj file can not be linked to the rest
of the module, because it is built with Visual Studio (see dump at the
end of this mail). Anyone know of any Visual Studio or MinGW magic to
fix this? From what I understand, MinGW can somehow link to (some?)
native win32 libs.
-----------------------------------------------
[ 44%] Generating cuda_entry_points.obj
cd C:\workspace\k3d\build-release\modules\cuda_bitmap &&
C:\CUDA\bin\nvcc.exe -c -I C:/workspace/k3d -I
C:/workspace/k3d/k3dsdk/gil -I C:/workspace/k3d/build-release/k3dsdk
-I c:/boost/include/boost_1_34_1 -I C:/gtk/include/glibmm-2.4 -I
C:/gtk/lib/glibmm-2.4/include -I C:/gtk/include/sigc++-2.0 -I
C:/gtk/lib/sigc++-2.0/include -I C:/gtk/include/glib-2.0 -I
C:/gtk/lib/glib-2.0/include -I c:/gtk/include -I C:/CUDA/include -I
"C:/Program Files/NVIDIA Corporation/NVIDIA CUDA SDK/common/inc" -o
C:/workspace/k3d/build-release/modules/cuda_bitmap/cuda_entry_points.obj
C:/workspace/k3d/modules/cuda_bitmap/cuda_entry_points.cu
cuda_entry_points.cu
tmpxft_00000600_00000000-3_cuda_entry_points.cudafe1.gpu
tmpxft_00000600_00000000-8_cuda_entry_points.cudafe2.gpu
tmpxft_00000600_00000000-3_cuda_entry_points.cudafe1.cpp
tmpxft_00000600_00000000-12_cuda_entry_points.ii
Scanning dependencies of target k3d-cuda-bitmap
"C:\Program Files\CMake 2.4\bin\cmake.exe" -E cmake_depends "MinGW
Makefiles" C:\workspace\k3d C:\workspace\k3d\modules\cuda_bitmap
C:\workspace\k3d\build-release
C:\workspace\k3d\build-release\modules\cuda_bitmap
C:\workspace\k3d\build-release\modules\cuda_bitmap\CMakeFiles\k3d-cuda-bitmap.dir\DependInfo.cmake
make[2]: Leaving directory `C:/workspace/k3d/build-release'
make -f modules/cuda_bitmap/CMakeFiles/k3d-cuda-bitmap.dir/build.make
modules/cuda_bitmap/CMakeFiles/k3d-cuda-bitmap.dir/build
make[2]: Entering directory `C:/workspace/k3d/build-release'
Linking CXX shared library ../../lib/k3d/plugins/k3d-cuda-bitmap.module
cd C:\workspace\k3d\build-release\modules\cuda_bitmap && "C:\Program
Files\CMake 2.4\bin\cmake.exe" -P
CMakeFiles\k3d-cuda-bitmap.dir\cmake_clean_target.cmake
cd C:\workspace\k3d\build-release\modules\cuda_bitmap && "C:\Program
Files\CMake 2.4\bin\cmake.exe" -E cmake_link_script
CMakeFiles\k3d-cuda-bitmap.dir\link.txt --verbose=1
C:\mingw\bin\g++.exe -Wl,--enable-runtime-pseudo-reloc
-Wl,--export-all-symbols -shared -o
..\..\lib\k3d\plugins\k3d-cuda-bitmap.module
-Wl,--out-implib,../../lib/k3d/plugins/libk3d-cuda-bitmap.dll.a
-Wl,--major-image-version,0,--minor-image-version,0
"CMakeFiles/k3d-cuda-bitmap.dir/cuda_add.obj"
"CMakeFiles/k3d-cuda-bitmap.dir/module.obj"
"C:/workspace/k3d/build-release/modules/cuda_bitmap/cuda_entry_points.obj"
-LC:\Boost\lib -LC:\GTK\lib -LC:\workspace\k3d\build-release\bin
-LC:\CUDA\bin -LC:\PROGRA~1\NVIDIA~1\NVIDIA~1\common\lib -lk3dsdk
-lintl -lcudart -lcutil32 -lglibmm-2.4 -lgobject-2.0 -lsigc-2.0
-lglib-2.0 -liconv -lsigc-2.0 -lxml2 -lz -lk3dsdk-half
-lk3dsdk-sgi-tesselator -lk3dsdk-glew -lopengl32 -lglu32
-lk3dsdk-parallel -lole32 -lws2_32
Info: resolving vtable for k3d::plugin_factoryby linking to
__imp___ZTVN3k3d14plugin_factoryE (auto-import)
Info: resolving VTT for k3d::plugin_factory by linking to
__imp___ZTTN3k3d14plugin_factoryE (auto-import)
Creating library file: ../../lib/k3d/plugins/libk3d-cuda-bitmap.dll.a
Warning: .drectve `/DEFAULTLIB:"libcpmt" /DEFAULTLIB:"LIBCMT"
/DEFAULTLIB:"OLDNAMES" ' unrecognized
Cannot export ??$cudaLaunch@D@@YA?AW4cudaError@@PAD@Z: symbol not found
Cannot export ??0dim3@@QAE@III@Z: symbol not found
Cannot export ?iDivUp@@YAHHH@Z: symbol not found
C:/workspace/k3d/build-release/modules/cuda_bitmap/cuda_entry_points.obj:(.text+0x3a):
undefined reference to `__security_cookie'
C:/workspace/k3d/build-release/modules/cuda_bitmap/cuda_entry_points.obj:(.text+0x48):
undefined reference to `cudaGetDeviceCount@4'
C:/workspace/k3d/build-release/modules/cuda_bitmap/cuda_entry_points.obj:(.text+0x58):
undefined reference to `__iob_func'
C:/workspace/k3d/build-release/modules/cuda_bitmap/cuda_entry_points.obj:(.text+0x95):
undefined reference to `cudaGetDeviceProperties@8'
C:/workspace/k3d/build-release/modules/cuda_bitmap/cuda_entry_points.obj:(.text+0xb4):
undefined reference to `__iob_func'
C:/workspace/k3d/build-release/modules/cuda_bitmap/cuda_entry_points.obj:(.text+0xd2):
undefined reference to `cudaSetDevice@4'
C:/workspace/k3d/build-release/modules/cuda_bitmap/cuda_entry_points.obj:(.text+0xf4):
undefined reference to `cudaMalloc@8'
make[2]: Leaving directory `C:/workspace/k3d/build-release'
C:/workspace/k3d/build-release/modules/cuda_bitmap/cuda_entry_points.obj:(.text+0x107):
undefined reference to `cudaMemcpy@16'
make[1]: Leaving directory `C:/workspace/k3d/build-release'
C:/workspace/k3d/build-release/modules/cuda_bitmap/cuda_entry_points.obj:(.text+0x172):
undefined reference to `cudaConfigureCall@32'
C:/workspace/k3d/build-release/modules/cuda_bitmap/cuda_entry_points.obj:(.text+0x1a6):
undefined reference to `cudaMemcpy@16'
C:/workspace/k3d/build-release/modules/cuda_bitmap/cuda_entry_points.obj:(.text+0x1af):
undefined reference to `cudaFree@4'
C:/workspace/k3d/build-release/modules/cuda_bitmap/cuda_entry_points.obj:(.text+0x1b9):
undefined reference to `@__security_check_cookie@4'
C:/workspace/k3d/build-release/modules/cuda_bitmap/cuda_entry_points.obj:(.text+0x1da):
undefined reference to `__cudaUnregisterFatBinary@4'
C:/workspace/k3d/build-release/modules/cuda_bitmap/cuda_entry_points.obj:(.text+0x1f6):
undefined reference to `cudaSetupArgument@12'
C:/workspace/k3d/build-release/modules/cuda_bitmap/cuda_entry_points.obj:(.text+0x210):
undefined reference to `cudaSetupArgument@12'
C:/workspace/k3d/build-release/modules/cuda_bitmap/cuda_entry_points.obj:(.text+0x22a):
undefined reference to `cudaSetupArgument@12'
C:/workspace/k3d/build-release/modules/cuda_bitmap/cuda_entry_points.obj:(.text+0x244):
undefined reference to `cudaSetupArgument@12'
C:/workspace/k3d/build-release/modules/cuda_bitmap/cuda_entry_points.obj:(.text+0x279):
undefined reference to `__cudaRegisterFatBinary@4'
C:/workspace/k3d/build-release/modules/cuda_bitmap/cuda_entry_points.obj:(.text+0x2a4):
undefined reference to `__cudaRegisterFunction@40'
C:/workspace/k3d/build-release/modules/cuda_bitmap/cuda_entry_points.obj:(.text[??$cudaLaunch@D@@YA?AW4cudaError@@PAD@Z]+0x8):
undefined reference to `cudaLaunch@4'
collect2: ld returned 1 exit status
-----------------------------------------------------
Cheers,
--
Bart
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development