LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 01-26-2008, 11:07 AM   #1
boler
Member
 
Registered: Jan 2008
Location: London
Distribution: slackware64-current
Posts: 46

Rep: Reputation: 16
Compiling from source or package installation?


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?

Thanks in advance,

Boler
 
Old 01-26-2008, 11:37 AM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
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.......
 
Old 01-26-2008, 11:40 AM   #3
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
1. Yes

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.
 
  


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
binary kernel package == source package ? narc Ubuntu 4 07-29-2007 09:28 AM
i was compiling a source package then deepinlife Linux - Newbie 5 06-25-2006 07:50 AM
package compiling from source, make & make install concepts shujja Linux - Newbie 2 09-20-2005 12:18 AM
message "Problem during installation: x package needed for (installed) x package frayed2 Linux - Newbie 1 04-24-2005 07:05 PM
Compiling a package from source.. (Kopete specifically) cakeman Linux - Newbie 1 09-29-2003 12:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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