Hello,
I'm trying to build adtools to cross-compile for AmigaOS4.1 on Linux Mint.
I have a problem extracting the "base.lha" archive contained in SDK 53.34.
The base.lha contains the following empty directories:
- Include/include_h/exec
- Include/include_h/expansion
- Include/include_h/utility
On AmigaOS4 empty directories are extracted correctly as empty directories.
On Linux Mint the lha command fails to extract the exec directory and all subsequent ones.
I tried to use 7z and it goes a little better: it manages to extract everything correctly except the empty directories which it interprets as a file of size 0 instead.
Anyone know a way to more reliably extract archives on Linux?
LHA archives on Linux
- AlfredOne
- Beta Tester
- Posts: 135
- Joined: Wed Dec 22, 2010 11:45 pm
- Location: Terlizzi (BA) , Italy
- Contact:
LHA archives on Linux
Amiga500 Kickstart1.3
AmigaONE XE G4 833MHz - 2GB RAM - Radeon9200 256MB
AmigaONE X1000 - 2GB RAM
AmigaONE XE G4 833MHz - 2GB RAM - Radeon9200 256MB
AmigaONE X1000 - 2GB RAM
- Radeon R9-280X 3GB
- Radeon HIS4670 1GB DDR3
- Radeon RX550
Re: LHA archives on Linux
Which lha command/program does linux mint use?
Have you tried lhasa?
Have you tried lhasa?
It's just for unpacking, but maybe works for yousudo apt install lhasa
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
- AlfredOne
- Beta Tester
- Posts: 135
- Joined: Wed Dec 22, 2010 11:45 pm
- Location: Terlizzi (BA) , Italy
- Contact:
Re: LHA archives on Linux
lhasa was the first tool I used and opened a bug on the github site:
https://github.com/fragglet/lhasa/issues/37
This is the answer from the author of lhasa:
"The problem is that the item that should have been a directory (type "lhd") is erroneously stored as a regular file (type "lh0"), due to a bug in whatever program created the LHA file. The item does not have a filename; it only has a directory name. Lhasa treats a file without a filename as a fatal error."
So it seems that the program used to create the AmigaOS SDK lha archive has a bug.
Note: despite the bug, on AmigaOS4 I am able to extract empty directories correctly.
https://github.com/fragglet/lhasa/issues/37
This is the answer from the author of lhasa:
"The problem is that the item that should have been a directory (type "lhd") is erroneously stored as a regular file (type "lh0"), due to a bug in whatever program created the LHA file. The item does not have a filename; it only has a directory name. Lhasa treats a file without a filename as a fatal error."
So it seems that the program used to create the AmigaOS SDK lha archive has a bug.
Note: despite the bug, on AmigaOS4 I am able to extract empty directories correctly.
Amiga500 Kickstart1.3
AmigaONE XE G4 833MHz - 2GB RAM - Radeon9200 256MB
AmigaONE X1000 - 2GB RAM
AmigaONE XE G4 833MHz - 2GB RAM - Radeon9200 256MB
AmigaONE X1000 - 2GB RAM
- Radeon R9-280X 3GB
- Radeon HIS4670 1GB DDR3
- Radeon RX550
Re: LHA archives on Linux
@AlfredOne
Try to compile a proper version of lha
That's what I am doing in my docker images for the cross-compiling environments I use.
https://github.com/walkero-gr/docker4AmigaVBCC
https://github.com/walkero-gr/AmigaGCConDocker
Try to compile a proper version of lha
Code: Select all
git clone https://github.com/jca02266/lha.git;
mkdir build;
cd lha;
autoreconf -vfi;
cd ../build;
../lha/configure --prefix=/usr;
make;
make install;
https://github.com/walkero-gr/docker4AmigaVBCC
https://github.com/walkero-gr/AmigaGCConDocker
If you develop or want to develop for AmigaOS 4.x, then join us at OS4Coding.net
Re: LHA archives on Linux
Linking this to https://github.com/sba1/adtools/issues/112. I came across the same issue.
Just for completeness.
Just for completeness.
Re: LHA archives on Linux
This would explain a lot. I have found extracting LhA files on Linux doesn't work on newer archives or archives I pack from OS4. I tend to use DOpus but they always tend to break. It looks like a crash. I open an archive and it just quits when reading it.
Doesn't matter what I try. Rarely do any LhA files fork for me in Linux. Could be -lha5- or -lha6- but Linux doesn't like them.
It's really annoying as I always want to read an LhA archive on Linux a lot.