4

I would like to script the install for the OpenCL SDK from AMD which I can find here

Naturally I assumed a simple wget call would work.

wget http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/AMD-APP-SDK-v2.9-lnx64.tgz

But when I try to extract the tgz file I get the following error:

tar -zxvf AMD-APP-SDK-v2.9-lnx64.tgz 

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

Did I make some simple error or is there some other way to get the most recent 'stable' SDK from AMD from the terminal?

cdeterman
  • 155

2 Answers2

1

As @Eliah pointed out, this is happening because you are downloading an incorrect file by using wget. This can be confirmed by comparing the downloaded files MD5 checksum to the one listed on the AMD checksum reference page. The archive downloaded using wget will have a different checksum than the one listed on that page.

  • If you download AMD-APP-SDK-v2.9-lnx64.tgz from the AMD website, you will need to agree to a License Agreement before being able to download it.
  • If you use wget to download the SDK, you will not be agreeing to the license agreement and thus, archive will have the wrong MD5 Checksum:
    • MD5 (AMD-APP-SDK-v2.9-lnx64.tgz) = 649b53fccfa8262de835d554fdd56dfc
  • However, if you download it properly from the website, the checksum will be:
    • MD5 (AMD-APP-SDK-v2.9-lnx64 (1).tgz) = 24ca89856d41aa82dea8370b7a24fb4e

AMD lists the correct checksums on this page.

So, in order to download it using a script, you will most likely have to upload the correctly downloaded archive somewhere else. However, this may be against the License Agreement, I'm not sure. I copied AMD's license agreement to this gist if you'd like to take a look.

You can refer to this answer for how to check the md5sum. Copied from the answer:

for MD5 and SHA1 you can do

md5sum (file name)

for md5sum and

sha1sum (file name)

sbolel
  • 370
  • 1
    The problem is not that the file's checksum is wrong, but that it is altogether the wrong file. The checksum is an indication of this--if both files were the same, they would of course have the same checksum too--but it is not itself the underlying problem. Sometimes an operation fails because a checksum is wrong, but that's not happening here: gzip: stdin: not in gzip format means it's not a gzipped file at all, not that checksum verification (which tar and gz do not actually perform) failed. Besides that, though, this is a correct answer. – Eliah Kagan Apr 29 '15 at 19:01
  • Thank you for that clarification! I'll edit the answer to reflect this info. – sbolel Apr 29 '15 at 19:05
  • 1
    This is what I suspected but I am admittedly disappointed. I will need to read the agreement carefully to see if I can just upload it elsewhere for my script to work properly. Thanks – cdeterman Apr 29 '15 at 19:18
0

The right answer is actually in the error message: not in gzip format. So If you just remove 'z' form -zxvf it should work. Like this:

tar -xvf AMD-APP-SDK-v2.9-lnx64.tgz