UNIX apps on CYGWIN


 
Thread Tools Search this Thread
Operating Systems HP-UX UNIX apps on CYGWIN
# 8  
Old 03-23-2013
i had read somewhere and also in cygmin (under "what isn't")..that native compiled executeables in linux can't be run under cygwin...they need to be recompiled under cygwin to operate..it is true?

so if i have natively compiled program (in unix), can i still literally port to cygwin and run it? thanks Smilie

---------- Post updated at 01:36 AM ---------- Previous update was at 01:22 AM ----------

Quote:
Originally Posted by lchunleo
i had read somewhere and also in cygmin (under "what isn't")..that native compiled executeables in linux can't be run under cygwin...they need to be recompiled under cygwin to operate..it is true?

so if i have natively compiled program (in unix), can i still literally port to cygwin and run it? thanks Smilie

i think i have found my ans, no binary executeable compiled in unix environment can be ported and run in cygwin..
# 9  
Old 03-23-2013
Quote:
Originally Posted by lchunleo
i had read somewhere and also in cygmin (under "what isn't")..that native compiled executeables in linux can't be run under cygwin...they need to be recompiled under cygwin to operate..it is true?
That is correct. UNIX and UNIX-like OSs such as Linux do not guarantee binary portability. You are expected to recompile the application source code for each target platform and programming model.

Quote:
i think i have found my ans, no binary executeable compiled in unix environment can be ported and run in cygwin..
In the OS world the term "porting" has a specific meaning. It does not just mean just transfer an application binary from one platform to another - say Unix to Cygwin. It means to take the application source code, modify it as necessary and recompile it for the target platform.
# 10  
Old 03-24-2013
you are right, can i check what other tools should i explore if i wish not to perform recompilation of my unix apps but still wish to run in windows os machine with a unix emulator?

Reason being, my existing unix apps have too many imports which i don't think i would wish to spend time recompiling each of them in the cygwin. i just wish to take them and run in a windows machine..Smilie
# 11  
Old 03-24-2013
I'm pretty sure your HP UX applications will NOT run on any other platform, be it Linux, Cygwin, or other unices, without porting, which implies adaption and recompilation of every single module.
# 12  
Old 03-24-2013
Quote:
Originally Posted by lchunleo
Reason being, my existing unix apps have too many imports which i don't think i would wish to spend time recompiling each of them in the cygwin. i just wish to take them and run in a windows machine..Smilie
Not possible for HP-UX binaries.
# 13  
Old 03-24-2013
HI.

My understandings: if the user has a recent HP box, then it has an Itanium CPU, whereas older HP boxes use PARISC. Neither of the binaries that run on those can be run directly on an Intel box. Cygwin runs on MS/Windows, Windows only runs on Intel CPUs (no more Alpha, no more MIPS).

I think there are some solutions for "just moving the binaries over", but on a non-HP box, say an Intel Linux machine, first one would need to emulate PARISC or Itanium instructions. Then install HP-UX, then move the applications over. Or do the same on an MS/Windows box -- get a PARISC or Itanium emulator running on Windows, install HP-UX, etc., etc.

I think it would be much easier to re-compile the code. I don't know what "existing unix apps have too many imports" means.

The Cygwin that I use definitely has the tools to re-compile code:
Code:
$ version =o gcc g++ g77 make
OS, ker|rel, machine: CYGWIN_NT-6.1, 1.7.17(0.262/5/3), i686
gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
g++ (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
g77 GNU Fortran (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
make GNU Make 3.82.90

For example:
Code:
$ make t
cc     t.c   -o t
$ ./t
Hello, world from c.


To show what happens when an HP-UX binary attempts to run on an Intel Linux box, I copied /sbin/ls from an HP box to a Linux workstation. Then I did an ls on both files (and validating the Linux binary -- it produced output):
Code:
% /bin/ls -gGl /bin/ls hpux-ls 
-rwxr-xr-x 1 101992 Apr  4  2008 /bin/ls
-rwxr-xr-x 1 286720 Mar 24 14:47 hpux-ls

then I identified both applications:
Code:
% file /bin/ls hpux-ls 
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped
hpux-ls: PA-RISC1.1 shared executable

and then I tried to run the HP application:
Code:
% ./hpux-ls 
./hpux-ls: Exec format error. Binary file not executable.

so we have permission to run it, but the format is not understandable.

To learn more about the hardware aspect, see:
Central processing unit - Wikipedia, the free encyclopedia
Instruction set - Wikipedia, the free encyclopedia
PA-RISC - Wikipedia, the free encyclopedia
Itanium - Wikipedia, the free encyclopedia
others have already commented on the OS aspects.

Good luck and best wishes ... cheers, drl

( edit 1: corrected spelling )

Last edited by drl; 03-27-2013 at 04:56 PM..
# 14  
Old 04-04-2013
i realized that there is this "Wine" which can help to run Unix Apps. anyone had tried and can advised which package to down for HP UNIX? thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How can I rebuild applications that developed in UNIX? I need to use it in windows os with cygwin

I need to rebuild an application that developed in unix environment and run in windows OS with cygwin. so How can I rebuild from the source code? is there any one who said something on this regard? (2 Replies)
Discussion started by: bejirond
2 Replies

2. UNIX and Linux Applications

New Guy looking for a place to start for UNIX Server and n-tier apps

:o no longer need this. (0 Replies)
Discussion started by: tokposman
0 Replies

3. UNIX for Dummies Questions & Answers

Unix Emulator Cygwin

Hi, I installed unix emulator cygwin, it does not allow me to open vi editor. Can anybody know if cygwin supports vi. if not can somebody please refer a good emulator. (5 Replies)
Discussion started by: siquadri
5 Replies

4. Shell Programming and Scripting

using alias in cygwin unix

i have a cygwin unix and i would like to use alias to save a cd command.. however i lose this alias when i close out cygwin and log back in.. is there any way to save this command so that i can use it every time i log in? i am using cygwin on windows xp. thanks. (1 Reply)
Discussion started by: npatwardhan
1 Replies

5. Programming

How to complie a c++ program in Unix or Cygwin?

Can I use gcc to compile a piece of c++ code? Do I need to name the file that contains the code as .cpp? Thank you (14 Replies)
Discussion started by: meili100
14 Replies

6. UNIX for Dummies Questions & Answers

Can you use linux apps on unix

I know its a stupid question... but i cant find anyone that will host on linux for the prices i want. I want to host a game server (2 Replies)
Discussion started by: sLaeYa^^
2 Replies

7. Windows & DOS: Issues & Discussions

Basic Unix Commands for cygwin

Hi. I'm New user for this Forum.Presently i'm working with Cygwin I want to know the basic commands that will be used for Cygwin. Can anyone guide me on this regards Thanks & Regards Sanjay (0 Replies)
Discussion started by: sanjay.karthik
0 Replies

8. UNIX for Dummies Questions & Answers

launching OSX apps in UNIX

How do you launch an OSX app in UNIX? -Mad (3 Replies)
Discussion started by: madknowledge
3 Replies

9. UNIX for Dummies Questions & Answers

3d graphics apps for unix/solaris

Hi, I noticed that SUN is selling the Blade 100 workstation for < 1000. I am considering buying one with a high end graphics card for 3D animation/graphics (and also some java development). I am wondering if any relatively inexpensive graphics applications exist for Unix/Solaris machines. Anybody... (4 Replies)
Discussion started by: eqpfunk
4 Replies
Login or Register to Ask a Question