Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
source vs. binary
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
rdking
n00b
n00b


Joined: 13 Apr 2005
Posts: 2

PostPosted: Mon Jun 13, 2005 6:00 pm    Post subject: source vs. binary Reply with quote

Hope this is the right forum for this post...

my question is rather simple:

what advantages and dissadvantages are there to compiling source versus binaries? Does it effect speed, usability and stability? does it result in smaller disk use?

the reason I ask is I have been toying with setting up a source based distro on my second hd as a trial. I am not particularily woried about compile time...so why source?
Back to top
View user's profile Send private message
electrofreak
l33t
l33t


Joined: 30 Jun 2004
Posts: 713
Location: Ohio, USA

PostPosted: Mon Jun 13, 2005 6:10 pm    Post subject: Re: source vs. binary Reply with quote

rdking wrote:
Hope this is the right forum for this post...

my question is rather simple:

what advantages and dissadvantages are there to compiling source versus binaries? Does it effect speed, usability and stability? does it result in smaller disk use?

the reason I ask is I have been toying with setting up a source based distro on my second hd as a trial. I am not particularily woried about compile time...so why source?


Well, an obvious dissadvatage is the time it takes to compile things. Some things are really big and therefore will take some time to compile, which may be inconvinient.

As far as speed, there are optimizations that gentoo takes advantage of that you don't get with binaries, so yes, things do tend to be a little faster in that aspect. Usability... well, with the USE flags, some features may be taken out that you aren't going to use which... also cuts down on disk usage. Stability, usually the same, unless you are using extreme optimizations that are not stable.

With the USE flags, disk space (and compile times) can be cut down because large chunks of code can be cut out when you aren't wanting a certain feature. For example, in a program called 'centericq' (a chatting program), lets say you only chat on AIM and nothing else. With the proper USE flags, msn, icq, and others will not be compiled and only AIM will be compiled into it, which saves space, and also compile time is cut down.
_________________
Desktop: ABit AN8, Athlon64 X2 4400+ 939 2.75GHz, 2x1GB Corsair XMS DDR400, 2x160GB SATA RAID-0, 2x20"W, Vista Ultimate x64
Laptop: 15.4" MacBook Pro 2.4Ghz, 2x1GB RAM, 160GB, Mac OS X 10.5.1
Server: PIII 550Mhz, 3x128MB RAM, 160GB, Ubuntu Server 7.10
Back to top
View user's profile Send private message
sktrdie
Apprentice
Apprentice


Joined: 13 Mar 2005
Posts: 153

PostPosted: Mon Jun 13, 2005 7:15 pm    Post subject: Reply with quote

i always think that source is better.
Mostly because u need to compile that app for the specific processor u have, this way it will be fully compatible with your computer specs.
Binary is just that, and whatever computer specs dont matter.
thats why portage rocks!
Back to top
View user's profile Send private message
Lokheed
Veteran
Veteran


Joined: 12 Jul 2004
Posts: 1295
Location: /usr/src/linux

PostPosted: Mon Jun 13, 2005 7:23 pm    Post subject: Re: source vs. binary Reply with quote

electrofreak wrote:
As far as speed, there are optimizations that gentoo takes advantage of that you don't get with binaries, so yes, things do tend to be a little faster in that aspect. Usability... well, with the USE flags, some features may be taken out that you aren't going to use which... also cuts down on disk usage. Stability, usually the same, unless you are using extreme optimizations that are not stable.

With the USE flags, disk space (and compile times) can be cut down because large chunks of code can be cut out when you aren't wanting a certain feature. For example, in a program called 'centericq' (a chatting program), lets say you only chat on AIM and nothing else. With the proper USE flags, msn, icq, and others will not be compiled and only AIM will be compiled into it, which saves space, and also compile time is cut down.


Thats subjective BS. Gentoo has no optimizations. GCC has optimizations and adding -march=athlon-xp -O2 -pipe -fomit-frame-pointer -msse2 does not necessarily mean speed improvements.

USE flags are highly overated and while some benefit can be had to avoid installing components that are not needed, these components are often trivial or neglibile in size. USE flags do not add or remove functionality that is not already in the program, to make believe that they are some enormous disk saving or feature reduction abilities localized only to Gentoo is spreading FUD.

