2 Replies Latest reply on Dec 26, 2014 4:52 AM by davies1828

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

    davies1828

      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)