LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-23-2005, 01:44 AM   #1
jimmey
LQ Newbie
 
Registered: Jun 2005
Posts: 2

Rep: Reputation: 0
Program compatibility between solaris and Linux??


Hi!
I have a question about the program on different operation system.
I run my program on the Linux. The result is right, but in the Solaris. The result is wrong. So, is the difference between the Linux and Solaris? Where can I reference or get some information about that. Thank you!!
 
Old 06-23-2005, 02:01 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
What lang, what versions of Linux, Solaris?
If shell script, ensure using same shell by specifying
#!<pathtoreqdshellbinhere>
as first line.
If another script lang eg Perl, check #! entry for correct path.
 
Old 06-23-2005, 02:40 AM   #3
jimmey
LQ Newbie
 
Registered: Jun 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Hi, I use C language. The versions of Linux, Solaris are 6.3 debian and sparc-sun-solaris2.6
 
Old 06-23-2005, 07:26 AM   #4
trevelluk
Member
 
Registered: Nov 2003
Location: Bristol, UK
Distribution: Debian Lenny, Gentoo (at work)
Posts: 388

Rep: Reputation: 32
Are you running both OSs on the same computer? If not, do both computers use the same CPU family?

I'm asking this because Sun computers use big-endian CPUs, whereas "normal" PCs use little-endian. This can cause all sorts of strangeness.
 
Old 06-23-2005, 03:12 PM   #5
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
What functionality are you using? Is the program threaded? Are you using any networking or socket code?

What compiler/version are you using under Solaris?

I seriously doubt this is an endian issue unless you attempting to run the Linux ELF binary on Solaris... which would probably fail for a number of reasons before the big vs. little endian issue would even have a chance to matter
 
Old 06-23-2005, 09:25 PM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
It would help if you:
- tell what your program is doing
- narrow the difference to a small piece of code
- post this code sample
- tell what is the expected result and the returned result with Solaris.
 
Old 06-24-2005, 02:45 AM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
As jtshaw said, copying binaries across these OSes is not going to work... this is true across almost any different OS pair.
You will have to re-compile at a minimum.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compilation compatibility between Linux and Solaris Garfalala Solaris / OpenSolaris 4 08-07-2003 04:10 AM
Compilation compatibility between Linux and Solaris Garfalala Linux - Software 0 08-06-2003 10:23 AM
Run OpenWindows (Solaris 6) program in Linux praditsm Linux - General 4 06-22-2001 02:27 PM
Run OpenWindows (Solaris 6) program in Linux praditsm Linux - Newbie 1 06-20-2001 01:31 PM
Run OpenWindows (Solaris 6) program in Linux praditsm Programming 0 06-19-2001 04:04 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration