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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
OK, I've been a Red Hat Linux user for about the last 2 years, and am now looking for an alternative to RPM. So far, the top candidate I've found is Gentoo. Now the major difference between the two is that Red Hat is RPM-based while Gentoo is Source-based. What I've heard from everyone is that compiling from source significantly improves performance, and while I'm 99% sure this is true, I'm wondering why compiling it on your PC makes programs run faster than if they were complied on someone else's PC. Now, I'm looking for a CompSci answer to this. If someone could please enlighten me as to the advantages of compiling from source, besides not living in RPM hell, and give me a good explination of why compiling locally is better I'd much appreciate it, Thanks!
The compiler goes thru several steps when it compiles the program, one of them is optimization for a given architecture, so for example you got an rpm compiled for i686 and you use athlon processor it means that the prog was compiled for pentium pro and newer CPU (PII, PIII, etc), and hence it won't take advantages of additional instruction sets found on Athlon architecture, so when you compile from source the architecture of your system is considered during compilation (optimization step), so you can get full advantage of your processor.
Yes, of course, there is take for example i386 architecture which is a generalization of all intel architectures, you get the rpm compiled for i386 machine and it works fine under you PentiumII and Athlon what it means it was compiled with SSE and 3DNow! just to pick a few, hence why would you need SSE instruction set compiled support on Athlon architecture? Here comes advantage of compiling yourself. Another thing SMP (Symmetric Multi-Processing)/UP(Uni-processing) - think for a moment, the apps that take full advantage of SMP don't run the same on UP architecture, so if you got an i386 rpm cmpiled on UP machine (and you know this sort of app can take a full power of your SMP machine) and you are installing it on SMP you won't gain any performance boost - compile yourself and you got full SMP support. Opposite hold true for UPvsSMP - you have UP machine and you are thinking that getting SMP package will boost the performance - it won't and you can miss on a few features that UP does better - compile yourself and you got the full UP support for your particular architecture, of course only if an app you are compiling includes special features available only on UP architecture.
OK, so you've showed me how it improves performance by optimizing programs for your CPU, but does it affect any other hardware? Take for example a GPU on Video Card, does compiling X, Gnome, etc... provide any additional improvement in performance, or is it strictly limited to your CPU?
There's a method to have programs compiled for your architecture and still have the possibility to install/deinstall software easily. It's .src.rpm.
You compile it yourself when you do rpm --rebuild watch the screen - you will see lots of gcc/cc statements - meaning you compile it and wrapping it into rpm afterwards, the only thing stays mistery for me why it always compiles into i386, I guess I'll have to look at it closely.
Basically yes, they are pre-compiled unless they are source rpms (src.rpm), as far as architecture concerned there are rpms available for many architectures from intel to alpha. RISC architecture and a few others are not supported by rpm though.
There are also available dynamically linked rpms e.g opera.
Compiling just for the sake of compiling may make you feel better about your situation, but is generally not going to make a noticeable difference on every piece of software. If done incorrectly, say with the kernel, compiling will in fact make your situation worse. Study what you have, understand what features need to be compiled in or optimized (if you know or learn how to do that), and then and only then take the time to do it -- if it's necessary.
If your distro or a specific package only works by compiling source, then do it, otherwise it should be the exception rather than a hard and fast rule.
please notice that with programs such as xine, ogle and mplayer (which are media/dvd players) it does really matter whether you use rpms or compile yourself.
Such programs are build against the kernels and should be optimized specificaly for your system. There are rpms available, but in my experience performance is never optimal. Xine e.g. crashes a lot!
Same goes for drivers that come with things like winmodems.