The only real advantage of Gentoo is and compiling from source is the ability to stay up to date and create ebuilds to install even from CVS quickly and painlessly. Cutting down on packages and disk space seems somewhat trivial but that is speculating that people have more than 4 GB hardrives and 333MHZ CPUs, which would making those options less appealing.

As I said before, you need to measure the time it takes to compile and subtract that time from all the ms and secs you shave off program load time or run time to compare it to a binary distro. How many times do you have to run a program to revert the 45 mins it took to compile against the .03 seconds you saved in load time, that is assuming there is a speed difference. Testing Ubuntu shows you just how fast a binary distro can be.

Like I said before, the only real advantage is the ability to stay completely bleeding edge and somewhat limit install to what you like. Those that talk endlessly about CFLAGS and USE flags like you could compile GNOME without X are completely misleading.
_________________
You're not afraid of the dark are you?
Back to top
View user's profile Send private message
loki99
Advocate
Advocate


Joined: 10 Oct 2003
Posts: 2056
Location: Vienna, €urope

PostPosted: Mon Jun 13, 2005 8:24 pm    Post subject: Re: source vs. binary Reply with quote

Lokheed wrote:
...to make believe that they are some enormous disk saving or feature reduction abilities localized only to Gentoo is spreading FUD.


Could you elaborate, why making someone believe that there are "some enormous disk saving or feature reduction abilities localized only to Gentoo is spreading Fear, Uncertainty and Doubt"? It might be fanboy-ish talk and nonsense, but I fail to identify it as FUD!

Lokheed wrote:

As I said before, you need to measure the time it takes to compile and subtract that time from all the ms and secs you shave off program load time or run time to compare it to a binary distro. How many times do you have to run a program to revert the 45 mins it took to compile against the .03 seconds you saved in load time, that is assuming there is a speed difference.


This argument is rediculous IMO. I compile my apps mostly at night or in the background with PORTAGE_NICENESS set to a suitable value. The advantage I get, is a quite responsive desktop, that I can experience every time I work at my box. (That is assuming there is a speed difference, as you correctly put it. :wink:)

Edit: And concerning USE-flags, the true advantage lies within the ability to avoid dependencies that i do not need/want.

gentoo-wiki wrote:
In Gentoo a USE flag is a representation of an option, a global setting for your final system. USE flags affect how many of the packages on your system will build. To explain this I will use the example of BitchX. BitchX is affected by the USE flags "ssl esd gnome xmms ncurses ipv6 gtk cjk"; for the purpose of this example we will focus on the "gtk" USE flag. If you have the "gtk" USE flag in your make.conf BitchX will compile its gtk frontend. Because of that you will need gtk and a host of other dependancies, but without the "gtk" option BitchX can be compiled for console use on a system without a graphical user interface


