Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
1) Am I right in saying that when you install a software package you a installing a binary file of the program?
2) If this is true how can this same binary file run on different CPU architectures i.e. Intel, AMD, Sparc etc?
3) The aim of compiling a kernel from source is to optimise it for your CPU architecture and other hardware. Is this true for programs too? If I compile xmoto from source for example will it run more efficiently, faster etc?
1) Usually, you are installing a binary file. However, some packages contain programs that are written in non-compiled languages like Python or Java. OK, Java is sort-of compiled, but the upshot is that the Java program can't run without a local JVE, and THAT is compiled.
2) Usually the same binary can't run on different architectures. Packages like this are likely to be for a non-compiled program language like Java.
3)You can see some performance enhancement from compiling yourself, but frequently the difference isn't really noticeable. The best reason for compiling from source is to add some functionality that might not be in the binary distribution. Or simply because you want to.......
2. Not exactly. The binary is good for an arch. Mainstream cpus (intel AMD) come in two basic forms (after the pentium) 32bit and 64 bit. If you have a 32 bit mainstream cpu you run the iX86 (X can vary but usuall 3 as in i386) (32bit) binary. If you have a 64 bit mainstream cpu you can run a 32bit OS or a 64bit OS. You can run a 32bit binary on a 64bit OS but you cannot run a 64bit binary on a 32bit OS. Now Sparc, MAC, or whatever pretty much require a binary that is made just for them.
3. In theory yes, but in practice not really. The difference between a precompiled binary and compiling it yourself is usually in the low single digits difference in speed. When one considers the time and effort it can take to compile some (not all) stuff, one is better off just using the precompiled binary.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.