Mint possible to compile packages from source?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help

Mint possible to compile packages from source?

Postby Giftmatcher on Wed Jun 27, 2007 4:07 pm

Hello I've been playing around with linux for about a year now and I've grown very fond of this distro. The no BS setup and "just works" nature of it have won me over. I've been using mint for about 2 weeks now and I feel its time to get dangerous with it :wink: . Awhile ago I was using a distro called gentoo, as most of you probably already know the main feature of this distro was that packages were (I have no idea what the proper term for creating a package is) assembled from their source code in a manner that optimized them for the hardware on your machine and cut out any extra slack. (I think it used the GCC compiler for this??) Is this feature repoducible in MINT? Something along the lines of:
apt-get -install -buildpackagefromsource -optimizedforsomeprocessor [somepackage]

I hope this 10 foot walk of text made sense. Thank you in advance for your help and providing this wonderful distro.

PS: Where do I buy the mint linux t-shirt at? I can't find em anywhere :cry:
Giftmatcher
Level 1
Level 1
 
Posts: 14
Joined: Wed Jun 27, 2007 3:06 pm
Location: San Diego, California

Linux Mint is funded by ads and donations.
 

Re: Mint possible to compile packages from source?

Postby scorp123 on Wed Jun 27, 2007 6:02 pm

Giftmatcher wrote: Is this feature repoducible in MINT?
To a certain degree yes, but why oh why would you want that?? Given that we have those wonderful Debian package manager tools: apt, dpkg, Synaptic ...

The point of those tools is that you don't have to mess around compiling your stuff yourself. If you had used Gentoo long enough and e.g. tried to compile more complex packages such as KDE, GNOME or OpenOffice you'd know what I mean: The computer produces nothing but hot air for 2+ days as it is totally busy compiling ...

On Debian-like distros you click on the relevant packages e.g. kubuntu-desktop .... and voila, a few minutes later you have your KDE.

This BS about having "optimised binaries" is just that: BS. Even if you apply really weird levels of optimisations to your compiler setup in Gentoo the differences and speed improvements are next to non-measurable and irrelevant for 99% of the Linux users out there.

The only aspect where Gentoo really shines is the fact that you can create an extremely super-slim and tuned-as-hell system, e.g. throw away all the surplus stuff you don't need (qt, gtk, alsa, etc.), tune your compiler to the max ... then apply some really scary kernel patches ("scary" in the sense: Totally bleeding edge, untested + experimental!) and maybe you will have one hell of a fast server ... which could be useful under certain special circumstances ...

But if you're after something like that then you should stay on Gentoo anyway and not use a distro like Mint.

To use an analogy: You're the kit car racer and car tuner who swapped his "construct-this-yourself" kit car (= Gentoo) for a super-duper comfortable "already-has-everything-you-might-ever-want" Toyota family van (= Mint): There is very little if not nothing to be tuned, newer Toyota cars come "as is" out of the factory with all the gadgets already installed, "ready to enjoy", "ready to drive" .... to all eternity if needs to be: If you treat your Toyota well it will never ever break down (just like Linux !!).

So what you're asking is this: Can I use my super-duper comfortable "stuffed-with-gadgets", "ready to enjoy", "ready to drive" Toyota family van to compete in dragster race, e.g. tune it to 900 hp and remove that family-friendly Diesel engine and replace it with a F-16 jet engine I bought from the US Air Force .... ?

Sure, you can ....

But people who do such stuff don't use Toyota family vans as basis for such constructions, wouldn't you agree? :wink:

To get back to Linux: Yes, sure, even on Mint (= that super-duper comfortable Toyota family van with all the gadgets preinstalled) you can compile everything if you want to .... It's just that if you really wanted to do that all the time then you probably should have stayed on Gentoo. :wink:
User avatar
scorp123
Level 8
Level 8
 
Posts: 2287
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Postby Giftmatcher on Wed Jun 27, 2007 6:40 pm

Posting in a legendary thread :lol: Probably the most entertaining thing I have read all week. If your not writting a book you should be! Id be the first guy to buy it.

