> On Fri, 18 Jan 2002, Kittendorf, Craig wrote:
> > Has anyone ported applications from AIX (RS6000) to Linux?  If so, can you
> > give an idea of what applications, what's involved, difficulty, etc.?
>
>         Maybe a little off topic for this list...
?
>         The answer is, of course, "it depends".   ...

        An accurate assessment, there.

>         If it's a compiled app AND you have source and equivalent
> libraries it is likewise fairly straightforward.  I've run into a few
> gotchas with some socket program incompatabilities (AIX has some magic for
> more efficient low level socket calls) but most likely for a
> business type application program it's going to recompile and run.

        I'm assuming you're talking about a C (or even C++) coded
        application that you have full source code for.  If it's an
        app in an interpreted language, well, a lot depends if the
        interpreter is available.

        A long time ago I dealt with portation issues for a fairly hefty
        Business BASIC interpreter (Thoroughbred's Business BASIC, in
        case anyone is wondering) so portation is something that one
        needs to build in to an application- from the beginning.  T/B/B
        had to deal with binary file structures in a portable fashion
        (the DIRECT files had to be transportable too, so we had to pay
        lots of attention to byte sex... uh, it's call "endianness" these
        days, sorry) especially since the BASIC programs themselves were
        binary objects.  (Blatant Plug:  John-L had 2 rules,  to wit:
        1: All older BASIC programs MUST work the same way in newer
        interpreters;  2: Pay attention to Rule 1.  What this meant was
        that the interpreter portation teams did all of the work;  All
        applications work the same regardless of platform.)

        So, beyond how I/O hoses memory and makes byte order important
        (and it's impact if you're not dealing with text files) you need
        to pay attention to:

           1)   ioctl() structures.  These vary from system to system.
                A lot.  I mean a WHOLE lot.  AIX's structures are fairly
                robust but they're funky if you were used to SCO or
                Solaris.  Linux has some nice analogues to the termio
                structure so you'll only lose 10-15% of your hair, not
                70% or more.

           2)   include files.  No two systems (it seems) has the same
                objects in the same include file and the inclusion order
                varies.

           3)   #ifdefs.  Plenty of them.  You'll need 'em.  I mean it.
                I suggest using "#if defined(AIX)..." instead so that other
                platforms can be hooked in.

        Granted, once you've ported an application to Linux (can be on a
        PC, etc) the puppy will compile elsewhere-  though, even with
        Linux, you need to pay attention to byte ordering.  Once it's
        been ported to a PC running Linux, it'll compile quite directly
        on a pSeries, iSeries or zSeries platform.  Heck, AIX 5L has taken
        on "Linux Affinity" which means that it presents the Linux API-
        though whether the filesystem trees are faked or not I don't
        yet know.

--
 John R. Campbell           Speaker to Machines                 [EMAIL PROTECTED]
 - As a SysAdmin, yes, I CAN read your e-mail, but I DON'T get that bored!
   Disclaimer:  All opinions expressed above are those of John R. Campbell
                alone and are seriously unlikely to reflect the opinions of
                his employer(s) or lackeys thereof.  Anyone who says
                differently is itching for a fight!

Reply via email to