Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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?
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.