In my nostalgia for gentoo I had forgotten about how long gnome took to put together. I don't think I want to go down that route again.

What about building your own kernal? Have modern processor speeds just crushed any benefit from doing this as well?

I guess what I am looking for is ways that I can tweak the performance of
my desktop. I don't think anything is going wrong but sometimes apps "hang" graphically (portions of the applications window drawn much slower then the rest) and my machine is brand new. Dual core amd64 - Nvidia 7300GS and a gig of ram. I think gnome may be to blame but I don't really like the option of just going back to XFCE.

Any performance alterations that you would recommend?
Giftmatcher
Level 1
Level 1
 
Posts: 14
Joined: Wed Jun 27, 2007 3:06 pm
Location: San Diego, California

Postby Boo on Thu Jun 28, 2007 12:37 am

there are no real performance gains from building your own kernel (even if it is 64bit)...

Unless you can build the kernel and all apps in 64bit.
but thats getting back to gentoo world.

:D
Image
Now where was i going? Oh yes, crazy!
User avatar
Boo
Level 8
Level 8
 
Posts: 2364
Joined: Mon Mar 26, 2007 7:48 am

Postby Giftmatcher on Thu Jun 28, 2007 12:47 am

yeah I'd like to avoid that - I don't know about most linux aps but the 64 bit version of firefox doesn't support all of the extensions that I am dependent on.

There was this version of gnome that I used to use that was lightweight I can't remember the name though. Something like drop gnome It was very responsive. Id like to keep using the distro but this graphical lag thing is starting to get to me. Anyone know what package I'm talking about and if I could use it with mint without too much trouble?
Giftmatcher
Level 1
Level 1
 
Posts: 14
Joined: Wed Jun 27, 2007 3:06 pm
Location: San Diego, California

Postby Boo on Thu Jun 28, 2007 12:56 am

the XFCE beta will be out soon, if not already (ie today).
check the XFCE forum.

:D
Image
Now where was i going? Oh yes, crazy!
User avatar
Boo
Level 8
Level 8
 
Posts: 2364
Joined: Mon Mar 26, 2007 7:48 am

Postby Giftmatcher on Thu Jun 28, 2007 1:04 am

I'll do that, but will the XFCE version contain the really cool searcheable menu the gnome version does?
Giftmatcher
Level 1
Level 1
 
Posts: 14
Joined: Wed Jun 27, 2007 3:06 pm
Location: San Diego, California

Postby Boo on Thu Jun 28, 2007 1:13 am

check this out.

http://www.linuxmint.com/forum/viewtopi ... 0492#20492

some pics and all.

:D
Image
Now where was i going? Oh yes, crazy!
User avatar
Boo
Level 8
Level 8
 
Posts: 2364
Joined: Mon Mar 26, 2007 7:48 am

Postby Giftmatcher on Thu Jun 28, 2007 1:26 am

Looks hot - Im anxious to see what the applications menu will be like.
Giftmatcher
Level 1
Level 1
 
Posts: 14
Joined: Wed Jun 27, 2007 3:06 pm
Location: San Diego, California

Postby Giftmatcher on Thu Jun 28, 2007 1:38 am

Infreakingcredible. If hes running this off an old clunker pc it will deffinitly have the agility that I'm looking for - though I'm not sure Ill run beryl - looks like it eats ram for breakfast.
Giftmatcher
Level 1
Level 1
 
Posts: 14
Joined: Wed Jun 27, 2007 3:06 pm
Location: San Diego, California

Postby Giftmatcher on Thu Jun 28, 2007 2:23 am

OMG I'm dumb. The lag from the ui was probably because I wasn't using the freaking n-vidia driver. This has got to be the dumbest thing to happen in linux history. Used envy gui runs 100x faster. Problem solved :) I wonder if I can get an admin to kill this post before the internet knows I'm retarded.
Giftmatcher
Level 1
Level 1
 
Posts: 14
Joined: Wed Jun 27, 2007 3:06 pm
Location: San Diego, California

