KhronosGroup / OpenVX-Registry

OpenVX API and Extension Registry.
https://www.khronos.org/registry/OpenVX/
45 stars 23 forks source link

Corrupted OpenVX extensions header? #8

Closed luca-piccioni closed 6 years ago

luca-piccioni commented 6 years ago

I'm sorry to open an issue about this, but I'm not able to extract the tar archive compressed in the file openvx-extension-headers-1.2.tar.bz2.

I'm using 7zip on Windows, and I'm able to extract all other compressed archives.

oddhack commented 6 years ago

The file is not corrupted AFAICT. It is a tar file compressed using the bzip2 algorithm, and can be extracted using Linux tar via e.g. "tar xjf openvx-extension-headers-1.2.tar.bz2". The www.7-zip.org page indicates it supports bzip2 format, but I don't know anything about the program beyond that. Perhaps it's a question of how you're using 7zip?

luca-piccioni commented 6 years ago

Here is the log of the 7zip. Tomorrow I'll check on a Linux box with the standard tar command line.

C:\Users\Luca\Downloads>"C:\Program Files\7-Zip\7z.exe" e openvx-extension-headers-1.2.tar.bz2

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21

Scanning the drive for archives:
1 file, 16887 bytes (17 KiB)

Extracting archive: openvx-extension-headers-1.2.tar.bz2
--
Path = openvx-extension-headers-1.2.tar.bz2
Type = bzip2

Everything is Ok

Size:       102400
Compressed: 16887

C:\Users\Luca\Downloads>"C:\Program Files\7-Zip\7z.exe" e openvx-extension-headers-1.2.tar

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21

Scanning the drive for archives:
1 file, 102400 bytes (100 KiB)

Extracting archive: openvx-extension-headers-1.2.tar
ERROR: openvx-extension-headers-1.2.tar
openvx-extension-headers-1.2.tar
**Open ERROR: Can not open the file as [tar] archive**

ERRORS:
**Is not archive**

Can't open as archive: 1
Files: 0
Size:       0
Compressed: 0
luca-piccioni commented 6 years ago

No problem using tar under GNU/Linux. I wonder what's the difference with the other archives.

fzbrill commented 6 years ago

The issue isn't with the bzip compression; it seems to be with the options on tar itself. 7zip can unzip to file to a tar file, but then can't extract from the tar. I could extract on Linux just fine. 7zip says it's not a proper tar file and gives up. WinRAR recognizes it as a tar file and shows the directory, but when you try to extract the file, it says "Unknown method" and "sparse file is not supported." It is annoying not to be able to extract the header files with the most popular Windows tools. I will file an issue with the group.

oddhack commented 6 years ago

I just downloaded 7-Zip 16.04 [64-bit] on Windows 10 and successfully used the GUI to load and extract all the headers from this file. That's the extent of my knowledge about the program but it seemed to do what it was supposed to without fuss, so the problem may lie elsewhere. I think there's also a command-line version of the app and I didn't try that.

oddhack commented 6 years ago

@fzbrill considering that the spec PDF is about 30x the size of the tarballs, perhaps non-compressed tar files could be posted instead? Even on a 1 mbit DSL connection it shouldn't take more than 4 seconds to download the largest uncompressed header tarball.

fzbrill commented 6 years ago

Yes, we could post uncompressed files, although I don't think it would help in this case. It doesn't seem to be the compression that's the problem, but the tar itself. 7zip uncompresses the .tar.bz2 to a .tar without complaining. But then it fails when trying to unpack the tar. I suppose it could be that 7zip makes an error in the decompression, but WinRAR also has a similar problem.

At any rate, we're going to update the packages when we release the adopter's program, hopefully next week. The alpha packages are in the member docs area at the link below, and they decompress and untar with 7zip just fine.

https://www.khronos.org/members/login/groups/OpenVX/Spec1.2-Progress/Spec_Update_October_2017/Packages

tlepley commented 6 years ago

Header packages are small, but Conformance tests and Sample implementation packages are larger. Like fzbrill told, the new packages that we are about to release seem to work fine with 7zip under windows.