Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when building #18

Open
kolkov opened this issue Sep 13, 2017 · 21 comments
Open

Errors when building #18

kolkov opened this issue Sep 13, 2017 · 21 comments

Comments

@kolkov
Copy link

kolkov commented Sep 13, 2017

GOROOT=C:/Go
GOPATH=D:/Go
C:/Go\bin\go.exe build -i -o C:\Users\Andy\AppData\Local\Temp\___Unnamed.exe github.com/chewxy/cu/cmd/cudatest
# github.com/chewxy/cu
gcc: error: FilesNVIDIA: No such file or directory
gcc: error: GPU: No such file or directory
gcc: error: Computing: No such file or directory
gcc: error: ToolkitCUDAv8.0include: No such file or directory
@kolkov
Copy link
Author

kolkov commented Sep 13, 2017

Solved this by copy folder to D:/cuda/v8.0/bin and D:/cuda/v8.0/include (without spaces), but got another lot of errors

GOROOT=C:/Go
GOPATH=D:/Go
C:/Go\bin\go.exe build -i -o C:\Users\Andy\AppData\Local\Temp\___Unnamed.exe github.com/chewxy/cu/cmd/cudatest
# github.com/chewxy/cu
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\addressing.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemAdvise':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:44: undefined reference to `cuMemAdvise'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\addressing.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemPrefetchAsync':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:66: undefined reference to `cuMemPrefetchAsync'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\addressing.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuPointerGetAttribute':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:87: undefined reference to `cuPointerGetAttribute'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\addressing.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuPointerSetAttribute':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:108: undefined reference to `cuPointerSetAttribute'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\context.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuCtxCreate':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:43: undefined reference to `cuCtxCreate_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\context.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuCtxDestroy':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:61: undefined reference to `cuCtxDestroy_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\context.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuCtxGetApiVersion':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:80: undefined reference to `cuCtxGetApiVersion'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\context.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuCtxGetCacheConfig':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:98: undefined reference to `cuCtxGetCacheConfig'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\context.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuCtxGetCurrent':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:116: undefined reference to `cuCtxGetCurrent'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\context.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuCtxGetDevice':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:134: undefined reference to `cuCtxGetDevice'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\context.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuCtxGetFlags':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:152: undefined reference to `cuCtxGetFlags'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\context.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuCtxGetLimit':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:172: undefined reference to `cuCtxGetLimit'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\context.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuCtxGetSharedMemConfig':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:190: undefined reference to `cuCtxGetSharedMemConfig'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\context.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuCtxPopCurrent':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:208: undefined reference to `cuCtxPopCurrent_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\context.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuCtxPushCurrent':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:226: undefined reference to `cuCtxPushCurrent_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\context.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuCtxSetCacheConfig':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:245: undefined reference to `cuCtxSetCacheConfig'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\context.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuCtxSetCurrent':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:263: undefined reference to `cuCtxSetCurrent'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\context.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuCtxSetLimit':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:283: undefined reference to `cuCtxSetLimit'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\context.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuCtxSetSharedMemConfig':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:302: undefined reference to `cuCtxSetSharedMemConfig'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\context.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuCtxSynchronize':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:319: undefined reference to `cuCtxSynchronize'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\context.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuDevicePrimaryCtxGetState':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:340: undefined reference to `cuDevicePrimaryCtxGetState'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\context.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuDevicePrimaryCtxRelease':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:359: undefined reference to `cuDevicePrimaryCtxRelease'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\context.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuDevicePrimaryCtxReset':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:378: undefined reference to `cuDevicePrimaryCtxReset'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\context.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuDevicePrimaryCtxRetain':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:398: undefined reference to `cuDevicePrimaryCtxRetain'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\context.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuDevicePrimaryCtxSetFlags':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:417: undefined reference to `cuDevicePrimaryCtxSetFlags'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\cu.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuDriverGetVersion':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:41: undefined reference to `cuDriverGetVersion'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\cu.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuInit':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:60: undefined reference to `cuInit'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\device.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuDeviceGet':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:43: undefined reference to `cuDeviceGet'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\device.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuDeviceGetAttribute':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:63: undefined reference to `cuDeviceGetAttribute'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\device.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuDeviceGetCount':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:81: undefined reference to `cuDeviceGetCount'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\device.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuDeviceGetName':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:101: undefined reference to `cuDeviceGetName'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\device.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuDeviceTotalMem':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:121: undefined reference to `cuDeviceTotalMem_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\execution.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuFuncGetAttribute':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:44: undefined reference to `cuFuncGetAttribute'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\execution.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuFuncSetCacheConfig':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:64: undefined reference to `cuFuncSetCacheConfig'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\execution.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuFuncSetSharedMemConfig':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:84: undefined reference to `cuFuncSetSharedMemConfig'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\execution.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuLaunchKernel':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:113: undefined reference to `cuLaunchKernel'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuArray3DCreate':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:42: undefined reference to `cuArray3DCreate_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuArray3DGetDescriptor':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:61: undefined reference to `cuArray3DGetDescriptor_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuArrayCreate':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:80: undefined reference to `cuArrayCreate_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuArrayDestroy':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:98: undefined reference to `cuArrayDestroy'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuArrayGetDescriptor':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:117: undefined reference to `cuArrayGetDescriptor_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemAlloc':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:136: undefined reference to `cuMemAlloc_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemAllocHost':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:155: undefined reference to `cuMemAllocHost_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemAllocManaged':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:176: undefined reference to `cuMemAllocManaged'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemAllocPitch':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:199: undefined reference to `cuMemAllocPitch_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemFree':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:217: undefined reference to `cuMemFree_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemFreeHost':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:235: undefined reference to `cuMemFreeHost'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemGetAddressRange':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:255: undefined reference to `cuMemGetAddressRange_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemGetInfo':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:274: undefined reference to `cuMemGetInfo_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemcpy':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:294: undefined reference to `cuMemcpy'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemcpyAsync':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:315: undefined reference to `cuMemcpyAsync'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemcpyDtoD':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:335: undefined reference to `cuMemcpyDtoD_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemcpyDtoDAsync':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:356: undefined reference to `cuMemcpyDtoDAsync_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemcpyDtoH':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:376: undefined reference to `cuMemcpyDtoH_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemcpyDtoHAsync':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:397: undefined reference to `cuMemcpyDtoHAsync_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemcpyHtoD':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:417: undefined reference to `cuMemcpyHtoD_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemcpyHtoDAsync':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:438: undefined reference to `cuMemcpyHtoDAsync_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemcpyPeer':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:460: undefined reference to `cuMemcpyPeer'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemcpyPeerAsync':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:483: undefined reference to `cuMemcpyPeerAsync'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemsetD32':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:504: undefined reference to `cuMemsetD32_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemsetD32Async':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:526: undefined reference to `cuMemsetD32Async'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemsetD8':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:547: undefined reference to `cuMemsetD8_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\memory.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuMemsetD8Async':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:569: undefined reference to `cuMemsetD8Async'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\module.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuModuleGetFunction':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:43: undefined reference to `cuModuleGetFunction'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\module.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuModuleGetGlobal':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:64: undefined reference to `cuModuleGetGlobal_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\module.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuModuleLoad':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:83: undefined reference to `cuModuleLoad'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\module.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuModuleLoadData':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:102: undefined reference to `cuModuleLoadData'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\module.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuModuleUnload':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:120: undefined reference to `cuModuleUnload'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\occupancy.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuOccupancyMaxActiveBlocksPerMultiprocessor':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:45: undefined reference to `cuOccupancyMaxActiveBlocksPerMultiprocessor'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\occupancy.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:69: undefined reference to `cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\stream.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuStreamCreate':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:43: undefined reference to `cuStreamCreate'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\stream.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuStreamCreateWithPriority':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:63: undefined reference to `cuStreamCreateWithPriority'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\stream.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuStreamDestroy':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:81: undefined reference to `cuStreamDestroy_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\stream.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuStreamGetFlags':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:100: undefined reference to `cuStreamGetFlags'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\stream.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuStreamGetPriority':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:119: undefined reference to `cuStreamGetPriority'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\stream.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuStreamQuery':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:137: undefined reference to `cuStreamQuery'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\stream.cgo2.o: In function `_cgo_d079f8571fab_Cfunc_cuStreamSynchronize':
/tmp/go-build\github.com\chewxy\cu\_obj/cgo-gcc-prolog:155: undefined reference to `cuStreamSynchronize'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\batch.o: In function `cuDeviceGetAttributes':
./batch.c:11: undefined reference to `cuDeviceGetAttribute'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\batch.o: In function `cuLaunchAndSync':
./batch.c:25: undefined reference to `cuLaunchKernel'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\batch.o: In function `cuAllocAndCopy':
./batch.c:36: undefined reference to `cuMemAlloc_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\batch.o: In function `processFn':
./batch.c:99: undefined reference to `cuLaunchKernel'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\batch.o: In function `cuAllocAndCopy':
./batch.c:36: undefined reference to `cuMemAlloc_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\batch.o: In function `process':
./batch.c:123: undefined reference to `cuCtxSetCurrent'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\batch.o: In function `processFn':
./batch.c:99: undefined reference to `cuLaunchKernel'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\batch.o: In function `cuAllocAndCopy':
./batch.c:36: undefined reference to `cuMemAlloc_v2'
./batch.c:41: undefined reference to `cuMemcpyHtoD_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\batch.o: In function `processFn':
./batch.c:49: undefined reference to `cuCtxSetCurrent'
./batch.c:53: undefined reference to `cuMemAlloc_v2'
./batch.c:107: undefined reference to `cuCtxSynchronize'
./batch.c:64: undefined reference to `cuMemFree_v2'
./batch.c:68: undefined reference to `cuMemFreeHost'
./batch.c:72: undefined reference to `cuMemcpy'
./batch.c:77: undefined reference to `cuMemcpyHtoD_v2'
./batch.c:82: undefined reference to `cuMemcpyDtoH_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\batch.o: In function `cuLaunchAndSync':
./batch.c:30: undefined reference to `cuCtxSynchronize'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\batch.o: In function `cuAllocAndCopy':
./batch.c:41: undefined reference to `cuMemcpyHtoD_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\batch.o: In function `processFn':
./batch.c:53: undefined reference to `cuMemAlloc_v2'
./batch.c:107: undefined reference to `cuCtxSynchronize'
./batch.c:64: undefined reference to `cuMemFree_v2'
./batch.c:68: undefined reference to `cuMemFreeHost'
./batch.c:72: undefined reference to `cuMemcpy'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\batch.o: In function `cuAllocAndCopy':
./batch.c:41: undefined reference to `cuMemcpyHtoD_v2'
C:\Users\Andy\AppData\Local\Temp\go-build247682430\github.com\chewxy\cu\_obj\batch.o: In function `processFn':
./batch.c:82: undefined reference to `cuMemcpyDtoH_v2'
./batch.c:49: undefined reference to `cuCtxSetCurrent'
collect2.exe: error: ld returned 1 exit status