Postby Boo on Thu Jun 28, 2007 2:43 am

No I'll get husse to put a special retard flag on it.
and make it a sticky.

:lol:

:D
Image
Now where was i going? Oh yes, crazy!
User avatar
Boo
Level 8
Level 8
 
Posts: 2364
Joined: Mon Mar 26, 2007 7:48 am

Postby Giftmatcher on Thu Jun 28, 2007 2:47 am

I blame the OS :lol: MINT should have generated a pop up message informing me to install the right package for my video card every 6 seconds :lol:
Giftmatcher
Level 1
Level 1
 
Posts: 14
Joined: Wed Jun 27, 2007 3:06 pm
Location: San Diego, California

Postby gcc on Thu Jun 28, 2007 3:39 am

Not to rain on anybody's parade, but if you actually look at some code optimizations, specifying your compiler options can have a very dramatic effect on execution time, particularly between different classes of processor and on specific algorithms, although the larger the piece of code the less likely that a specific optimization will improve performance. The question is whether a desktop user is likely to notice that enhancement, which of course they won't- most users never (or very close to never) max out their processor utilization for an extended period of time, and the only things that do are the occasional encoding or cryptographic task, and even that's stretching it a bit. But that's not the same thing at all as saying there is no difference.
The problem with gentoo is that it promises that it is possible for the mildly techy superuser to get the same kind of performance benefits from rolling their own as somebody who has actually studied the code and used a carefully tuned set of flags for that code and processor, which of course they can't.
The problem with debian, on the other hand, is that it pretends like there isn't any such difference, which, sorry, there is, particularly on floating point operations between new and old machines, and on very unusual hardware, ie, supercomputers, microcontrollers, etc. For most this will not matter, but... I would hesitate to call it BS.
The bottom line is that precompiled packages are more convenient and therefore more useful to 99% of people out there, but that for the fringe cases- hardcore a/v guys, hardware enthusiasts, embedded developers, researchers, etc- it can and does make more sense to do it yourself.
The gentoo guys say that this flexibility makes gentoo superior- that since it can do what you want it to do AND what they want it to do, that it is better. The Debian guys make the same argument that the windows guys do- that better for most is better for all, and if it's not, go someplace else. I'm not sure I like that any more than I like the almost aggressive indifference of gentoo to the non-fringe-case.
So, to summarize my position: it is better to be able to do something and not need to than not be able to when you need to, and to that end, here is the basic process for building something from source:

Code: Select all
sudo apt-get source <packagename>
cd <packagename>
./configure
./make
./make install


If you're still with me and want to optimize your program, the first thing you want to do is to learn the language its written in- and the assembler language of your system to boot. Gentoo pretends this isn't really all that important, but you need to remember that if you compile it with the same set of flags on anything close to what the Debian team does, its gonna be the same damn 1's and 0's- aka, don't bother.
After that, its the tedious and unrewarding process of analyzing code for opportunities for inlining, loop unrolling, etc, and for processor-specific optimizations- the aforementioned floating point difficulties are a good opportunity. A very nice tool to help you in all of this is Acovea, which can produce very significant performance increases given several days of crunching away- and that's on small bits of code. Plan ahead, and bring lunch- unless you really have gotten this far, in which case you're probably gainfully employed doing this kind of thing, and you should buy lunch and save yourself the trouble of making the sandwich.

Unless you happen to be one of those guys that likes to do all the really tedious, hard stuff yourself, in which case this is how you make a sandwich...
gcc
Level 1
Level 1
 
Posts: 40
Joined: Thu Jun 14, 2007 9:45 pm

Postby scorp123 on Thu Jun 28, 2007 4:09 am

gcc wrote: specifying your compiler options can have a very dramatic effect on execution time
"Can": yes. But "must have" or "definitely will have" ...? No.

