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 09-15-2005, 10:34 AM   #1
kirmet
Member
 
Registered: Sep 2005
Location: austria
Distribution: fedora,backtrack
Posts: 31

Rep: Reputation: 15
posix compatibility


hi folks i hope badly someone can help me.

following:

i have an exam in posix on solaris.

little history:
i did an example program (little chat program) on suse and tried to presentate it in class and i couldnt compile it afterwards because it seems that there are some differences between the distributions.

question:

right now im working on debian ... and i dont really want to download and install solaris because .. well lets say i dont like solaris and i have debian already running anyways.
(no offense had some bad expierince with it)

so can anyone tell me if solaris and debian are compatible when it comes to posix? or do i have any options to make it compatible?

and if not ...
can anyone give me a good link for the smallest solaris distribution availiable?

i hope you can help me
kirmet

Last edited by kirmet; 09-15-2005 at 10:35 AM.
 
Old 09-15-2005, 03:56 PM   #2
primo
Member
 
Registered: Jun 2005
Posts: 542

Rep: Reputation: 34
Solaris isn't Linux man.

Got shell access to their solaris servers?

What are your problems compiling?
If you're programming a network program then you must add -lsocket -lnsl -lresolv to the gcc line in the Makefile that builds the final binary.

There are Solaris manpages in http://www.freebsd.org/cgi/man.cgi
Solaris is SunOS 5.x

There's a mini distribution (live-cd) of Open Solaris at http://schillix.berlios.de/
There's no graphical interface and the editor is vi. I wouldn't recommend it though. It's best if you got shell access to your campus network.
 
Old 09-15-2005, 05:38 PM   #3
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
Quote:
so can anyone tell me if solaris and debian are compatible when it comes to posix? or do i have any options to make it compatible?
Solaris and Debian are certainly very compatible when it comes to POSIX, as this is precisely the goal of standards. What may not be compatible with POSIX is the program you wrote, but you give almost no information about it.

Quote:
Solaris isn't Linux man.
and reciprocally
Quote:
If you're programming a network program then you must add -lsocket -lnsl -lresolv to the gcc line in the Makefile that builds the final binary.
Right, although -lresolv is quite never required.
Quote:
Solaris is SunOS 5.x
Solaris kernel is SunOS 5.x
Quote:
There's a mini distribution (live-cd) of Open Solaris at http://schillix.berlios.de/
There's no graphical interface and the editor is vi. I wouldn't recommend it though.
Why ? This distro works well, is unintrusive and would help pinpoint posix compatibility issues.
 
Old 09-16-2005, 02:04 AM   #4
kirmet
Member
 
Registered: Sep 2005
Location: austria
Distribution: fedora,backtrack
Posts: 31

Original Poster
Rep: Reputation: 15
hi thx for the answer and dont get mad im a noob in a lot of issues and an even bigger noob in a lot of others

well about the chatprog. that was in the past and just an example of what (at last i think so) happened and i would like to prevent it to happen again.

perhaps i will use the live distribution as it has (as far as i understand) everything i need (vi, gcc).

thx for the answers.
 
Old 09-16-2005, 06:23 AM   #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
I recommend looking through Advanced Programming in the UNIX Environment (2nd edition) by Stevens and Rago for the features you use and see if they talk about any compatibility issues.

You'll find Solaris and Linux are equal in most respects with regards to the POSIX standards but there are some small differences here and there.

Really, your best bet is to find somebody with a Solaris box you can log into remotely to check whatever it is you need to be able to do.
 
Old 09-17-2005, 01:47 AM   #6
primo
Member
 
Registered: Jun 2005
Posts: 542

Rep: Reputation: 34
There's the source to Open Solaris too:
http://www.genunix.org/mirror/index.html

Solaris != OpenSolaris
 
Old 09-17-2005, 02:42 AM   #7
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
OpenSolaris source can be browsed at:
http://cvs.opensolaris.org/source/