@kolkov kolkov closed this as completed Sep 13, 2017
@kolkov kolkov reopened this Sep 13, 2017
@chewxy
Copy link
Member

chewxy commented Sep 13, 2017

I'll look into this. This is on master?

@kolkov
Copy link
Author

kolkov commented Sep 14, 2017

Yes!

@kolkov
Copy link
Author

kolkov commented Oct 17, 2017

I returned to testing the package. I can not yet overcome the above compilation problem.

@chewxy
Copy link
Member

chewxy commented Oct 17, 2017

Did you try with the latest? There has been some updated by @abeltensor

@kolkov
Copy link
Author

kolkov commented Oct 17, 2017

Thanks! I updated cu package and chage path to cuda lib in my system to drive D:

CUDA version: 9000
CUDA devices: 1
Device 0
========
Name      :	"GeForce GT 740M"
Clock Rate:	895000 kHz
Memory    :	2147483648 bytes
Compute   : 	3.0

Process finished with exit code 0

Thanks!

@kolkov
Copy link
Author

kolkov commented Oct 17, 2017

I think that if we use this approach, it will be very convenient.
https://stackoverflow.com/questions/16931700/is-it-possible-to-use-environment-variables-in-a-cgo-cflags-comment

@chewxy
Copy link
Member

chewxy commented Oct 17, 2017