So please stop spreading FUD! :lol: (Sorry couldn't resist!)
Back to top
View user's profile Send private message
Archangel1
Veteran
Veteran


Joined: 21 Apr 2004
Posts: 1212
Location: Work

PostPosted: Mon Jun 13, 2005 11:45 pm    Post subject: Reply with quote

One of the biggest advantages to me is that it's handy for patches.
Being as patches are pretty much exclusively patches to the source, if you want to tweak some little thing in KDE you have to compile it. With Gentoo that's a breeze; with a distro not designed to compile from source you've suddenly got a lot more work on your hands.
_________________
What are you, stupid?
Back to top
View user's profile Send private message
electrofreak
l33t
l33t


Joined: 30 Jun 2004
Posts: 713
Location: Ohio, USA

PostPosted: Tue Jun 14, 2005 12:35 am    Post subject: Re: source vs. binary Reply with quote

Lokheed wrote:
electrofreak wrote:
As far as speed, there are optimizations that gentoo takes advantage of that you don't get with binaries, so yes, things do tend to be a little faster in that aspect. Usability... well, with the USE flags, some features may be taken out that you aren't going to use which... also cuts down on disk usage. Stability, usually the same, unless you are using extreme optimizations that are not stable.

With the USE flags, disk space (and compile times) can be cut down because large chunks of code can be cut out when you aren't wanting a certain feature. For example, in a program called 'centericq' (a chatting program), lets say you only chat on AIM and nothing else. With the proper USE flags, msn, icq, and others will not be compiled and only AIM will be compiled into it, which saves space, and also compile time is cut down.


Thats subjective BS. Gentoo has no optimizations. GCC has optimizations and adding -march=athlon-xp -O2 -pipe -fomit-frame-pointer -msse2 does not necessarily mean speed improvements.

USE flags are highly overated and while some benefit can be had to avoid installing components that are not needed, these components are often trivial or neglibile in size. USE flags do not add or remove functionality that is not already in the program, to make believe that they are some enormous disk saving or feature reduction abilities localized only to Gentoo is spreading FUD.

The only real advantage of Gentoo is and compiling from source is the ability to stay up to date and create ebuilds to install even from CVS quickly and painlessly. Cutting down on packages and disk space seems somewhat trivial but that is speculating that people have more than 4 GB hardrives and 333MHZ CPUs, which would making those options less appealing.

As I said before, you need to measure the time it takes to compile and subtract that time from all the ms and secs you shave off program load time or run time to compare it to a binary distro. How many times do you have to run a program to revert the 45 mins it took to compile against the .03 seconds you saved in load time, that is assuming there is a speed difference. Testing Ubuntu shows you just how fast a binary distro can be.

Like I said before, the only real advantage is the ability to stay completely bleeding edge and somewhat limit install to what you like. Those that talk endlessly about CFLAGS and USE flags like you could compile GNOME without X are completely misleading.


I didn't say Gentoo had the optimizations, I said Gentoo's portage system takes advantage of the optimizations provided.

Archangel1 wrote:
One of the biggest advantages to me is that it's handy for patches.
Being as patches are pretty much exclusively patches to the source, if you want to tweak some little thing in KDE you have to compile it. With Gentoo that's a breeze; with a distro not designed to compile from source you've suddenly got a lot more work on your hands.


That's a very good point and why I like gentoo so much. When I used debian, it was a pain to compile something manually. Had to even track down all the dependencies for compiling it.
_________________
Desktop: ABit AN8, Athlon64 X2 4400+ 939 2.75GHz, 2x1GB Corsair XMS DDR400, 2x160GB SATA RAID-0, 2x20"W, Vista Ultimate x64
Laptop: 15.4" MacBook Pro 2.4Ghz, 2x1GB RAM, 160GB, Mac OS X 10.5.1
Server: PIII 550Mhz, 3x128MB RAM, 160GB, Ubuntu Server 7.10
Back to top
View user's profile Send private message
asimon
l33t
l33t


Joined: 27 Jun 2002
Posts: 979
Location: Germany, Old Europe

PostPosted: Tue Jun 14, 2005 9:03 am    Post subject: Re: source vs. binary Reply with quote

electrofreak wrote:
That's a very good point and why I like gentoo so much. When I used debian, it was a pain to compile something manually. Had to even track down all the dependencies for compiling it.

If you want to compile a tarball on Gentoo you have to track down all dependencies too.

It's only if you use a Gentoo package, i.e. an ebuild, that the dependencies are handled automatically. The same is true for debian or rpm based distributions. If you use a srpm or a source deb package the package manager can install the needed compile time depenedencies too, just like portage, no need to track them down by hand.
Back to top
View user's profile Send private message
pablo_supertux
Advocate
Advocate


Joined: 25 Jan 2004
Posts: 2751
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

PostPosted: Wed Jun 15, 2005 1:55 pm    Post subject: Reply with quote

I build my programs from source because of the USE Flags, and I think that is almost the only reason why I choose the sources instead of the binary packages.


Compiling from source means that you are ablo to choose the features of a packages you want to have, and you can compile a package so that it works the best for you. If you chosse binary packages then you have to accept the features a developer thought it would be the better for you (and it must'nt be). The freedom of choosing what you want to run is the reason why I use sources.

And there is one advantage, too. Compiling by yourself means that you ware able to optimize the binaries so that they fit the best with your system you may have a a very little seepdup (or not, id you chosse the wrong flags).
_________________
A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum