5 Replies Latest reply on Nov 2, 2016 7:36 AM by dipak

    AMD DEVS - bug in AMDAPPSDK-3.0 Installer (linux x64)?

    volumetricsteve

      I installed the amd app sdk last night (Linux 64) and for some reason, it seems like it skipped over the most important file - libOpenCL.so.1

      I let the installer use its own default directories, I didn't tell it to do anything special.  I tried to compile some little sample opencl code which failed on linking.  I could find a link to libOpenCL.so.1 in /opt/AMDAPPSKD-3.0/lib/x86_64/ but the link there points to /usr/lib/libOpenCL.so.1, which doesn't exist.  I found the actual file in /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/ and I manually copied it to my /usr/lib/ which seemed to fix nearly all of my issues.  Is this normal behavior?  Assuming this package is targeting ubuntu, does ubuntu put libraries somewhere else?

       

      I went digging around in the 'install.sh' which lives in the installed directory of the amdappsdk.  Curious that it installs its install script along with everything else, but moving past that....  I found this:

       

      #Function Name: createOpenCLSoftLink

      #Comments     : creates the soft-link libOpenCL.so to libOpenCL.so.1

      #               This is done depending upon the libOpenCL.so file.

      #               If libOpenCL.so exist we are doing nothing.

      #               If only libOpenCL.so.1 is present in /usr/lib, then we are creating the soft-link libOpenCL.so to libOpenCL.so.1

      #               The libOpenCL.so* file are created depending upon the catalyst installation, so to handle this we are creating soft-link

      #               And libOpenCL.so is required by cmake files to pick the catalyst runtimes.

      #               If libOpenCL.so file is not found in /usr/lib, then cmake picks up the AMDAPPSDK runtimes.

       

      Without getting too far in the weeds, I imagine the way in which libOpenCL.so.1 is handled it must have been intentional, but it seems really strange.  Either way, the soft-linking seems to fail.  Is there a reason we're not just moving the right file into the right place?  Is this to account for other opencl implementations to avoid accidental over-write?

       

      Looking at the whole amdappsdk package, it's amazingly complex.  I guess it has to account for all kinds of environments, but this all seems like a lot and I suppose the amdappsdk does more than "just" opencl but...my god these scripts go on forever.