@kolkov
Copy link
Author

kolkov commented Oct 17, 2017

Yes! But the problem is that for Windows there is a hard binding to the path, and when installing CUDA, the real path to the library will be written into environment variables.
image

@chewxy
Copy link
Member

chewxy commented Oct 17, 2017

Oh that's... surprising. What would the solution be then? Making sure everyone set their environment variable is a lot less intuitive, no?

@kolkov
Copy link
Author

kolkov commented Oct 17, 2017

By default, this environment variables is set up by the CUDA toolkit installer itself.

@chewxy
Copy link
Member

chewxy commented Oct 17, 2017

is it always the same? If a user decides to install CUDA elsewhere?

If it's always the same we can hardcode it right?

@chewxy
Copy link
Member

chewxy commented Oct 17, 2017

btw, feel free to send a PR to show me what you mean

@kolkov
Copy link
Author

kolkov commented Oct 17, 2017

Thanks! Yes, the installer itself writes the selected path for installation. The default value is
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA
But the first time I had a problem with spaces in the path to the library. (

@abeltensor
Copy link
Contributor

abeltensor commented Oct 17, 2017

Sorry to interrupt the conversation here. But when I initially submitted my Pull request and added the other versions of Cuda I did actually try to set the environment flag ($CUDA_PATH/include/) rather then putting an absolute path into the flags. For whatever reason, Cgo had trouble getting the path even through the environment variable at C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA. Its possible that my implementation of this didn't work properly for whatever reasons. I didn't try it again after I reset the cuda path to c:\cuda.

Ill try it really quick now if you want and see if that will work. As @kolkov mentioned above, the cuda installer automatically sets up a CUDA_PATH variable on the system so it might be a better solution.

@abeltensor
Copy link
Contributor

abeltensor commented Oct 17, 2017

After a quick try, I was unable to make it work. The problem it seems has to do with the difference between bash path variables and windows path variables. Cgo uses the gcc compiler which means it needs to use a bash style syntax to find the variable which would be $CUDA_PATH but windows can't find the variable through that format. Windows needs to use a %CUDA_PATH% format.

I tried putting both %CUDA_PATH% and $CUDA_PATH into the cgoflags.go file with no success. If you are able to find an alternate syntax that would allow this to work then you could remove all of the other version paths for windows since the CUDA_PATH includes the version folder number.

@kolkov
Copy link
Author

kolkov commented Oct 17, 2017

@abeltensor
Copy link
Contributor

abeltensor commented Oct 17, 2017

Its not about the spaces so much as its about the windows variable format vs the bash variable format. %CUDA_PATH% and $CUDA_PATH respectively. I guess a different way to handle this would be to add some kind of conditional statement or try/catch block into the comments but I don't know if that's possible with cgo. I'll try to post a question to stack overflow and see what comes up.

@kolkov
Copy link
Author

kolkov commented Oct 17, 2017

Yes! This worked, but how to use system variable?
image

@kolkov
Copy link
Author

kolkov commented Oct 17, 2017

As an alternative, we can use:
https://github.com/rjeczalik/pkgconfig

@chewxy
Copy link
Member

chewxy commented Oct 18, 2017

I highly suggest putting in a PR. I'll mark it as hacktoberfest :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants