pne: A picture of a plush toy, halfway between a duck and a platypus, with a green body and a yellow bill and feet. (Default)
[personal profile] pne
Phew!

I wanted to get a new version of the Unix command file(1) to install locally on our workstation at work.

It was quite a job finding it, let me tell you. (The fact that "file" is a common word didn't help, either.) It's not a GNU project, so it's not on any of their servers. It popped up in a couple of distributions, but as an RPM, which I can't read on a Hockey-PUX machine. I found a source archive (.tar.bz2) at a Cygnus mirror, but it required autoconf and stuff like that, which I (a) didn't have and (b) didn't want to download just for this. I found a reference on the Linux-from-scratch project but I preferred something from "the horse's mouth", as far as I could determine that.

Finally, after a bit of googling (now including a little tagline from the package description), I saw a pointer at Freshmeat which pointed to what looked like an authoritative distribution source at ftp.gw.com: http://freshmeat.net/releases/90188/ . This was also a newer release (3.39) than the ones I had previously found (typically 3.37). So, I downloaded this version.

...and it also required automake. WTF? Pretty much all software I had downloaded previously which used automake had a ready-make configure while which did all the stuff for you, so the poor chap downloading the archive doesn't have need any extra modules.

However, there was also a file called "Makefile.std" which looked like one of the good old "here, customize this Makefile to suit your system" files. So I did exactly that.

Compiling brought out a bunch of errors, mostly casts between "char *" and "unsigned char *". Hey, if you're going to mix the two, please cast explicitly, OK? (Or better still, make a design decision and use the one that is correct in a given place. Most of this was when calling private subroutines rather than C library ones.) And one warning baffled me ("casting pointer to integer") since it looked like an integer to me... but it was hidden behind a couple of layers of macros. Still, it compiled, so I ignored it (and it was in the ELF code, which I probably shan't need too often on the Hockey-PUX machine). During compiling, I also incrementally added some -DHAS_FOO macros to the Makefile as needed to prevent the header file from defining stuff my system already had.

And finally I had a brand sparkling new file! I installed it in ~/bin (and ~/etc/magic and ~/man/man[14]/*) and now am set to go. I hope :)

Noooooo! I knew it! All this work was for nothing. Argg! *tears hair out*

I thought I'd post a little addendum to this entry saying "I wonder if this utility was already available pre-compiled for HPUX systems -- nah, probably not". But then I had a look. Took a couple of searches till I had the HP-UX Porting and Archive Centre, but then, there it was -- http://hpux.asknet.de/hppd/hpux/Editors/file-3.38/ . Ready-made for easy installation into /opt/file. *sniff*

Still -- at least I have a newer version. Still, a minor consolation only. Oh, sigh. Now I'm peeved.
(will be screened)
(will be screened if not validated)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org

Profile

pne: A picture of a plush toy, halfway between a duck and a platypus, with a green body and a yellow bill and feet. (Default)
Philip Newton

June 2015

S M T W T F S
 12 3456
78910111213
14151617181920
2122232425 2627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Saturday, 10 January 2026 02:50
Powered by Dreamwidth Studios