Quote:
Solaris != OpenSolaris
same as
"Linux != Linux" ?
 
Old 09-17-2005, 12:01 PM   #8
primo
Member
 
Registered: Jun 2005
Posts: 542

Rep: Reputation: 34
Quote:
Originally posted by primo
Solaris != OpenSolaris
Quote:
Originally posted by jlliagre
same as
"Linux != Linux" ? [/B]
What do you mean?

Solaris != Linux too (just as Linux != Solaris)

and "Solaris != OpenSolaris"

Solaris is based on SVR4. Not all the sources and functionality in Solaris was made onto OpenSolaris.

Pointless pedantry

Last edited by primo; 09-17-2005 at 12:02 PM.
 
Old 09-17-2005, 03:53 PM   #9
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
Quote:
Solaris is based on SVR4.
This is true, and OpenSolaris is based on either Solaris source code or Solaris binaries, so OpenSolaris is Solaris.

Quote:
Not all the sources and functionality in Solaris was made onto OpenSolaris.
There are now several Solaris distributions: Solaris 10, Solaris Express, Schillix that are based on the same code, but they evolve differently and at their pace, that doesn't make them "not Solaris", just like Debian, Red Hat and Fedora Core are all more or less different, but they are all still Linux.
 
Old 09-17-2005, 10:15 PM   #10
primo
Member
 
Registered: Jun 2005
Posts: 542

Rep: Reputation: 34
Quote:
Originally posted by jlliagre
This is true, and OpenSolaris is based on either Solaris source code or Solaris binaries, so OpenSolaris is Solaris.


Yeah man, but it's not exactly the same thing. Of course: it's Solaris and it comes from Sun, but they would never risk a patent fight with SCO (or Novell or whoever holds the copyright to this Unix beast). Unless they buy the whole thing and make it open source, Open Solaris would never be the same thing. It's just a taste of what it once was, and it's good they released it so there's a new path to its evolution that we're luckily to witness from the start anyway.

Quote:
There are now several Solaris distributions: Solaris 10, Solaris Express, Schillix that are based on the same code, but they evolve differently and at their pace, that doesn't make them "not Solaris", just like Debian, Red Hat and Fedora Core are all more or less different, but they are all still Linux.
It's Sun way to test the waters before they jump definitely into open source.
Still, Solaris 10 x86 is preferable to OpenSolaris as it is.
 
Old 09-18-2005, 02:05 AM   #11
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
Quote:
Of course: it's Solaris and it comes from Sun, but they would never risk a patent fight with SCO (or Novell or whoever holds the copyright to this Unix beast).
SCO holds the Unix System V rights, but acknowledge Sun has some of the broadest rights to Unix intellectual property. OpenSolaris source was release with full SCO agreement. System V code is part of OpenSolaris, and is open source, just browse OpenSolaris code if you are not convinced.

Quote:
Unless they buy the whole thing and make it open source
Unless they buy what ? Sun is owning Solaris. Of course, Sun is respecting the several parts of Solaris that are copyrighted from independant ISVs, for those the owners are unwilling to publish their code but allow free use and reuse of binaries, these binaries are provided.

Quote:
Open Solaris would never be the same thing
You are still confusing OpenSolaris, which is something more or like Linux kernel.org, and Solaris 10, SolarisExpress, and Schillix, which are distributions.
Let me repeat myself, they are all based on the same original code, so they are all Solaris

Quote:
It's just a taste of what it once was
OpenSolaris is only source code and binaries but not a distribution, but if you want to install and run it, you have first to install Solaris Express Community edition or Schillix.
 
Old 09-18-2005, 02:40 AM   #12
primo
Member
 
Registered: Jun 2005
Posts: 542

Rep: Reputation: 34
Open Solaris isn't the kernel alone. The source tarballs contain tools and libraries much like FreeBSD does.

