LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 02: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, 02:49 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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 02:51 AM.
 
Old 04-22-2011, 02: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, 02:58 AM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ 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, 04:03 AM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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, 05:06 AM   #6
JackNielson
LQ Newbie
 
Registered: Apr 2011
Distribution: ArchBang
Posts: 3

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


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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