LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-29-2009, 03:51 PM   #1
JimHughen
Member
 
Registered: Jun 2009
Location: Austin, Texas
Distribution: Ubuntu
Posts: 44

Rep: Reputation: 16
distributed Linux Application Programs


This Linux is a new and exciting adventure for me.

When I write an application and distribute it, I believe that a binary for this new application is only for ONE type of Linux implementation.

It is possible to build various binary versions for various implementations.
That seems to complicate the release and distribution process.

Are Linux applications distributed with source so that users can build a version for their own particular implementation?

If a Linux applications is distributed closed source, how do various different implementations get the correct binary?
(I suspect it must be from the author.)

What are the usual considerations about this?

'implementation' is not used here as a distro, but the hardware platform.
 
Old 06-29-2009, 04:15 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
You have asked some very poignant questions about the very essence of open source software and about nature of Linux distributions. I'll try to briefly address each of your questions.

First let me express a concern. I hope that this isn't a homework assignment. The questions sound a bit like homework. Asking people to do homework without clearly stating that it is homework is a violation of the LQ rules.

Quote:
Originally Posted by JimHughen View Post
When I write an application and distribute it, I believe that a binary for this new application is only for ONE type of Linux implementation.
So, as you say at the bottom of your post, implementation is intended to mean the hardware platform. We refer to this as the architecture. Applications that are compiled into binaries are restricted to the hardware platform, or architecture, for which the binaries were compiled. This is also true of Windows and every other operating system. On the other hand if you create an application from interpreted scripts then these should run unchanged on different architectures. Scripts can be written in any of several languages including but not limited to bash, csh, tcsh, Python, and Perl. The code from these languages is 'compiled' at run time one line at a time. Each line is executed as soon as it is compiled, then the shell reads and compiles and executes the next line in the script.

Quote:
Originally Posted by JimHughen View Post
It is possible to build various binary versions for various implementations. That seems to complicate the release and distribution process.
This is the way of the computer world. There are emulators that attempt to create the illusion of a hardware platform so that you can run, for example, software written for Atari computers on a new Intel based computer. However software developers generally release a separate version of their product for each architecture that they want to see their product run on.

Quote:
Originally Posted by JimHughen View Post
Are Linux applications distributed with source so that users can build a version for their own particular implementation?
Google the phrase "open source". There is a mountain of information about the intended goals of the open source software movement.

In general the typical end user will not have the skills to read source code, much less to customize it.

Quote:
Originally Posted by JimHughen View Post
If a Linux applications is distributed closed source, how do various different implementations get the correct binary?
The answer here is the same as how the end user gets the correct version of Linux for their architecture. When you visit a Linux mirror site you will see a separate installation kit for each of the supported architectures.

Quote:
Originally Posted by JimHughen View Post
What are the usual considerations about this?
The only considerations are in cases that a given hardware platform will run several different binary versions of the product. For example, in Linux you will see installation kits intended to run on 32 bit Intel CPUs and other installation kits intended to run on 64 bit Intel CPUs. The 32 bit installation will work on a 64 bit machine so the end user has to decide which installation kit to use.

Last edited by stress_junkie; 06-29-2009 at 04:20 PM.
 
Old 06-29-2009, 05:58 PM   #3
JimHughen
Member
 
Registered: Jun 2009
Location: Austin, Texas
Distribution: Ubuntu
Posts: 44

Original Poster
Rep: Reputation: 16
Thank you stress_junkie for this detailed reply.

No, this is not homework.

I have a very strong C background, PC hardware architecture, and other application experiences. Previously, I have used Linux, but not done detailed programming. As Linux is becoming used in embedded systems, my goal is to use this background and become deeply entrenched in Linux development (as much as possible). I hope to be active in kernel driver development. This plan is only possible because of the open source initiative and forums like this one.

I am close to buying a Linux Box and will put it on my network and do serious development. Now I am using Cygwin. I need the Linux box soon.

Thank you,
...Jim Hughen
 
Old 06-29-2009, 07:07 PM   #4
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Quote:
Originally Posted by JimHughen View Post
I am close to buying a Linux Box and will put it on my network and do serious development. Now I am using Cygwin. I need the Linux box soon.

...Jim Hughen
You may not have to purchase any hardware to run Linux. You can install Linux in a free partition on your Windows computer. Many of us dual boot Windows and Linux. This can be an economical approach.
 
Old 06-29-2009, 11:35 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Quote:
Scripts can be written in any of several languages including but not limited to bash, csh, tcsh, Python, and Perl. The code from these languages is 'compiled' at run time one line at a time. Each line is executed as soon as it is compiled, then the shell reads and compiles and executes the next line in the script.
Just to clarify, that is true of shells eg bash, ksh, csh etc, but not of Perl.
In fact the real perl executable reads and compiles your prog/script up front and then runs it as a an executable env, which is why, like C, you can have the 'main' at the top instead of at the bottom.
See here for the details: http://www.perl.com/doc/FMTEYEWTK/comp-vs-interp.html

Not sure if the same applies to Python.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Manually add programs into the Gnome Application Browser in 10.2 Hawky SUSE / openSUSE 2 02-22-2007 05:23 PM
Programs not showing up on the Application Menu in Mandrake double_j Linux - Newbie 2 01-19-2006 02:34 AM
Linux for distributed system AdamTheFirst Linux - Hardware 4 11-05-2004 01:24 AM
Linux for distributed system AdamTheFirst Linux - Distributions 1 11-04-2004 03:38 PM
How to apply patches for application programs? ganninu Linux - General 3 10-22-2003 01:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:23 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