LHA-PMA2

by snout on 08-02-2006, 00:32
Topic: MSX Related
Languages:

Adriano released a static binary LHA tool for Linux that also can extract PMA files. Basically, this utility is the LHA-mod made by Maarten ter Huurne, but as this version is a static binary it does not need installation or compilation. Furthermore, this version does not require any hard-to-find dependancies. LHA-PMA2 can be downloaded from the MSX software section of Adriano's website

Relevant link: Adriano's website

Comments (12)

By mth

Champion (484)

mth's picture

08-02-2006, 01:19

Hard-to-find dependencies, such as libc Question

Being able to download a binary is useful, because you don't have to install GCC and Make. But LHA-PMA does not have any dependencies besides the bare minimum you need to compile anything at all, so I don't understand that comment.

By the way, could you correct the spelling of my name? (it's "ter")

By mth

Champion (484)

mth's picture

08-02-2006, 01:21

Forum software bug: Why does a penguin appear if you type a double quote followed by a close brace?

By adrcunha

Expert (117)

adrcunha's picture

08-02-2006, 02:19

Indeed, Maarten, LHA-PMA2 doesn't have any special dependencies, but sometimes you just need a binary PMA extractor on a Linux system and you simply can't build it from source. Or the user gets stuck when trying to compile LHA-PMA2 with GCC4 and getting a long list of errors (you know your mod compiles cleanly on GCC2.95). Or, yet, the user compiles LHA-PMA2 and, when trying to run it on a different machine, gets an error message stating that the installed LIBC version is lower than expected. Not to mention the users who aren't familiar with compiling/installing applications from command line (yes, GUI-only Linux users exist nowadays).

PS: Snout, would you mind changing my site's URL to "http://www.alsoftware.com.br/adrianpage", please? The main page is just an empty one, so people may get confused about it.

By Manuel

Ascended (15821)

Manuel's picture

08-02-2006, 10:18

I agree that the 'hard to find dependencies' and 'installation' is a bit nonsense. There are no hard to find dependencies and there is no installation.

It's indeed tricky to compile the lha-pma mod on modern gcc compilers. Maarten: is it possible to post the modification upstream, so that it becomes available in all distributions?

By snout

Ascended (15187)

snout's picture

08-02-2006, 11:49

Adriano sent me an email on the news, I think he explained in his reaction that the 'dependancies' should not be taken as literally as 'library dependancies' well enough. I don't like to break the news to you, but to 99.99% of the world, Linux (commandline) and especially compiling in Linux is not a user-friendly environment Wink.

By Manuel

Ascended (15821)

Manuel's picture

08-02-2006, 16:23

I already said that compiling was tricky.... The rest is not, however.

By boukichi

Resident (33)

boukichi's picture

08-02-2006, 19:24

I just uploaded LHA-PMA for OS X ppc users Wink

http://www.emucamp.com/boukichi/prgmac.htm

at least in OS X I could compile it by gcc4 without any change.

I don't know it has been forking or depending on some Linux enviorment.

By boukichi

Resident (33)

boukichi's picture

08-02-2006, 19:28

http://www.emucamp.com/boukichi/prgmac.html
sorry,last letter "l" was lacked.

By mth

Champion (484)

mth's picture

09-02-2006, 01:06

Adriano and Sander: You are right that compiling even something relatively simple as LHA can be intimidating to new Linux users. I was just confused about the word "dependencies", which typically means the other software packages a program needs to have installed in order to run.

Adriano: It does compile with errors on GCC 4, but not without warnings, which is probably what you meant. It's quite possible those warnings are also present on GCC 2.95: before releasing LHA-PMA, I only fixed the warnings in the code I added, not the ones already present in LHA. And even with GCC 4, the "pm2" files do not cause any warnings, but the other files do.

Manuel: Is LHA still maintained? Because it only makes sense to send patches upstream if there actually is an active upstream. I think it would be great if PMA support would be integrated in the original LHA. I should ask permission from Alwin Henseler as well though, because I took his UnPMA for MSX assembly code as a starting point (as explained in README.PMA).

By Manuel

Ascended (15821)

Manuel's picture

09-02-2006, 09:15

Maarten: I don't know exactly, but you could try to post it to the Debian maintainer of it, via a wishlisht bug with a patch attached. If he does his maintainer-job well, he will contact upstream to submit the patch. It's not a direct way, but better than nothing...

Here is the Debian page of it: http://packages.qa.debian.org/l/lha.html

By mth

Champion (484)

mth's picture

09-02-2006, 19:32

Manuel: Since the patch is not Debian specific, I don't think it's fair if I claim the Debian maintainer's time for this. Besides, I don't even run Debian on my desktop, which is where I use LHA-PMA.

By adrcunha

Expert (117)

adrcunha's picture

09-02-2006, 20:14

Maarten,

You're absolutely right about the meaning the word "dependencies" has for an experienced Linux user. What I was trying to state is "you don't need anything else to run this tool - no worries about Linux distro, libraries version, compiler type, compiler version, kernel version, or anything else", so I though that such word would not sound so strong for MRC visitors. Well, now I see I forgot to consider the "power" visitors. Smile
About GCC compilation: yes, I wrote it wrong, it's "warnings", not "errors", and the warnings really aren't caused by "pm2" files, but by other files, as you wrote. But the number of warnings is smaller when using GCC3 or GCC2.95. For a clean compilation under GCC3 I had to add "#include <errno.h>" to lharc.h and replace "mktemp" by "mkstemp" in lharc.c. For a clean compilation under GCC4 I also had to add "#include <string.h>" to lharc.h, add "#include <string.h>" to larc.c and cast the first parameter of calc_sum to a char* in util.c, line 192. It's very simple, I know, but not for users not experienced with C programming.

Regards,

Adriano