# Which 'nix will port easiest?



## bossa nova (Jan 23, 2005)

I am trying to port something over to X.

Which flavor of nix would port the easiest?

My choices are
hpux
aix
solaris

Can anyone help here?

Thanks!
j


----------



## lurk (Jan 23, 2005)

To port from and are you using X11 or OS X?  The X is way too overloaded in this context to really know what you want.  If you can be more specific you will get a better answer.


----------



## scruffy (Jan 23, 2005)

You mean you are trying to port a program that runs on hpux, aix and solaris?  Or have I misundersood you?

If there's a version that runs on a BSD, that's probably your best bet.

If the app is properly POSIX compliant, there's a chance the efforts will be minimal, no matter what OS's are currently supported.


----------



## bossa nova (Jan 24, 2005)

Scruffy,

Remedy Corporation has an application or Client application for Windows 2000, AIX, HPUX, Soloaris. They used to have one for Mac but stopped making it when OS X came out. Basically I figure I could take one of the unix version and run it without too much trouble. The only thing that I am thinking would be different would be the directories. I may need to move some stuff.

Lurk,

Don't know if it's posix compliant. Can I assume that if it's posix compliant that it will run on OS X? I am also curious about the posix part. What exactly does it mean?

I figure with all the other stuff out there that people are saying that they are able to run without any problems that Remedy may also be transferable.

So what say ye?

gratsi!
~j


----------



## Zammy-Sam (Jan 24, 2005)

where is nixgeek?


----------



## Darkshadow (Jan 24, 2005)

Err, are you talking about getting an already built application to run, or compiling it from source?

If it's the first one, you can't.  For the second, most any source will compile on OS X, so long as you have the required libraries and stuff installed.


----------



## bossa nova (Jan 24, 2005)

Darkshadow,

So what would I need to do? What libraries and other "stuff" are we talking about?

Thanks guys (gals too if there are any).


----------



## blue&whiteman (Jan 24, 2005)

solaris would be the easiest to port since it normally runs on ppc cpu's anyway.


----------



## Darkshadow (Jan 24, 2005)

Hmm, look for a file named BUILDING or COMPILING.  Usually, source code will have one of those, and it should list dependencies.  Those are the libraries and "stuff" the code you are trying to compile depends on.


----------



## lurk (Jan 24, 2005)

Actually Solaris runs on Sparc CPUs and not PowerPCs.  

Again assuming that you have the source and the fact that it runs on both Solaris and HPUX you have a good chance of getting it to run on OSX.  The big question is how they have dealt with the differences between the existing Unix systems.  If they stuck to Posix (which is a kind of Unix standard programming interface) then given that it runs on a SysV and a BSD derivative means that all the rough edges have been knocked off and it should port fairly easily.

The problem would arise if they have not "knocked off the unportable bits" but rather have created a specialized layer of cruft for each version.  Then you are in for a world of hurt as you will need to make a specialized layer of cruft for OS X.


----------



## nixgeek (Jan 24, 2005)

Zammy-Sam said:
			
		

> where is nixgeek?



HeHEHeHeH

Unfortunately, I wouldn't be much help since I haven't done any cross compilations.  Currently, I haven't needed to, but it would be interesting to try.

Sorry...


----------



## Mephisto (Jan 24, 2005)

Do you know what compilers they use on each platform? If GCC then it does not matter which version of the code you use particularly. If not...  I would go with the AIX code but expect some work.

Is it statically or dynamically linked?  Does not make a big difference as to platform but will help gauge difficulty.  (Solaris might hold a slight edge here.)

As far as I know all 3 are posix compliant at some level or another, so this is not really a differentiating factor.  (POSIX stands for Portable Operating System Interface by the way.  It is a standard set of utilities and libraries that an OS would need to impliment to be compliant.  There is a lot more involved but that is what it means in a nutshell.)

Modern P-Series (on which AIX predominantly runs) use a Power based architecture by the way.  Power4+ and Power5 are the cores currently used in most, if not all, the line.  So overall I would suggest  starting from the AIX version, but I am biased by my own experience.


----------



## scruffy (Jan 24, 2005)

You don't have the source code to Remedy's product, do you?  Because that would be pretty impressive.

If you're going from binaries - there's really nothing much you can do.  Your best bet would be to get Virtual PC, and install Windows.  Or, if they support Solaris on x86 as well as Sparc, you could also install Solaris on Virtual PC...


----------



## Viro (Jan 25, 2005)

Would using ldd on the binaries work? That should give you the list of libraries the executable depends on and it will be a good start to knowing what libraries you need to compile first before installing the app.


----------



## blue&whiteman (Jan 27, 2005)

lurk said:
			
		

> Actually Solaris runs on Sparc CPUs and not PowerPCs.



you're right.  I meant to say RISC.


----------



## wadesworld (Jan 28, 2005)

Viro said:
			
		

> Would using ldd on the binaries work? That should give you the list of libraries the executable depends on and it will be a good start to knowing what libraries you need to compile first before installing the app.



ldd is a Linux thing (maybe others too).

On the Mac, it's "otool -L"

What others have said is correct - if you don't have all the source code to this application, it's not going to work.

Wade


----------



## bossa nova (Feb 1, 2005)

Ok, basically I don't have the source. Remedy offers the three flavors in a single download file.

What I was trying to do was attempt to install one of the builds and if necessary move anything that ended up in wacky directories to the mac's equivalent but as I am thinking about it the code would probably reference the absolute paths anyway so perhaps this was a stupid question.

I guess ya have to ask the dumb ones sometimes. Thanks for all the great responses though. Some incredible brain power on this site. I guess that is why I like it so much.


----------



## Darkshadow (Feb 2, 2005)

It's more than that - the code wouldn't run _at all_.  If it wasn't compiled on MacOS X, it's not going to work on MacOS X.  Period.

This isn't just a MacOS X thing; if you tried to run anything compiled on a different operating system than you are using, it won't run.  This actually goes the same for MacOS 9 applications - they won't run under MacOS X.  That's why the Classic environment is there.


----------



## bossa nova (Feb 19, 2005)

Thanks Darkshadow, that's what I needed to know.


----------



## Darkshadow (Feb 20, 2005)

Sure, no problem.

A little addendum to the above: if code wasn't compiled on the same processor and operating system as you are using, it won't run.  For example, something compiled on RedHat for the x86 processor won't run on RedHat for the PPC processor.  That sort of thing.


----------