Code:
# du -sh /home/tmp/opensolaris/usr/src
159M    cmd
2.4M    common
6.6M    grub
1.7M    head
 50M    lib
9.8M    pkgdefs
 40K    prototypes
1.2M    psm
4.0K    req.flg
1.3M    stand
 21M    tools
1.7M    ucbcmd
232K    ucbhead
1.1M    ucblib
 85M    uts
The kernel's core is in uts/
Much of what OpenSolaris offers is a yet-to-be-completed open source operating system much like the way all BSD's do. The kernel / distro paradigma doesn't apply to this OS. I'd call Schillix a flavour.


And yes, there are AT&T copyright notices here and there.
 
Old 09-18-2005, 09:45 AM   #13
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
Quote:
Much of what OpenSolaris offers is a yet-to-be-completed open source operating system much like the way all BSD's do.
It offers actually the full O/N consolidation (kernel + base utilities), similar to what "Linux kernel + some Gnu utilities" is, on which distributions can be built and are already built. One main difference with Linux is that not being based on GPL code but on Sun's CDDL, OpenSolaris distribution developers are free to license their own work under the licence of their will, and protect (i.e. close) their code if they choose to do so.
Quote:
The kernel / distro paradigma doesn't apply to this OS. I'd call Schillix a flavour.
Jeorg Schilling call it himself a distribution. I'm not sure what yours "flavor" term adds or remove to "distribution" though.
There are some Debian people thinking in building a Debian/OpenSolaris distribution, that is exactly what I'm calling a kernel/distro paradigm.
Quote:
And yes, there are AT&T copyright notices here and there.
and this AT&T copyrighted code itself is also under the CDDL Open Source compliant license.
 
Old 09-18-2005, 03:52 PM   #14
primo
Member
 
Registered: Jun 2005
Posts: 542

Rep: Reputation: 34
Quote:
Originally posted by jlliagre
It offers actually the full O/N consolidation (kernel + base utilities), similar to what "Linux kernel + some Gnu utilities" is, on which distributions can be built and are already built.
Man, the kernel is distributed alone. Distributions add to this with the GNU C compiler, the binary utilities and so on. There are distributions based on another distributions too.

Quote:
Jeorg Schilling call it himself a distribution. I'm not sure what yours "flavor" term adds or remove to "distribution" though.
There are some Debian people thinking in building a Debian/OpenSolaris distribution, that is exactly what I'm calling a kernel/distro paradigm.
The kernel / distro paradigm does not apply to OpenSolaris as much as it doesn't apply to *BSD. It's more like a meta-distribution. Schillix's just based on it.
 
Old 09-19-2005, 01:00 AM   #15
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
This discussion is becoming pointless.

The is no vocabulary monopoly,"distribution" can be, has been and will be used for non Linux Operating Systems or whatever.

Here is an excerpt from last week's linux planet, note the use of distribution:

http://www.linuxplanet.com/linuxplanet/reviews/6007/2/


What is most interesting, from the perspective of a Linux user, is that the model and license adopted by Sun allows you to use, modify, and redistribute the code in the Solaris system. Ultimately this means that individuals and organizations can release their own Solaris distributions, in much the same way as we currently use Linux distributions from Gentoo or Fedora.

Sun has formalized the open source approach by making OpenSolaris available as a distribution in the form of the Solaris Express: Community Release, a free version of Solaris, based on the OpenSolaris code and designed to be used to help further develop the OpenSolaris product.
 
  


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
posix acl Ammad Linux - General 3 03-20-2005 05:35 PM
About POSIX threads Ephracis Programming 1 12-03-2004 06:33 AM
Posix arunshivanandan General 1 05-19-2003 08:07 AM
Posix? justiceisblind Linux - Newbie 2 03-11-2002 08:04 PM
posix thread sulo Programming 1 02-28-2002 07:41 PM

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

All times are GMT -5. The time now is 07:17 PM.

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