Like I wrote above: Under certain circumstances it can absolutely make sense to use Gentoo, tune it to the max, then apply real-time patches to the Kernel, throw out anything that might cause unnecessary lags in the system ... We once did such an installation for some research institute and they badly needed such a system. All I know is that they stuffed it with RS-232 cards and some other ports; I don't even know what standard that was. Apparently they needed this thing to measure stuff in some experiments they did. No idea. But if you are going to something like that then Gentoo makes perfect sense.

But on the desktop? I just don't see the sense behind desktop users spending days and days and days compiling stuff when instead they could have all the stuff they could ever want pre-compiled, packaged and easily installed with the luxury a Debian-like system offers. :wink:

Don't get me wrong ... Gentoo is cool and it absolutely has its purposes, and compiling your own stuff may be necessary from time to time, but as I wrote above: The sense behind Debian-like systems and all those nifty package tools is that you shouldn't have to deal with this compiling stuff business. :D
User avatar
scorp123
Level 8
Level 8
 
Posts: 2287
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Postby gcc on Thu Jun 28, 2007 12:27 pm

Don't get me wrong, I'm not saying that just because you compile something it will be faster- thats definitely not the case- and I'm not necessarily advocating Gentoo. I am saying that intelligently choosing compiler options for critical code can have very positive effects under certain circumstances, and that the Debian community is as wrong to ignore those circumstances as the Gentoo community is to ignore the average user.
As for the semantic distinction between can and must, I have to admit that not all "optimizations" will result in better performance- but I can also say that all optimizations used as appropriate will; I suspect that you would find that to be the case.
As for the convenience of Debian-based systems, you're absolutely right; I love Mint and all of its prepackaged, precompiled, easy-to-use goodness. Some things I just don't care enough to optimize- or can't expect a reasonable return on my time investment for doing so. I once saw a guy go through hell on Gentoo to performance tweak his system for Firefox, like that was somehow going to make his DSL faster.
Bottom line: you're right. not everybody wants or needs the performance tuning that changing compiler options implies. but when they do want that, I just think it would be nice to provide that level of support for that audience.
gcc
Level 1
Level 1
 
Posts: 40
Joined: Thu Jun 14, 2007 9:45 pm

Postby scorp123 on Thu Jun 28, 2007 3:15 pm

gcc wrote: ... but when they do want that, I just think it would be nice to provide that level of support for that audience.
The problem is that most likely people here --including myself-- lack the time and maybe even the motivation to offer this kind of very advanced support to the "average joe user" here.

Also it's sort of a paradox: "Newbie" users shouldn't bother with this --they will get better and safer results with the package tools-- and advanced users shouldn't have to ask this --if you compile your own stuff you should already know plenty of things!-- ... :wink:

For these things and this kind of support it probably would be better to talk directly to the devs of the project you want to compile (GNOME devs, kernel devs, KDE devs, Ubuntu packagers, Canonical employees, etc. ....) in their respective IRC channel (e.g. #kde, #gnome, #ubuntu, etc.) or mailing list.
User avatar
scorp123
Level 8
Level 8
 
Posts: 2287
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Postby gcc on Thu Jun 28, 2007 5:09 pm

I absolutely agree, with the caveat that sometimes people start out newbies and become gurus. I know I started out in the community- I was just one more smartassed idiot who thought he knew his way around a computer, until I hung out in the community and learned from people patient enough to explain things to me. I'm sure you had a similar experience, to a greater or lesser degree. Without the help of those people, I would never be the smartassed semi-idiot I am today, and I think it would poorly repay those fine folks if I didn't render the same service to others. I also understand that my time isn't particularly valuable to me, so, I don't judge when other people decide that helping somebody with a particular issue isn't worth their time. In this case, you were right- the person didn't really WANT to compile the package, they just wanted to get better performance, which they weren't going to with those settings, compiled or no, but if the question comes up again, I don't mind if you push it all my way and save your time for helping the people that just need things to work. Besides, the ugly nerdish end is easier anyway- I don't know how you guys make things look good and work well :wink: .
gcc
Level 1
Level 1
 
Posts: 40
Joined: Thu Jun 14, 2007 9:45 pm

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: Australis Rico, Bing [Bot], tdockery97 and 32 guests