Well 3 to be precise. For the last couple of months I’ve been involved in a cross platform development project; Win32, Linux and Solaris. Mmm well to be more precise, then 2½, since Solaris is Sun’s version’ish of Linux. Now I’m not a *nix bloke, I’m a Win32 kinda guy, but my client figured he could throw this one at me anyway….so he did. But I figured it couldn’t be that hard, could it? stick to ANSI C, C++ standards, rely on the STL and BOOST?And I was right sort of. My strategy went thusly;
- Do the bulk of the development and unit testing on Win32 with all the XP, VS 2003 wizz bangs
- Port over to my Linux box with all the SUSE Linux, KDE, KDevelop wizz bangs to complete unit testing
- Port over to a development Solaris machine for final compilation on the Sparc architecture, check the tread, kick the tyres etc
- Copy binary over to production Solaris machine
Up to point 2 all went very nicely thanks. Managed to port over to the Solaris dev machine ok, but wait, this dev machine doesn’t have the GNU C++ compiler system on (I had specified this during project scoping), even worse for some reason we’re not allowed to install any development GUI’s. Crickey thinks I, looks like I’m going to have to resort to good old fashioned make files then, and it looks my fingers are in for some exercise, in a way that only *nix can exercise them.
The devmachine I’ve been assigned only comes with SUN’s C++ compiler called Forte. Well I’m game for anything me, so off I trot and try to get the app to compile using Forte. No joy. It starts choking on my template notation. Now I’d stuck to the C99 standards for template notation, it compiles with both GNU and MSVC but alas not with Forte. Try as I might I could not get it to work, even after trawling the depths of the internet newsgroups using google. Finally I give up, declare Forte a bag of shite and consign it to Dante’s 8th ring.
I tell my boss this, he smiles and says he’ll try and get someone in the organisation to install GCC on the dev machine. Anyway, he pulls in a favour from “some guy” who manages to get a sparc version of GCC installed on the machine. Great I’m in business at last, I port over the GCC make file for the project, to replace the hacked Forte version, fire up make, and viola – we have a bona fide Solaris binary.
Mouth drolling a white frothy substance I port over to the production machine, fire up the app, it works and we’re done.
Except not quite. The project sponsor walks over to discuss how the the input files should be processed by the app, and of course it’s now changed from when we first discussed this at scoping. Well I smile, say no problem and resign myself to very quickly learning some bash scripting. Now I knew from the outset that probaly write bash script to run the app and do some simple file manipulation, since the process was going to be run periodically using CRON. But this was leagues away from what I’d envisioned.
Still, nose to the grindstone, I spew out some bash script port to the production machine to perform final testing and to setup the CRON table entry. But as is always the case, there’s some minor nigglies to put right. Fed up with FTP’ing constantly, I decide to develop in place on the production machine – but yes of course there’s no editor, I whimper and do something I hoped I’d never have to do – yes I fire up VI and attempt to do some editing.
After much grunting and mental heavy lifting I have to say I finish my script changes, edit the CRON table and yes now I really am done.
What strikes me about this though is how coddled we’ve become in the nice warm cosy Win32 environment, I’ve never done so much typing at command lines since my DOS days back in the late 80’s – still at least my fingers are now pretty buffed.
Even that though is probably a consequence of the production Solaris system being pretty stripped down (for security reasons – it’s a very security sensitive machine), since doing dev work on my Linux box is pretty nice, with almost as much bells and whistles as XP.
Anyway, I’m still pretty happy since I learned lots of new stuff about *nix and there’s lots of new skills to add to my CV