Lha bails out with CRC error on unpacking
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 273 from 2014/6/11
    From: Germany
    Hi.

    I have a lha archive. Packaged on macOS with Lha v1.14i.
    On AmigaOS 3 I can unpack the archive just fine with Lha 2.15.
    On MorphOS, with Lha 2.7.12, it starts unpacking but some file sooner or later produces a CRC error.

    What might be the problem there?
    Are there any cmd line options I could try?


    Manfred
  • »25.04.17 - 15:24
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Intuition
    Posts: 888 from 2013/5/24
    From: Englistan
    Quote:

    asrael22 wrote:
    Hi.

    I have a lha archive. Packaged on macOS with Lha v1.14i.
    On AmigaOS 3 I can unpack the archive just fine with Lha 2.15.
    On MorphOS, with Lha 2.7.12, it starts unpacking but some file sooner or later produces a CRC error.

    What might be the problem there?
    Are there any cmd line options I could try?


    Manfred


    Have you tried using the 68k lha 2.15 on MorphOS?
    1.67GHz 15" PowerBook G4, 1GB RAM, 128MB Radeon 9700M Pro, 64GB SSD, MorphOS 3.9

    2.7GHz DP G5, 4GB RAM, 512MB Radeon X1950 Pro, OSX 10.5.8, 500GB SSHD, MorphOS 3.9
  • »25.04.17 - 16:51
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 273 from 2014/6/11
    From: Germany
    No. What are you implying?


    Manfred
  • »25.04.17 - 18:07
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Tom01
    Posts: 135 from 2009/9/20
    lha 1.14i is available for MorphOS.
    Try that Version.
  • »25.04.17 - 18:22
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 273 from 2014/6/11
    From: Germany
    I can try all that. But why the heck is the version shipped with MorphOS not able to unpack this?


    Manfred
  • »25.04.17 - 19:02
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Tom01
    Posts: 135 from 2009/9/20
    Because the MorphOS-Lha does not support all Header and Compression Methods of lha-1.14i.
    Use "lha-1.14i ao6 archive files" to create a compatible archive.

    [ Edited by Tom01 25.04.2017 - 21:32 ]
  • »25.04.17 - 19:25
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 273 from 2014/6/11
    From: Germany
    OK, but why does m68k Lha 2.15 unpack this but not 2.7.12?
    Is 2.7.12 an older version than AmigaOS 3 m68k 2.15?
  • »25.04.17 - 19:32
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Tom01
    Posts: 135 from 2009/9/20
    Because the m68k Lha 2.15 different to MorphOS 2.7.12.
  • »25.04.17 - 19:36
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 273 from 2014/6/11
    From: Germany
    Alright. Let me see...
    I think this is quite a bit annoying. AROS (Icaros 2.1.3) with lha 1.00 can unpack the stuff, AmigaOS 3 with lha 2.15 can unpack the stuff. But MorphOS cannot unpack the stuff.
    Why is MorphOS lha so much different than the other lha's?
  • »25.04.17 - 20:01
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Intuition
    Posts: 888 from 2013/5/24
    From: Englistan
    Quote:

    asrael22 wrote:
    No. What are you implying?



    That the version of lha that congress with MorphOS is incompatible with archives the Mac version creates. MorphOS itself is however compatible with many 68k binaries and you previously stated that the 68k version is compatible with the archives the Mac version creates.

    From there it's not a great leap of logic to suggest trying the 68k binary is it?
    1.67GHz 15" PowerBook G4, 1GB RAM, 128MB Radeon 9700M Pro, 64GB SSD, MorphOS 3.9

    2.7GHz DP G5, 4GB RAM, 512MB Radeon X1950 Pro, OSX 10.5.8, 500GB SSHD, MorphOS 3.9
  • »26.04.17 - 11:35
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 273 from 2014/6/11
    From: Germany
    Quote:

    Intuition wrote:
    Quote:

    asrael22 wrote:
    No. What are you implying?



    That the version of lha that congress with MorphOS is incompatible with archives the Mac version creates. MorphOS itself is however compatible with many 68k binaries and you previously stated that the 68k version is compatible with the archives the Mac version creates.

    From there it's not a great leap of logic to suggest trying the 68k binary is it?


    I don't want to use a 68k binary for unpacking an lha archive on MorphOS.
    Nor would I want to go and download something that can do such a fundamentally important task as unpacking a LHA archive.
    Even if is has been created on a different system.
    Why not package up an LHA version into MorphOS that works.


    Manfred

    [ Edited by asrael22 26.04.2017 - 14:31 ]
  • »26.04.17 - 12:18
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Intuition
    Posts: 888 from 2013/5/24
    From: Englistan
    Quote:

    asrael22 wrote:
    Quote:

    Intuition wrote:
    Quote:

    asrael22 wrote:
    No. What are you implying?



    That the version of lha that congress with MorphOS is incompatible with archives the Mac version creates. MorphOS itself is however compatible with many 68k binaries and you previously stated that the 68k version is compatible with the archives the Mac version creates.

    From there it's not a great leap of logic to suggest trying the 68k binary is it?


    I don't want to use a 68k binary for unpacking an lha archive on MorphOS.
    Nor would I want to go and download something that can do such a fundamentally important task as unpacking a LHA archive.
    Even if is has been created on a different system.
    Why not package up an LHA version into MorphOS that works.


    Manfred


    In gave you a solution that solves your problem, up to you if you'd rather just whine about it.
    1.67GHz 15" PowerBook G4, 1GB RAM, 128MB Radeon 9700M Pro, 64GB SSD, MorphOS 3.9

    2.7GHz DP G5, 4GB RAM, 512MB Radeon X1950 Pro, OSX 10.5.8, 500GB SSHD, MorphOS 3.9
  • »26.04.17 - 15:52
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    connor
    Posts: 469 from 2007/7/29
    Quote:

    asrael22 wrote:
    I can try all that. But why the heck is the version shipped with MorphOS not able to unpack this?


    Manfred


    Maybe because lha on different platforms was continued by different people. The programs have the same name but not always the same features or bugfixes. Also your version on OSX is verys old (lha 1.14). But it seems there is no newer one.
    Maybe you can give your archive to the MOS team and they can have a look if our lha can be fixed or if your OSX lha needs a fix instead.

    Quote:

    asrael22 wrote:
    OK, but why does m68k Lha 2.15 unpack this but not 2.7.12?
    Is 2.7.12 an older version than AmigaOS 3 m68k 2.15?



    Yes. 7 is smaller than 15, so 2.7.12 is older than 2.15.


    Quote:

    asrael22 wrote:

    I don't want to use a 68k binary for unpacking an lha archive on MorphOS.
    Nor would I want to go and download something that can do such a fundamentally important task as unpacking a LHA archive.
    Even if is has been created on a different system.
    Why not package up an LHA version into MorphOS that works.


    Manfred


    LHA of MOS works very well with tens of thousands of archives. I wouldn't say it does not work. You just use one at least 13 year old version on a never well supported platform that can create an incompatible archive.
  • »26.04.17 - 16:42
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 273 from 2014/6/11
    From: Germany
    Quote:

    connor wrote:
    Quote:

    asrael22 wrote:
    I can try all that. But why the heck is the version shipped with MorphOS not able to unpack this?


    Manfred


    Maybe because lha on different platforms was continued by different people. The programs have the same name but not always the same features or bugfixes. Also your version on OSX is verys old (lha 1.14). But it seems there is no newer one.
    Maybe you can give your archive to the MOS team and they can have a look if our lha can be fixed or if your OSX lha needs a fix instead.

    Quote:

    asrael22 wrote:
    OK, but why does m68k Lha 2.15 unpack this but not 2.7.12?
    Is 2.7.12 an older version than AmigaOS 3 m68k 2.15?



    Yes. 7 is smaller than 15, so 2.7.12 is older than 2.15.


    Quote:

    asrael22 wrote:

    I don't want to use a 68k binary for unpacking an lha archive on MorphOS.
    Nor would I want to go and download something that can do such a fundamentally important task as unpacking a LHA archive.
    Even if is has been created on a different system.
    Why not package up an LHA version into MorphOS that works.


    Manfred


    LHA of MOS works very well with tens of thousands of archives. I wouldn't say it does not work. You just use one at least 13 year old version on a never well supported platform that can create an incompatible archive.


    The solution is simple.
    Just include a PPC build of 2.15 into MorphOS.

    Manfred
  • »26.04.17 - 17:17
    Profile
  • MorphOS Developer
    Piru
    Posts: 374 from 2003/2/24
    From: finland, the l...
    EDIT: The actual issue here was the incompatibility between UNIX and Amiga LhA. See post here.


    Quote:

    What might be the problem there?

    MorphOS LhA doesn't currently support "lh7" compression method (which is the default of unix LhA).
    Quote:

    Are there any cmd line options I could try?

    If you wish to use MorphOS LhA to decompress the archives, you can -o6 option with UNIX LhA to force the use of the supported compression method "lh6".

    For example:
    lha ao6 mystuff.lha mystuff


    [ Edited by Piru 27.04.2017 - 22:45 ]
  • »26.04.17 - 17:48
    Profile
  • MorphOS Developer
    Piru
    Posts: 374 from 2003/2/24
    From: finland, the l...
    Quote:

    The solution is simple.

    I'm afraid it is not.
    Quote:

    Just include a PPC build of 2.15 into MorphOS.

    For some reason Amiga LhA is not open source.

    Anyway Amiga LhA has some issues. It doesn't handle large files and archive sizes for example. Just try using >4GB archive with LhA 2.15 and see it fail miserably.

    [ Edited by Piru 26.04.2017 - 20:57 ]
  • »26.04.17 - 17:49
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 273 from 2014/6/11
    From: Germany
    Quote:

    Piru wrote:
    Quote:

    The solution is simple.

    I'm afraid it is not.
    Quote:

    Just include a PPC build of 2.15 into MorphOS.

    For some reason Amiga LhA is not open source.


    Uhm. That's unfortunate.
    What about the LHA Unix version? Couldn't that be used instead? AROS seems to use it, too.

    Alright, the lh7 compression it is which makes the incompatibility.
    But I'm wondering why some files can be uncompressed. But at certain files there is this CRC error.


    Manfred
  • »26.04.17 - 18:18
    Profile
  • MorphOS Developer
    Piru
    Posts: 374 from 2003/2/24
    From: finland, the l...
    Quote:

    asrael22 wrote:
    What about the LHA Unix version? Couldn't that be used instead?

    No, it lacks support for amiga attributes and comments, among other things.

    Quote:

    AROS seems to use it, too.

    And thus AROS has a problem where their LhA doesn't support amiga attributes and comments.

    Quote:

    But I'm wondering why some files can be uncompressed.

    No lh7 compressed files can be decompressed. The MorphOS LhA doesn't even try.
  • »26.04.17 - 18:37
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 273 from 2014/6/11
    From: Germany
    Quote:

    Piru wrote:
    Quote:

    asrael22 wrote:
    What about the LHA Unix version? Couldn't that be used instead?

    No, it lacks support for amiga attributes and comments, among other things.


    OK, that's a point.

    Quote:

    Piru wrote:
    Quote:

    But I'm wondering why some files can be uncompressed.

    No lh7 compressed files can be decompressed. The MorphOS LhA doesn't even try.



    I don't understand.
    I have created an archive on macOS with LHA 1.14i. If it compresses files with lh7 as default, then MorphOS shouldn't be able to uncompress any of the files?
    But it does. Some files are uncompressed, like 20 or 30, don't know exactly.
    Then it stops with error, always at the same file.


    Manfred
  • »26.04.17 - 19:03
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 9331 from 2003/5/22
    From: Germany
    > 2.7.12 is older than 2.15.

    Code:
    > version c:lha full
    LhA 2.7.12 (26.07.13)

    Code:
    > version ram:lha_68k full
    LhA 2.15 68000+ Jan 3 2011

    ;-)

    > one at least 13 year old version

    "Latest commit [...] on Oct 15, 2016"
    https://github.com/jca02266/lha

    That's still version 1.14i as far as I can see.

    > on a never well supported platform

    LHa for UNIX not supporting macOS well? :-)
  • »26.04.17 - 19:38
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 273 from 2014/6/11
    From: Germany
    Quote:

    Intuition wrote:
    In gave you a solution that solves your problem, up to you if you'd rather just whine about it.



    Yes, you gave me a solution. Thanks for that.
    If I whine, then not because I'm unable to uncompress this archive.
    But for a negative user experience of MorphOS.
    I whine because I'd like that fixed in future versions of MorphOS.


    Manfred

    [ Edited by asrael22 26.04.2017 - 22:22 ]
  • »26.04.17 - 20:18
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 9331 from 2003/5/22
    From: Germany
    > I have created an archive on macOS with LHA 1.14i. If it compresses files with lh7 as
    > default, then MorphOS shouldn't be able to uncompress any of the files? But it does.
    > Some files are uncompressed [...]. Then it stops with error, always at the same file.

    The 6th byte of the archive tells the compression method used.


    Edit: That's not quite correct. The 6th byte of the archive tells the compression method used for the first object in the archive. Each object in the archive is preceded by such an indicator as different objects may have been processed using different methods.

    [ Edited by Andreas_Wolf 27.04.2017 - 10:03 ]
  • »26.04.17 - 20:29
    Profile
  • MorphOS Developer
    Piru
    Posts: 374 from 2003/2/24
    From: finland, the l...
    Quote:

    asrael22 wrote:
    Quote:

    Piru wrote:
    Quote:

    But I'm wondering why some files can be uncompressed.

    No lh7 compressed files can be decompressed. The MorphOS LhA doesn't even try.



    I don't understand.

    I have created an archive on macOS with LHA 1.14i. If it compresses files with lh7 as default, then MorphOS shouldn't be able to uncompress any of the files?


    There is no code there to decompress lh7.

    Maybe you're confused by for example directories and such being created (directories obviously are not compressed), or empty or very small files being there included without compression (lh0).
  • »26.04.17 - 22:58
    Profile