cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

davies1828
Adept I

undefined reference to SVM API while compiling to SVM binary search tree

Hello

I following the steps in Read me to compile the sample code of SVM binary search tree

but it shows the following message

Linking CXX executable bin/x86_64/Release/SVMBinaryTreeSearch

CMakeFiles/SVMBinaryTreeSearch.dir/SVMBinaryTreeSearch.cpp.o: In function `SVMBinaryTreeSearch::setupCL()':

SVMBinaryTreeSearch.cpp:(.text+0x33b0): undefined reference to `clCreateCommandQueueWithProperties'

SVMBinaryTreeSearch.cpp:(.text+0x3d0a): undefined reference to `clSVMAlloc'

SVMBinaryTreeSearch.cpp:(.text+0x3d38): undefined reference to `clSVMAlloc'

CMakeFiles/SVMBinaryTreeSearch.dir/SVMBinaryTreeSearch.cpp.o: In function `SVMBinaryTreeSearch::runSampleKernel()':

SVMBinaryTreeSearch.cpp:(.text+0x4a6f): undefined reference to `clSetKernelArgSVMPointer'

SVMBinaryTreeSearch.cpp:(.text+0x4b9c): undefined reference to `clSetKernelArgSVMPointer'

CMakeFiles/SVMBinaryTreeSearch.dir/SVMBinaryTreeSearch.cpp.o: In function `SVMBinaryTreeSearch::svmBinaryTreeCPUReference()':

SVMBinaryTreeSearch.cpp:(.text+0x539b): undefined reference to `clEnqueueSVMMap'

SVMBinaryTreeSearch.cpp:(.text+0x54d0): undefined reference to `clEnqueueSVMMap'

SVMBinaryTreeSearch.cpp:(.text+0x5625): undefined reference to `clEnqueueSVMUnmap'

SVMBinaryTreeSearch.cpp:(.text+0x5705): undefined reference to `clEnqueueSVMUnmap'

CMakeFiles/SVMBinaryTreeSearch.dir/SVMBinaryTreeSearch.cpp.o: In function `SVMBinaryTreeSearch::cleanup()':

SVMBinaryTreeSearch.cpp:(.text+0x5f64): undefined reference to `clSVMFree'

CMakeFiles/SVMBinaryTreeSearch.dir/SVMBinaryTreeSearch.cpp.o: In function `SVMBinaryTreeSearch::cpuCreateBinaryTree()':

SVMBinaryTreeSearch.cpp:(.text+0x63f4): undefined reference to `clEnqueueSVMMap'

SVMBinaryTreeSearch.cpp:(.text+0x65c6): undefined reference to `clEnqueueSVMUnmap'

CMakeFiles/SVMBinaryTreeSearch.dir/SVMBinaryTreeSearch.cpp.o: In function `SVMBinaryTreeSearch::cpuInitSearchKeys()':

SVMBinaryTreeSearch.cpp:(.text+0x6894): undefined reference to `clEnqueueSVMMap'

SVMBinaryTreeSearch.cpp:(.text+0x6a1c): undefined reference to `clEnqueueSVMUnmap'

CMakeFiles/SVMBinaryTreeSearch.dir/SVMBinaryTreeSearch.cpp.o: In function `SVMBinaryTreeSearch::compare()':

SVMBinaryTreeSearch.cpp:(.text+0x6b87): undefined reference to `clEnqueueSVMMap'

SVMBinaryTreeSearch.cpp:(.text+0x6cf9): undefined reference to `clEnqueueSVMUnmap'

CMakeFiles/SVMBinaryTreeSearch.dir/SVMBinaryTreeSearch.cpp.o: In function `SVMBinaryTreeSearch::printInOrder()':

SVMBinaryTreeSearch.cpp:(.text+0x74a2): undefined reference to `clEnqueueSVMMap'

SVMBinaryTreeSearch.cpp:(.text+0x765b): undefined reference to `clEnqueueSVMUnmap'

collect2: error: ld returned 1 exit status

make[2]: *** [bin/x86_64/Release/SVMBinaryTreeSearch] Error 1

make[1]: *** [CMakeFiles/SVMBinaryTreeSearch.dir/all] Error 2

make: *** [all] Error 2

my environment is

APU A10-7850K

OS  ubuntu 14.04

but the information comes from clinfo is

  Platform Version:OpenCL 2.0 AMD-APP (1598.5)
  Platform Name:AMD Accelerated Parallel Processing
Device OpenCL C version:OpenCL C 2.0
  Driver version:1598.5 (VM)
  Profile:FULL_PROFILE
  Version:OpenCL 2.0 AMD-APP (1598.5)
0 Likes
1 Solution
dipak
Big Boss

The linking problem seems only with OpenCL2.0 APIs. So, I guess the program is unable to link the OpenCL 2.0 compatible libraries present in APP SDK 3.0 beta. Please ensure that the APP SDK 3.0 beta has been installed properly and the environmental variable AMDAPPSDKROOT is pointing to latest one.

Regards,

View solution in original post

0 Likes
2 Replies
dipak
Big Boss

The linking problem seems only with OpenCL2.0 APIs. So, I guess the program is unable to link the OpenCL 2.0 compatible libraries present in APP SDK 3.0 beta. Please ensure that the APP SDK 3.0 beta has been installed properly and the environmental variable AMDAPPSDKROOT is pointing to latest one.

Regards,

0 Likes

Hey I find my problem

I find my /usr/lib/x86_64-linux-gnu/libOpenCL.so.1 is not linked to the new one

after re-link it works!