AnsweredAssumed Answered

APP SDK 2.9.1 samples crash under Ubuntu 14.04

Question asked by hwli on Oct 11, 2014
Latest reply on Oct 13, 2014 by dipak

Not sure if anyone bumped into the same problem as me.

 

A fresh installation of Ubuntu 14.04, Catalyst Driver 2014/09/29 and the latest APP SDK 2.9.1. All samples crash at the clGetPlatformInfo(). After some searching, I found the problem is Ubuntu has a native libOpenCL.so at /usr/lib/libOpenCL.so. The samples are mistakenly linked to that .so which doesn't work later. After renaming that .so to something else and rebuild the samples, everything works fine now.

 

P.S., if one saw OPENCL_LIBRARIES not found in the execution of CMAKE, edit the CMAKELists.txt and change a few lines to

 

# Set platform

if( NOT UNIX )

        set(PLATFORM win)

else()

        set(PLATFORM lnx)

        SET(CMAKE_FIND_LIBRARY_PREFIXES "lib")

        SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a" ".so.1")

endif()

 

find_library( OPENCL_LIBRARIES

        NAMES OpenCL

        HINTS ../../../../lib/ $ENV{AMDAPPSDKROOT}/lib/${BITNESS_SUFFIX}

#       PATH_SUFFIXES ${PLATFORM}${BITNESS} ${BITNESS_SUFFIX}

)

 

A sample CMakeLists.txt are attached.

Attachments

Outcomes