LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-22-2011, 03:44 AM   #1
JackNielson
LQ Newbie
 
Registered: Apr 2011
Distribution: ArchBang
Posts: 3

Rep: Reputation: 0
I need some clarification


I was hoping that someone could answer this:
If some writes a piece of software for Linux, does that mean it will
run on any version of Linux on any architecture?
Or do versions differ and architecture need cross compiling?
Thanks
 
Old 04-22-2011, 03:49 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,131
Blog Entries: 2

Rep: Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833
If you compile software for the x86-architecture it will of course not run on a SPARC-system. You need to recompile in this case. That is one of the advantages of open source, since you have the source code it is not very difficult (in most cases) to adapt the software to a new architecture.
If you use any libraries in your software, these libraries have of course to be present (in a somewhat similar version) on a system where you want to run your software.

If you have the same architecture and the libraries present it shouldn't matter if you run the software on Slackware or Ubuntu.

Last edited by TobiSGD; 04-22-2011 at 03:51 AM.
 
Old 04-22-2011, 03:55 AM   #3
JackNielson
LQ Newbie
 
Registered: Apr 2011
Distribution: ArchBang
Posts: 3

Original Poster
Rep: Reputation: 0
So are you saying that the only thing that matters is the architecture, and if I write
a program for Linux(say crunchbang) on a x86 processor it should run on any other Linux distribution(say slackware) on a x86 processor?
 
Old 04-22-2011, 03:58 AM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
@ Reply

Hi JackNielson

Whenever someone writes the code for linux it is basically the source code and then you compile it according to your wish. I am not sure about other versions of Linux but in Redhat, Fedora and CentOS what you can do is you can download the source rpms and then you can modify the spec file to compile it according to the architecture you want to run it on.

Some of the rpms comes up with noarch tag put at the end of the name. For example (just an example not sure if this rpm comes with noarch or not) firefox-2.3.1.45-noarch.rpm which means it can run on any architecture and is architecture independent.

I hope that answers your query.
 
Old 04-22-2011, 05:03 AM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,131
Blog Entries: 2

Rep: Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833
Quote:
Originally Posted by JackNielson View Post
So are you saying that the only thing that matters is the architecture, and if I write
a program for Linux(say crunchbang) on a x86 processor it should run on any other Linux distribution(say slackware) on a x86 processor?
If all the libraries needed by the application (for example for graphical output), the so called dependencies, are installed on both systems in an appropriate version then yes, it should run on both systems.
 
Old 04-22-2011, 06:06 AM   #6
JackNielson
LQ Newbie
 
Registered: Apr 2011
Distribution: ArchBang
Posts: 3

Original Poster
Rep: Reputation: 0
Thank you very much TobiSGD
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
fgetc() clarification Completely Clueless Programming 14 08-28-2009 08:50 PM
need some clarification/help superhumanCA Linux - General 4 03-18-2008 01:19 PM
I just need some clarification Duneatreides Linux - Newbie 2 03-12-2007 06:48 AM
clarification about defragmenting ramdak5000 Linux - Software 2 02-20-2005 01:27 AM
kernel clarification props666999 Slackware 2 07-31-2004 01:43 PM


All times are GMT -5. The time now is 10:51 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration