Slashdot Mirror


Should You Pre-Compile Binaries or Roll Your Own?

Jane Walker writes "The completion of pre-compiled packages and maximizing machine performance are two powerful incentives for Windows admins to use Linux and compile an OSS package." TechTarget has an article taking a look at some of the "why" behind rolling your own. What preferences have other Slashdot users developed, and why?

301 comments

  1. Gentoo? by corychristison · · Score: 5, Informative

    I feel that Gentoo Linux offers the best of both worlds, with their ebuilds. :-)

    1. Re:Gentoo? by MightyMartian · · Score: 4, Informative

      Actually, I'm becoming a very big fan of FreeBSD. Their ports and packing systems give me the best of both worlds. Where I just need a relatively generic version of a piece of software, I just install the binary, but where I need a few more options (common with stuff like Samba and FreeRadius) I can compile.

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    2. Re:Gentoo? by stevey · · Score: 5, Interesting

      The story, and comment, is almost certain to generate a flamefest. So I'll get in early.

      I'm a Debian user, and there are three things I know about gentoo:

      • The distro is based around compiling from source, which many suggest gives a huge speedup.
      • They have some neat tools for working with file merging conflicts in /etc, which sometimes happen when upgrading.
      • They make use of "USE" flags which can disable parts of programs you don't want/need.

      As for the first I think that compiling from source may well give you a speedup. But when my computer is setting with me at the desktop/ssh session very few processes are running and the network latency / my thinking time are most likely to be the biggest source of delays.

      True for heavily loaded servers the compilation might give you a boost but I'd be suprised if it was significant.

      Next we have USE flags. These do strike me as an insanely useful thing. But I have one niggling little doubt: I suspect they only work for code that supports it. e.g. project foo has optional support for libbar. If the upstream/original code doesn't have a feature marked as optional I don't imagine the Gentoo people would rework it to strip it out.

      So the ability to remove things from the source must be neutered, right?

      Finally the merging of configuration files in /etc seems useful. But I wonder if this is the correct approach. My distribution of choice, Debian, already does its utmost to preserve all configuration file changes automagically. I find it hard to understand what Gentoo does differently which makes it better.

      Ultimately I guess there are pros and cons to source based distributions depending on your needs. But one thing is true: If you're building from source and making use of modified USE flags and compiler flags then changes are you're the only person in the planet with a particular setup - that means bug reports are hard to manage.

      Theres a great deal to be said from having a thousand machines running identical binaries when it comes to tracking down bugs. (Sure diversity is good, especially for security, but there comes a point where maybe people take it a little bit too far).

      ObDisclaimer: I'm happy to be educated about Gentoo, but be gentle with me, k?

    3. Re:Gentoo? by Anonymous Coward · · Score: 1, Funny

      Obligatory:

      funroll-loops.org

    4. Re:Gentoo? by EnigmaticSource · · Score: 5, Informative

      Well, as a Gentoo user, I'll tell you my personal reasons for using portage (speed isn't one of them).


      1.) Maintainability: I don't have to fiddle with 30+ binary dependencies when I upgrade a package, nor do I worry about having multiple library versions within the same major release


      2.) Simplicity: Well, it's not particularly simple (in fact, until 2006.1 it was a nightmare) to setup, but once everything is in line I simply don't have to worry about be various `gotchas` of any given package, it's all been abstracted away


      3.) USE Flags: An extension of the above, USE is like a homogeneous ./configure, no more silly --without-some-foo flags, or include paths that I forgot about 30 seconds after I installed a library. It's not so much about making things optional (at least in the real world) but more about keeping things simple (I specify all of my USE flags at install time, and simply add them to my list when new ones are created)


      4.) Lack of Binary Packages: As an old slackware user, I got used to not finding package `foo` as a .tbz and having to deal with RPMs that are/were broken and took more time to install properly than to compile. By using a source based distribution, if I have a one-off or patched library I don't have to worry about will feature X work or why Sodipodi crashes, because whatever version I have is (within reason) now the native version to the application


      Hope that helps

      --
      The Geek in Black
      I know my BCD's (when I'm Sober)
    5. Re:Gentoo? by sflory · · Score: 1

      Not to mention what happens when your nice shiney new system breaks, and you can't run ls on your old system. As you compiled everything with march=nocona. It's perfectly reasonable to recompile an app like mplayer for your cpu. But for most apps i586 is as fast or faster.

      --
      IANALBIPOOGL (I am not a Lawyer, but I play one on GrokLaw.)
    6. Re:Gentoo? by autocracy · · Score: 3, Interesting

      Having lived in the Linux From Scratch days, you'll find just about everything has use flags and parts that can be disabled.

      --
      SIG: HUP
    7. Re:Gentoo? by stevey · · Score: 1

      Hey if it works for you I've no interest in converting you .. but I have to comment.

      1.) Maintainability: I don't have to fiddle with 30+ binary dependencies when I upgrade a package, nor do I worry about having multiple library versions within the same major release

      Two seperate comments. Why do you care how many binary dependencies there are? I'd imagine that you have only changed the problem from multiple binary dependencies to multiple source rebuilds.

      Imagine what happens when libpng4 comes out - every program using libpng must be rebuilt to get the new features, so you've only sidestepped the problem.

      Having multiple versions of libraries installed isn't a big deal either, unless you're tight on space. And if you're tight on space the idea of compiling large applications probably isn't something you'd appreciate anyway!

      The lack of binary packages you mention seems to be more a deficit in Slakware than a Gentoo-specific gain I'd suggest too. Similarly Debian has a huge archive of software, and so do the "bigger" distributions such as RedHat and SuSE.

    8. Re:Gentoo? by tota · · Score: 4, Interesting

      I'll try to be gentle;)

      "The distro is based around compiling from source, which many suggest gives a huge speedup."
      It probably does, especially when building for specific architectures
      (like C3 or C3-2, etc..)
      "... but I'd be suprised if it was significant."
      Well, since you compile the compiler as well as everything else.
      It does accumulate...
      But point taken, in most cases it is not a reason in itself.

      USE flags: "I suspect they only work for code that support"
      "If the upstream/original code doesn't have a feature marked as optional I don't imagine the Gentoo people would rework it to strip it out."
      Actually, that's not true: The Gentoo devs do apply some very useful patches, including some that make it possible to *remove* unused features like you described. Better yet, these patches do make it upstream eventually, albeit at a smaller pace (so the whole community benefits)

      Re: configuration files: "Debian, already does its utmost to preserve all configuration file changes automagically. I find it hard to understand what Gentoo does differently which makes it better"
      It is not that different, except maybe that Debian does not change as quickly as Gentoo.

      "you're the only person in the planet with a particular setup - that means bug reports are hard to manage."
      You would be surprised.... Check out the Gentoo ML, they are full of people ready to help, even you try to use that tweaked package XYZ and get into difficulty.

      "thousand machines running identical binaries when it comes to tracking down bugs"
      Well, if that's what you are looking for, you still can with Gentoo:
      (as the parent posted noted) build binary packages on the build machine and deploy to all the others in binary form.

      If you want to try it out, why not use UML to boot into it:
      http://uml.nagafix.co.uk/
      (images and kernels ready to use)

      --
      TODO: 753) write sig.
    9. Re:Gentoo? by RedWizzard · · Score: 5, Informative
      As for the first I think that compiling from source may well give you a speedup.
      Forget performance, it's a red herring. If you're considering looking at Gentoo for performance reasons you'll probably be disapointed. Increased performance is a minor side effect at best and more likely to be completely undetectable. Gentoo is about configurability and control, not performance.
      Next we have USE flags. These do strike me as an insanely useful thing. But I have one niggling little doubt: I suspect they only work for code that supports it. e.g. project foo has optional support for libbar. If the upstream/original code doesn't have a feature marked as optional I don't imagine the Gentoo people would rework it to strip it out.

      So the ability to remove things from the source must be neutered, right?

      You are right - generally USE flags rely on the upstream source having optional support for various features. So in theory it might be that very little can be removed from a given package. But in practice most OSS software is highly configurable at the source level, particularly if it is portable rather than Linux specific. The number of USE flags recognised by each package is highly variable. For example, mplayer recognises over 70 USE flags, while Firefox recognises 11.
      Finally the merging of configuration files in /etc seems useful. But I wonder if this is the correct approach. My distribution of choice, Debian, already does its utmost to preserve all configuration file changes automagically. I find it hard to understand what Gentoo does differently which makes it better.
      It puts control back into the hands of the user (which is basically the fundamental point of Gentoo). Consider a package that is adding a new config option. The Debian way will be to ignore that option, set a default for the option, and/or at best log a message that is easily missed (I don't know Debian so any inaccuracies are unintentional). Gentoo provides a complete default config that can be compared to the existing config. It allows the user to decide what changes should be made to the config. This is particularly important for packages which have extremely complex configurations (e.g. apache). There is often no way to automatically translate configuration between versions. The user really needs to look at it.
    10. Re:Gentoo? by stevey · · Score: 1
      It is not that different, except maybe that Debian does not change as quickly as Gentoo.

      I follow Debian's unstable brance, sid, so I download multiple new/updated packages every night!

      But thanks for telling me about the feature-removal, that does make the USE flags more useful than I'd imagined. I guess you do learn something new every day on /.!

    11. Re:Gentoo? by bhirsch · · Score: 1
    12. Re:Gentoo? by iabervon · · Score: 1

      I haven't noticed any particular speed advantage to things compiled locally; I suspect that anything where it actually makes a big difference (e.g., codecs) does runtime detection of the correct version anyway.

      The big advantage to compiling things locally is that the rules for which packages work together are based on source compatibility, not binary compatibility. This, in turn, means that you have a lot more flexibility in updating things, and this flexibility eliminates a lot of the "flag day, new stable version" problems. The recent release of Gentoo 2006.0 didn't contain anything that my Gentoo 2005.0 system hadn't already taken as a regular package update; the point of the release was that the packages on the 2005.1 ISO were out of date, meaning that you'd have to immediately update everything if you installed 2005.1. As far as I know, there aren't any plans for having a distribution upgrade in the foreseeable future, because it's unnecessary. (There is a similar stable/testing/unstable distinction to what Debian uses, except that it is on a per-package level, rather than all changing together).

      USE flags generally apply to optional support for things (which can be hugely important, because lots of apps now have optional Gnome and KDE support, and you generally want to not have these require at least one desktop environment you're not going to use) and also to compile-time options, including things like whether you want debugging symbols in your system libraries.

      My experience is that running exactly the same binaries as thousands of other machines doesn't help stability any if you might be running a combination of installed versions of packages that nobody else has ever tried, Or if you have different hardware, or if you've modified configuration files. Compiling from source reduces the subtle version skew problems without requiring a lot of lock-step updates.

    13. Re:Gentoo? by Anonymous Coward · · Score: 1, Insightful

      Disclaimer: I'm a very happy Gentoo user.

      Well, you have some very strong points against Gentoo. Also, you're right on all accounts. But there are some remarks here.

      First of all, it's not that big of a speedup, quite honestly, I use Gentoo because I just really like the way it works. I get more done with less. It's not the build-from-source part that I like, it's just the entire system as a whole, I love using it.

      Second of all, those USE flags, they need some upstream support to build in or strip out features. Fortunately, there are a bunch of packages that support this. Some USE flags for example do some work in Apache to enable or disable features, that does help. Same thing goes for PHP.

      The etc-update feature of Gentoo does help a lot. It allows for upgrading to packages to keep up with new features. For example, Shorewall recently got upgraded in Portage. This changed a bunch of the config files. I suppose Debian has some post install script in place to fix that. Though I tend to not look at an update all the time. This way, I get the updated configs later.

      I suppose a postinstall script works fine with a binary package, short install time. But the etc-update works better for Gentoo, longer install time.

      The definite speed advantages of Gentoo are arguable, but that's not always the reason for the switch.

      On a different note. I'm glad to say that my parents are happy Ubuntu users.

      A Linux distro should fit your personal needs. I like Gentoo as my parents are just content with Ubuntu. But that's what FOSS is about, having a choice.

    14. Re:Gentoo? by gullevek · · Score: 1

      > It is not that different, except maybe that Debian does not change as quickly as Gentoo.

      It depends what kind of Debian you follow. Stable never changes, because its stable. Testing is the best for a Desktop system, not as "flakey" as unstable but gets updated very fast - most of the time, except firefox 1.5 thats still not in testing. But with apt-pinning you can easly install one or two small packages from unstable in testing. Its similar to the gentoo feature where you can tag which packages can come from their "gentoo testing branch"

      --
      "Freiheit ist immer auch die Freiheit des Andersdenkenden" - Rosa Luxemburg, 1871 - 1919
    15. Re:Gentoo? by EnigmaticSource · · Score: 1

      Well, as for the library bit, yes If i wanted to use libpng4 in all of my applications, I would need to re-compile all of them, but I'm not really talking about major releases, just the minor ones, like libpng4.0.9999 (now with improved telepathy). In these cases I just compile against the version that I currently have.

      And on the second point, not all of the software I use even has a binary package on RedHat or Debian (that I know of). Besides, up until about 3 months ago I hadn't used Linux since 1998, During that period of time I converted to the various BSD's (which honestly are the best of both worlds with the ports system). Now, I honestly don't know how Redhat behaves when you do install something from source, but I can't imagine it being much prettier than when I tried it in 1997 (I assume RPM is still basically the same).

      (I still currently prefer FreeBSD and it's binary or source method to Gentoo, but Gentoo was the closest to what I like that supports all of my new laptops hardware.)

      --
      The Geek in Black
      I know my BCD's (when I'm Sober)
    16. Re:Gentoo? by Theatetus · · Score: 3, Informative
      Next we have USE flags. These do strike me as an insanely useful thing. But I have one niggling little doubt: I suspect they only work for code that supports it. e.g. project foo has optional support for libbar. If the upstream/original code doesn't have a feature marked as optional I don't imagine the Gentoo people would rework it to strip it out.

      Yes and no. It's really more dependent on the Gentoo maintainer than on the upstream. Most "big" projects also include a patchset (generally small stuff like where config files go; sometimes big changes to the codebase). These will generally have fairly rich USE flags. And it's not simply disabling things; in some cases it's adding whole subsystems (like SASL for sendmail, or the postgres backend for named). But anyways, some maintainers will add a lot of USE flags to their ebuild and others won't.

      Finally the merging of configuration files in /etc seems useful. But I wonder if this is the correct approach. My distribution of choice, Debian, already does its utmost to preserve all configuration file changes automagically. I find it hard to understand what Gentoo does differently which makes it better.

      Part of it comes from the fact that /etc/foo.conf might be altered by both libfoo and gtk-foo. The utility dispatch-conf diffs the two packages' foo.confs to let you merge their conf files. I think the best thing Gentoo does in /etc is the utility rc-update. It's the most sane init/runlevel interface I know.

      --
      All's true that is mistrusted
    17. Re:Gentoo? by Tony+Hoyle · · Score: 1, Troll

      I gave up on gentoo fundamentally because of its *lack* of control.

      The problem is the USE flags are global.. you can override them for an individual package but that doesn't get recorded anywhere - on the next emerge world it'll happily forget all your carefully crafted options and reinstall with its global defaults.

      The killer for me with lynx. Most distros have a minimal lynx that works in text mode. By default the gentoo one is dependent on X, about a million fonts, etc. You can override that on the command line using a local USE flagbut what happens at the next update? Your nice small lynx that you need for diagnostics, single user boots etc. is replaced with a graphical behemoth that's almost useless for that task.

      I found that happening so much in gentoo I just gave up on it (the small fact that some of the stuff I needed had compile errors didn't help either).

    18. Re:Gentoo? by TheRealMindChild · · Score: 1, Insightful

      Obviously, not everyone agrees with you...

      --

      "When life gives you lemons, don't make lemonade. Make life take the lemons back!" -- Cave Johnson
    19. Re:Gentoo? by shimage · · Score: 1

      I had heard that "testing" isn't very safe, since it's the last branch to get security patches. I have nothing to back up this claim, it's just something I'd read somewhere, but if it's true I'd stay away from it (and I did, while I ran debian).

    20. Re:Gentoo? by gorre · · Score: 4, Informative
      The problem is the USE flags are global.
      Not true, you can put USE flags for specific packages in the /etc/portage/package.use file. You might want to check out the relevant section of the Gentoo handbook for more information.
      --
      "Madness is something rare in individuals - but in groups, parties, peoples, ages it is the rule." -- Nietzsche
    21. Re:Gentoo? by shimage · · Score: 1

      That's what the /etc/portage/packages.use file is for. As for compilation errors, I've had as much trouble with broken debs as I've had with compilation (that is, compilation that fails only on my system, for no good reason; if it happens to other people, then there's a good chance you can fix it).

    22. Re:Gentoo? by Atzanteol · · Score: 1

      Apparently you never learned about /etc/package.use, where you can specify USE flags on a per-package basis. I think this is 'relatively' new though, so it may not have been around if you tried Gentoo 'long ago.'

      --
      "Ignorance more frequently begets confidence than does knowledge"

      - Charles Darwin
    23. Re:Gentoo? by ameoba · · Score: 1, Funny

      If the site get's /.ed, check here for more information on the performance benefits of running Gentoo.

      --
      my sig's at the bottom of the page.
    24. Re:Gentoo? by V.+Mole · · Score: 5, Informative

      The Debian way will be to ignore that option, set a default for the option, and/or at best log a message that is easily missed (I don't know Debian so any inaccuracies are unintentional). Gentoo provides a complete default config that can be compared to the existing config.

      Nope, that's not the "Debian way" (at least as I, long-time Debian user/developer, see it). Debian provides a default config file (or files). When the package is upgraded, if the distributed config file is changed (new option, or new value for old option), then one of two things happens:

      1. If the user has NOT changed their local version, just upgrade to the new distributed default. The assumption is if they were happy with the old default, they'll be happy with the new ones. This covers the vast majority of cases.
      2. If the user has changed their local version, offer them the chance to look at the diff, and then either overwrite, don't overwrite, or shell it and deal with by hand. If they choose not to overwrite, then the distributed default is left alongside the real config file for later perusal/integration.
      While there are a few obscure corners in the implementation, and individual developers can make mistakes, it mostly works pretty well. The net effect sounds pretty much like your description of the Gentoo way: don't overwrite local changes, and give them something to diff against.
    25. Re:Gentoo? by Anonymous Coward · · Score: 0
      The problem is the USE flags are global.. you can override them for an individual package but that doesn't get recorded anywhere - on the next emerge world it'll happily forget all your carefully crafted options and reinstall with its global defaults.

      Yes, you can set permanently keywords for individual packages: /etc/portage/package.use
      And you can also individualy decide to use stable vs unstable packages (package.keywords) or ignore specific versions (package.mask)

      The killer for me with lynx.

      "Lynx" doesn't have any dependency on X Window. "Links" does. Just add a line "www-client/links -X" in your package.use and "links" will never add support for X Window.

    26. Re:Gentoo? by Just+Some+Guy · · Score: 3, Interesting
      They make use of "USE" flags which can disable parts of programs you don't want/need.

      More importantly, they enable parts of programs you do want/need, even if not many other people do.

      For example, my desktop is one of the few *ix machines in my office, and our network is primarily based around Win2k3 and Active Directory. I really, really need Kerberos support in every package that supports it, and configuring 'USE="kerberos"' solves that problem.

      This exact issue drove me away from Debian way back when. It made me chose between old Kerberized OpenSSH, or a newer un-Kerberized version (as of today: ssh-krb5 3.8.1p1-10 from OpenBSD 3.5, released 2004-05-01, or ssh 1:4.2p1-7). Gentoo didn't make me choose, so that's what I went with.

      Gentoo isn't for everybody, but it has some features that I'd never give up. The ability to pick and choose obscure features that most other people won't need is high on that list.

      --
      Dewey, what part of this looks like authorities should be involved?
    27. Re:Gentoo? by kbielefe · · Score: 4, Interesting
      I use gentoo for a few different reasons, none of which have anything to do with ekeing out every last cycle from my machine:
      • Nearly universal support for stack smash protection which must be enabled at compile time.
      • Incremental updates. I update my system a little bit at a time instead of doing a major upgrade when the distro makes a new major release. I've used gentoo for a long time (5+ years), so I don't know how much of a problem this still is with other distros or not.
      • Better dependency handling. No problems with different packages being compiled by different compilers against different development library versions.
      • Not strongly married to either KDE or Gnome.
      • Multimedia is easier to get working than any other distro I've tried. decss, win32 codecs, etc.
      • Can stay bleeding edge where I want to, and extremely stable in other areas.
      • Easy to make small changes to source. I occasionally add a minor feature, change a default, fix a bug, or apply a security patch from a mailing list instead of waiting for the next release.
      • Easy to distribute to multiple machines. It's a snap to compile and test on one machine, then quickly install my custom binary package on many machines.
      • USE flags. Almost everywhere you could use --disable-feature on a manual configure, there is a USE flag for that feature. This is very useful both for enabling features that most distro's wouldn't include and disabling features that most distros include by default. For example, when alsa was still pretty new and usually not enabled by default, the alsa USE flag made migration much easier.
      --
      This space intentionally left blank.
    28. Re:Gentoo? by Arandir · · Score: 0, Flamebait

      While interesting, your link is completely tangental to the post you're replying to. Please do try to stay on topic. Thank you.

      --
      A Government Is a Body of People, Usually Notably Ungoverned
    29. Re:Gentoo? by NoMercy · · Score: 1

      Etc updates, both need improvement, debian automagicly screwed up my exim4 config, and gentoo keeps putting me into vi to edit binary files, and files I've made no modification to.

      Sometimes I think they should concider using git (repository manager) to manage /etc, would be nice to see some logical management with a full history of changes made by updates.

      Building things from source, some things are probably worth it, I always build a kernel optimised for the platform I'm using, and I'm tempted to build things like Xorg and other CPU hogging applications, but building everything from scratch is a little excessive for me.

      I'll carry on using both, I suspect the Gentoo path will win at the end of the day, as cores increase, compile time drops (being a nice multi-threaded type of task), once it's low enough, people won't really worry about re-buidling kde every now and again, throw in decent CPU afinity, and you could re-build things without even noticing your framerate in quake drop :)

    30. Re:Gentoo? by loftwyr · · Score: 1

      The problem is the USE flags are global.. you can override them for an individual package but that doesn't get recorded anywhere

      That's not true anymore. Gentoo maintains a set of package specific files to track individual flags and stable/ustable settings in /etc/portage. package.use keeps package specific flags while make.conf keeps global flags (and package flags if you like).

      You need to re-examine the portage system, it's grown a lot in the past while.

    31. Re:Gentoo? by dickko · · Score: 2, Insightful
      Well, since you compile the compiler as well as everything else.
      It does accumulate...


      Does a custom-compiled compiler create different binaries to a pre-packaged compiler? I was under the impression that it might compile the application faster, but the resulting linked-up, ready-to-run binary is no different. So "it does accumulate" doesn't add up to me...

      Just nit-picking, sorry...
    32. Re:Gentoo? by ComputerizedYoga · · Score: 4, Interesting
      Imagine what happens when libpng4 comes out - every program using libpng must be rebuilt to get the new features, so you've only sidestepped the problem.


      Only if it breaks api compatibility with the previous version. Otherwise, that's what dynamic linking is for, isn't it?

      Having multiple versions of libraries installed isn't a big deal either, unless you're tight on space. And if you're tight on space the idea of compiling large applications probably isn't something you'd appreciate anyway!


      Right on ... openoffice 2 spooled out to fill 8 gigs of free space when I tried to compile it with "nostrip" and with debug symbols. The linux kernel source, unpacked, weighs in around 230 megs, where the binary .deb for 2.6.15 is somewhere closer to 16 megs. Sure, you don't get the ultra-lean heavily-tuned kernel that you'd get building from source, but it certainly works.

      Personally, I think the big benefits of running gentoo over debian are things like ... the runlevel abstraction system, the ability to turn on and off features with more freedom, and the simple slickness of portage. Oh, and a very helpful and newbie-friendly community.

      On the other hand, I'd say on a p4 3ghz desktop system with a very large software set, I'm probably averaging 2-3 hours a week of compiling for various updates, my debian and fc4 boxes spend more like 5-10 minutes a week downloading and unpacking them. But, if you're halfway decent at scheduling and don't have constant insanely-high demand everywhere, I'd say that update time isn't even a particularly big deal (after all, it's mostly non-interactive ... fire it, forget it, come back when it's done).
    33. Re:Gentoo? by ComputerizedYoga · · Score: 1
      I think the best thing Gentoo does in /etc is the utility rc-update. It's the most sane init/runlevel interface I know.


      Totally agree.

      A buddy of mine is using my debian test box to develop a system management interface. He's coming from a strong fedora/redhat background, so he's familiar with the numerical runlevel model. But he's also familiar with the chkconfig utility to change what runs at a given runlevel, and the "service" interface to interface init scripts.

      Now, I'm not great with debian, but so far the only thing I've found to approximate it from the cli is an ncurses-based utility, or manually changing the symlinks.

      I'd say that chkconfig gives you a very complete interface, if not the most flexible or intuitive one... but being able to arbitrarily define runlevels is at very least a lot more flexible. And debian's apparent lack of any sort of cli interface for that is just ... pretty mind-boggling.
    34. Re:Gentoo? by RedWizzard · · Score: 1

      Yeah, that sounds pretty much the same as Gentoo.

    35. Re:Gentoo? by CPUFreak91 · · Score: 1

      Gentoo all the way. Speed and things compiled and configured the way I want them to.

      --
      All Your Base Are Belong To Us!!! chown -r us ./base
    36. Re:Gentoo? by greginnj · · Score: 2, Informative

      Lots of people have mentioned /etc/portage/package.use already ... if you've had enough of config files, you should check out the 'porthole' app, which is a GUI frontend to emerge. It makes it very easy for you to see all and only those USE flags which are appropriate to each app, and you can set them for each emerge distinctly. I'm also trying 'kuroo', which is a similar KDE-based app, but I'm liking porthole better.

      --
      Read the best of all of Slash: seenonslash.com
    37. Re:Gentoo? by icedevil · · Score: 1

      Does a custom-compiled compiler create different binaries to a pre-packaged compiler? I was under the impression that it might compile the application faster, but the resulting linked-up, ready-to-run binary is no different. So "it does accumulate" doesn't add up to me...

      The object file produced by the compiler would theoretically be the same. However the libraries that your object file(s) get linked with will be optimized as well (such as the C library), unfortunately the GP's statement that "it does accumulate" is a double edged sword. You can increase the overall speed of a binary by having an optimized compiler (because of its optimized libraries), but if there is a bug in the optimizers it can cause you to end up with a compiler that causes even more bugs in the optimized code produced by the compiler. I should also point out that especially with a source based distro a speedup in compile time will certainly add up.

    38. Re:Gentoo? by rs79 · · Score: 1, Informative

      "Obviously, not everyone agrees with you..."

      I must be dense. I have no idea what point is being made here other than two closely related flavours of unix have some minor differences.

      In related news, water is wet, air is free and the sun will come up tomorrow.

      --
      Need Mercedes parts ?
    39. Re:Gentoo? by rs79 · · Score: 1

      I love FreeBSD and have used it for a decade exclusively. But the number of times the ports tree has worked... oy.

      I install precompiled binaries... and pray. Then I may or may not compile from sources. Sometimes this is utterly flawless (msql) and sometimes it takes a) forever, b) a financial contribution to the authors current hangout and c) a lot of questions. I'm thinking of SSL here. I've had access to the sources to unix since it was born and they don't hold a candle to the complexity of the bitch that is SSL. Talk about learing experience. Although I do think it's cool that all browsers hide a large number of cert errors.

      --
      Need Mercedes parts ?
    40. Re:Gentoo? by kimvette · · Score: 1

      If I didn't use up my mod points already. . .

      This is why I use SuSE. A quicker time to get a machine up and running, plus I compile the kernel to enable all modules for all hardware we have or will have within the lifetime of a release, and when it's time to upgrade hardware what does the job consist of?

      1. Install new motherboard
      2. Boot from a live CD
      3. chroot /mnt/newhdd
      4. mkinitrd
      5. (in some cases) xorgconf or sax2

      I'm partial to KDE distributions. I use KDE, Mandriva, and kubuntu. My preferred distribution is SuSE because although it's more bleeding edge, it's still very stable and users who are novices are very comfortable with KDE on SuSE. Also, updates are extremely easy on SuSE.
      What happens then? That's right, boot to Linux and start working right away, although now that we're going with dual core processors and will soon be using dual core Athlons and Opterons instead of the Pentium 4 and Pentium D, I might have to recompile the kernel. Not a big deal, just one more kernel to add to grub and step 6 will be to change the default kernel selection for grub. Disk space? Storage is now one of THE cheapest components in a system - this isn't the early-to-mid-90s when a hard drive will easily exceed any two or three other components of a computer system added together. Nowadays I can build a server PC with a 900GB RAID-5 array (HARDWARE RAID) for what I paid for my first 32-bit computer (an 8MB 80386DX/33 80MB single HDD, overclocked to a whole 40Mhz) or for what I paid for the components for my first 486DX.

      Less time fussing with a system. Quicker time to get a machine running. Upgrades to KDE, etc. require only an hour or two to download and not many hours compiling all the applications we use.

      Servers? If an email server, apache web server, etc. is running just fine and we don't need to patch for a new vulnerability, it stays put. Less downtime, more productivity.

      I like the idea of Gentoo but you just nailed its main drawback right on the head. Sure, it'll run slightly slower (in theory) than a Gentoo installation, but that will only matter on 3D rendering or MPeG ripping jobs, of which we do only a couple here and there.

      If I were doing something which required a very optimized rendering farm or other form of clustering where performance was crical and shaving off a couple of percentage points in performance could result in saving days on a job, I'd definitely go the Gentoo route and totally strip down the kernel. For general purposes, those lost performance points are well worth the convenience it buys.

      --
      The Christian Right is Neither (Christian nor right). See: Matthew 23, Matthew 25, Ezekiel 16:48-50
    41. Re:Gentoo? by Anonymous Coward · · Score: 1, Informative

      Did you read the link? It's for Gentoo/FreeBSD, a 'Gentooized' FreeBSD with Portage. Many people find ports archaic.

    42. Re:Gentoo? by tordia · · Score: 1

      On Debian, give update-rc.d a look. I searched for the rc-update man page, and, while update-rc.d doesn't show the current run levels for a service like rc-update does, it does make it easy to add or remove services to the different runlevels.

      --

      Frogs are primitive animals - so the occasional extra toe is not that unusual. But this is very unusual.

    43. Re:Gentoo? by dhasenan · · Score: 1

      How do you get Gentoo to do that? It's never actually slapped an editor on me when it's got a new version of a config file in /etc; it only prints a message "IMPORTANT: 238 files in /etc need updating". I could use OpenOffice to edit them if I wanted to.

    44. Re:Gentoo? by r_jensen11 · · Score: 1
      On the other hand, I'd say on a p4 3ghz desktop system with a very large software set, I'm probably averaging 2-3 hours a week of compiling for various updates, my debian and fc4 boxes spend more like 5-10 minutes a week downloading and unpacking them. But, if you're halfway decent at scheduling and don't have constant insanely-high demand everywhere, I'd say that update time isn't even a particularly big deal (after all, it's mostly non-interactive ... fire it, forget it, come back when it's done).

      I usually only compile programs in the background, while I'm doing other things like going to class, browsing the internet, etc. I guess my only complaint about Gentoo is that it can be a pain if you update a lot of packages at once and something gets broken, then revert to older versions. On the other hand, however, the same can be said for most other operating systems.

      Like stated in a *-father post, the reason why I like Gentoo so much is because everything is compiled from source, so when I come across a rare application that doesn't have a pre-compiled binary, I'm not going to have to spend as much time fiddling with installing it as I did when running Slackware. Also, Slackware didn't fuck up my partition tables like one of the Fedora Core DVD's did.

      The moral of any distribution article/flame-war, however, is just to use whatever makes you most comfortable for whatever situation you are in, and not to listen to the fanboys/biggots tell you what to do (with the exception of examples like this one, where we tell you to think for yourself. I think I just created a paradox or something....)

    45. Re:Gentoo? by vmisev · · Score: 1

      port system is amazing...
      before bsd i was rh, mandrake, win *, os7-9 and osx user, but only with freebsd ports i have a clue what is going on during a time and after app install.
      and i like to be informed ;)
      my magick rite for installation:
      # cat pkg-descr \ view Makefile \ read
      # i mean, really... read Makefile ; is it clear what's that about? ; is it cool to install that port? ; read rest of the files ; write changes if needed
      make configure
      make depend (unnecessary, just respect to old gods ;)
      make all install clean
      have a coffee \ light whatever \ run app from desktop \ blink \ nothing \ again nothing \ run app from terminal
      scream
      read again: if app XXX hangs here, try to recompile with option -option-to-go-around-problem-...-ouch
      i will never ever again in my life dclick on .msi or setup_bar.exe
      that's the price to be informed, i guess ;)

    46. Re:Gentoo? by NuclearDog · · Score: 1
      But when my computer is setting with me at the desktop/ssh session very few processes are running and the network latency / my thinking time are most likely to be the biggest source of delays.


      Exactly! This is what all these damn ricers don't seem to get.

      Probably 99% of the time, your computer is going to be stopped, waiting for input from the user, waiting for the next packet from the network, etc.

      I'm sure if you really wanted to do the math, you'd find that for the 1% speed increase the 1% of the time when the machine is not waiting, you'd end up spending more time compiling all your apps than you would gain from compiling them all yourself.
      --
      This statement is forty-five characters long.
    47. Re:Gentoo? by Anonymous Coward · · Score: 0

      > make configure
      > make depend (unnecessary, just respect to old gods ;)
      > make all install clean

      all of that can be replaced with simply:

      make install clean

    48. Re:Gentoo? by Anonymous Coward · · Score: 0

      Change your EDITOR= variable and use dispatch-conf with enable-rcs turned on (see /etc/dispatch-conf.conf), won't provide useful RCS history for config file updates but it'll at least provide you with an easily managed change repository.

    49. Re:Gentoo? by Zerathdune · · Score: 1
      you can compile from source in slackware, just like any other distro, and it's not difficult:

      ./configure make make install

      it even will warn you about dependncies, which the binary package system does not. of course, instaling from a tarball this way makes a program somewhat annoying to remove, so after grabbing the checkinstall binary off of the slackware page I do:

      ./configure make checkinstall

      which does essentially the same thing, except that now if I want to uninstall, all I hav to do is:

      removepkg [package name]

      this has never failed me. I'm not sure how what you've said really sets gentoo apart from other distros. Perhaps you've just had bad experiences because you've tried to convert RPM's, which is generally not the best option since they expect all the files to be in places where the aren't nessicarily; the tarball just comes in without bias, and sees where they actually are. In any case, your argument certainly doesn't make a case against your point, so to each his own, blah blah blah.

      --
      No single raindrop believes that it is responsible for the storm.
    50. Re:Gentoo? by spuzzzzzzz · · Score: 1

      Give init-ng a go. It's similar to gentoo's init system for administration but it's very fast and it runs on debian. It's not the most stable piece of software in the world and I needed to tweak some init scripts manually, but it's worth a look.

      --

      Don't you hate meta-sigs?
    51. Re:Gentoo? by Fordiman · · Score: 1

      Just a comment on point number 4:
      Have you really had enough trouble with building package [bar] (then checkinstalling it) from source that you had to resort to using an RPM?

      --
      110100 1101000 1101000 1100110 0 1101111 1101000 1100011 1
    52. Re:Gentoo? by Jessta · · Score: 1

      Theres a great deal to be said from having a thousand machines running identical binaries when it comes to tracking down bugs. (Sure diversity is good, especially for security, but there comes a point where maybe people take it a little bit too far). There is also a great deal to be said about having thousands of machines with different cpu archs, compilers and optimisations set attempting to compile your code.

      --
      ...and that is all I have to say about that.
      http://jessta.id.au
    53. Re:Gentoo? by AlexMax2742 · · Score: 1

      As have I. I must have tried at least a half dozen distros of linux since RedHat 5.2 all the way to Debian 3.1, and I finally think I'm settling in with FreeBSD. The sheer amount of documentation and other help avalable to me is astounding.

      --
      I'm the guy with the unpopular opinion
    54. Re:Gentoo? by Anonymous Coward · · Score: 0



      Pointless, disgusting crap
      Do you _REALLY_ think that typing 'emerge' is any different from typing 'apt-get' ????

      You're all just bloody whiners.

      A real wizard builds his binary toolchain by hand, and _ONLY_ as a 1st stage in bootstrapping his own handcoded / handhacked kernel. Apprentice wizards forgo the last part, though. But they start out from a VMS boottape.

      Now go and leanr something useful

      </crash and burn>

    55. Re:Gentoo? by Anonymous Coward · · Score: 0

      the updates i do weekly for my gentoo machines are done in less than an hour

      and i update the 64bit and 32bit environments together on that machine

      i do like the debian-kind of the distros out there, but my problem is that i often use packages, that are not available yet or are too new - those breaks the dependency archives of any binary-only distribution quite easily.

      with gentoo i can include those packages even without .ebuild files quite easily and announce there existence to the portage tools, too, with a simple add in /etc/portage ...

      and by the way - if you have to manage a whole farm of machines, it is very easy to generate the binaries for all machines on a dedicated server and then use that binary packages on all other machines, so you dont have to compile all over and over (as long as you keep the compile options general enough to serve all hardware needs), so this is not an argument against the time needed to compile 1000+ packages.

    56. Re:Gentoo? by ClamIAm · · Score: 1
      Nearly universal support for stack smash protection

      Why do I always think of the Hulk when I read this?

    57. Re:Gentoo? by littlem · · Score: 2, Insightful
      Well, since you compile the compiler as well as everything else. It does accumulate...
      That's hilarious - because you've compiled gcc with "optimized" use flags or whatever, thus making gcc 0.0001% faster, that means you can save literally microseconds every day of your Gentoo life, as gcc is constantly running, compiling all the other stuff that would run 0.0001% faster if the CPU wasn't constantly spending all its cycles running gcc... madness.
    58. Re:Gentoo? by fatphil · · Score: 1

      You're right.

      Anyone who says otherwise is an ill-informed.

      The only way increasing compilation speed would be useful is if build-from-sourcers swallow their pride and finally add up to
      the fact that compilation actually does take a large amount of
      CPU time. So much time, in fact, that the few% savings made in
      the programs used would take months or years to pay off.

      I count CPU cycles, as I use my machines as a compute farm.
      I spent very little time as a build-from-sourcer when I realised
      the savings were negative unless you want an OS that basically
      never updates.

      --
      Also FatPhil on SoylentNews, id 863
    59. Re:Gentoo? by sgbett · · Score: 0

      i found dispatch-conf to be far better than etc-update. It took some persistance though to get used to the interface, but ultimately i feel it paid off. It seems easier to manage merging with it imo.

      --
      Invaders must die
    60. Re:Gentoo? by nadamsieee · · Score: 1
      Next we have USE flags. These do strike me as an insanely useful thing. But I have one niggling little doubt: I suspect they only work for code that supports it. e.g. project foo has optional support for libbar. If the upstream/original code doesn't have a feature marked as optional I don't imagine the Gentoo people would rework it to strip it out.

      Almost all large programs have optional features; I suspect USE flags were a realization of that fact.

      As far as Gentoo devs reworking stuff, check out the KDE Split Ebuilds stuff. Instead of installing several monolithic KDE packages, you can now install just the KDE apps that you really want. That sort of splitting effort isn't the norm, but that is probably related to the fact that most large packages already have optional features.

    61. Re:Gentoo? by Arandir · · Score: 0, Offtopic

      Why is this flamebait? One of you crackhead moderators explain! I know that the Slashdot moderation system is broken, but this is ridiculous!

      --
      A Government Is a Body of People, Usually Notably Ungoverned
    62. Re:Gentoo? by NoMercy · · Score: 1

      I know I shouln't reply to my own topic, but after having 3 people also reply giving ideas for how to improve gentoo's etc-update, ther's one thing I forgot. Gentoo folk are far far more helpful than debians guys, even got a wiki full of useful information and guides, sometimes there guides are better than the projects own documentation.

    63. Re:Gentoo? by sycotic · · Score: 1

      I know that providing only just enough information as to allow people to construct their own interpretation of what you meant is quite trendy.. ..however, what the hell do you mean?

      Sure, you can get a Gentoo style of FreeBSD.. I am not sure you make any sense at all with how you proudly conveyed the fact though :)

      --
      -- If I were a fish, I'd be wet
    64. Re:Gentoo? by Anonymous Coward · · Score: 0

      I'll put down my crackpipe long enough to explain: gp's post was interesting and informative, while your sniping and pointless little response was indeed "completely tangental" to the topic at hand.

      If it looks like a troll, and smells like a troll, and walks like a troll, it must be Arandir.

    65. Re:Gentoo? by Anonymous Coward · · Score: 0

      The gp's post had nothing whatsoever to do with the post it was replying to. It's obvious you don't mod according to a posts contents, but according to the post's author.

    66. Re: Gentoo? by Azuma+Hazuki · · Score: 1
      I believe Gentoo is what you make of it. It's so powerful because it's a "meta-distribution," meaning you can start with the minimal, base system and then add to and tweak it to make it work for your particular needs. The fine-grained control Portage grants with USE flags, make.conf, and files like /etc/portage/package.keywords let you tailor-make a system so it does exactly what you want it to and nothing more. Conversely, they also let you hose your system royally if you don't know what you're doing with it.

      Put simply, Gentoo is not about speed. Not the way the "compiler ricers" would have you believe. Yes, the compiler can squeeze sometimes significant speed boosts out of the software if you pet it just so, but in my opinion if you want a stable system anything more than -O2 -march=(your arch) -pipe -fomit-frame-pointer is asking for trouble. It's the ability to start a minimum of services that does it (and rc-update is the best tool I've seen yet for this purpose). The real speed bottleneck in binary distros I can see is that so much is running by default; a very minimalist Debian should be able to perform nearly neck-and-neck with a sanely optimized Gentoo running the same apps and services.

      No, what does it for me is the control. Gentoo lets you control almost everything, and it makes you learn to use the command line to do it. The lack of GUI tools frightens some people, but the flip side of that is that Gentoo makes you learn how Linux works; by the time you've figured out how to make a potentially dangerous tweak, odds are you know what you're doing. An example is the kernel: you start with a stock Gentoo-patched kernel, but you're immediately able to download several patch variants and nothing at all stops you from going to kernel.org, grabbing a vanilla release and your favorite patches, and applying those. You might not know or be told you can do that, but if you do know you won't be stopped.

      Then there's the USE flags and the ability to mix stable and unstable packages. You're not tied to a bunch of "repositories;" there's ONE portage tree and you pick the fruit you feel like eating. Then, you prepare it exactly the way you want it. Want an "unstable" (~arch) version of a package? 'echo package-category/packagename ~arch >> /etc/portage/package.keywords' and then emerge it as normal. Want XMMS with ogg/vorbis support but not mp3? 'USE="-mp3 oggvorbis" emerge -av xmms.' Yes, you pay for his flexibility in compile time and in just plain needing to know more stuff, but to many people it's worth it.

      Now, Gentoo has its share of problems too. The same flexibility that allows for incremental updates and mixing stable/unstable packages can break a production server, where stability is the most important factor. etc-update is an ugly hack and even dispatch-conf isn't much better. And the build time for big packages is a killer on anything but a modern machine (though the GRP partly solves that).

      In this case, it's a question of using the right tool for the job. You could make Gentoo the "right tool" but in time-critical situations you just want something that works, and this is where Debian shines. Everyone knows the jokes ("Debian is old, and Debian stable is older than your computer/car/mother"), but the delay means Debian is mature and time-tested.

      You could run a production server on Gentoo (my friend does), but you'd have to be very strict about what gets updated when; making it a policy to do no updating but 'emerge sync && emerge -uD world' on the days a new release is announced, for example. In that situation I would rather run Debian stable, even if I have to go through the entire system with a fine-toothed comb and disable all the stuff I don't want that got installed anyway. You wouldn't use a surgical scalpel to cut a steak, so why use a distro whose focus is microscopic tweakability on a system whose purpose is uptime?

      --
      ~Eien no Inori wo Sasagete~ Searching for my Hatsumi...
    67. Re:Gentoo? by gullevek · · Score: 1

      well, safe. There is a plan to have a similar thing for security patches like in stable, but to be honest, I have no idea how far it is. The gnupg update was in testing ~4 days after the public announcment.

      But I never ever had any kind of security issue. Perhaps because I have enought firewalls and other security system in place to net come it that fare that one of my servers gets hacked ...

      I just prefer to be more up to date and so not run into any kind of dependency hell than being "perhaps" 100% secure.

      --
      "Freiheit ist immer auch die Freiheit des Andersdenkenden" - Rosa Luxemburg, 1871 - 1919
    68. Re:Gentoo? by SillySnake · · Score: 1

      A little late here, but I just metamoderated something from this topic..
      I started using Gentoo because I heard it was a good way to learn a lot about linux.. Turns out, it was a great way. I learned a lot about using the command line, different tools, editing config files, and much more. I went from trying to figure out how to change the wallpaper in my Mandrake install to compiling custom kernels in very little time. Granted, there have been some challeneges along the way with things not compiling, but all in all, I've learned a great deal.
      I hear they're moving away from some of the low level installs like I started out with however.. At least I learned while the learning was good :)

  2. Eh? by kassemi · · Score: 5, Insightful

    Was I the only one who found that this article didn't really shed too much light on whether or not you should compile your software from source?

    By the way, I know the benefits of compiling from source, but how this made slashdot, I don't know.

    --
    What the hell's a "gewie?"
    1. Re:Eh? by karearea · · Score: 1

      Very true, I find that a lot of articles about things like that give just enough information to confuse me. For the 'which is better' type thing, generally just sit on the fence and never really seem to have the balls to make a decision.

      Sometimes you just stumble on the one things that makes sense to you. Often I find there is not even a valid pro and con type summary at the end.

      Quite sad really when people can write these and not really say anything - good way to make a couple of $$ though!

    2. Re:Eh? by Anonymous Coward · · Score: 0

      They are competing with Digg for the most retarded stories to make it to the front page!

    3. Re:Eh? by larry+bagina · · Score: 1

      yeah... but digg stories aren't selected by paid editors.

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    4. Re:Eh? by Anonymous Coward · · Score: 0

      Was I the only one who found that this article didn't really shed too much light on whether or not you should compile your software from source?

      No, I also found the article to be very shallow and not worth the read...

      By the way, I know the benefits of compiling from source, but how this made slashdot, I don't know.

      Yeah, the article is not only fairly thin on actual info, it is poorly written and not spell checked!

      As for the question at hand, roll-your-own or use packages, I use a mix of both. I run AlphaCore 1 (Fedora Core 3 port) on a DEC AlphaServer 4100 and find my self having to roll-my-own more often than not for a number of reasons. Many of the pre-compiled packages have issues running on my system, probably because I have EV5 cpus and the binarys are EV56 or EV6 optimized. Plus even when the binary package does work I find that custom compiling for that system greatly improves performance and fixes bugs and glitches in some cases.

      How ever, on my x86 Fedora Core boxes I general try to use pre-compiled packages. It saves a lot of time and typically there is very little difference if you compile your own any way on this platform with most apps. The only exception is compiling with special options or plug-ins that have to be included at compile time and cannot be loaded in later on.

      I can see Internet server admins using the roll-your-own method more often than small office server and workstation admins. Internet daemons seem to have the most tweakable compile time options, examples such as PHP, MySQL, and Apache integration, security options, and optional modules. I think thats where most admins see the greatest benefit or need to roll-your-own. Office apps and what not tend to have little benefit from compiling your own vs. using pre-compiled packages. Or at least this has been my expeirence thus far...

      LONG LIVE THE DEC ALPHA!!! AlphaCore 1.0 Rules!!! ;)

      -Greg-

    5. Re:Eh? by littlem · · Score: 1
      Was I the only one who found that this article didn't really shed too much light on whether or not you should compile your software from source?
      No, you weren't the only one. The author seemed to be staggeringly ignorant about the subject he was writing about, and I find it hard to believe he got paid for writing it.
      By the way, I know the benefits of compiling from source, but how this made slashdot, I don't know.
      It's a subject that people feel passionate about, so posting it is likely to start a flame war? That's my guess.
  3. Other benefits by Rich0 · · Score: 4, Informative

    I have a feeling that this will turn into a general debian vs gentoo style debate, and we all have our preferences.

    The big benefits of precompiling are that you don't need to support 1500 different sets of libraries in your development environments, and that the package will generally work right with minimum fuss.

    The big benefits of source-based distros are the ability to tailor packages to each install (ie the ability to compile certain features in or out), to choose optimizations on each package (do you want -Os, -O2, -03, or are you really daring -> -ffast-math?).

    There are some things that cut both ways - often a given package can be compiled using one or more different dependencies and if you want this flexibility then source-based might work better. On the other hand, it also means that if you have 500 different users of your distor you have 495 different configurations and bugs that are hard to reproduce.

    As for me - I like source-based. However, if I had to build a linux email/browser box for a relative I'd probably use Debian stale...er...stable. The right tool for the right job.

    1. Re:Other benefits by Sentry21 · · Score: 2, Interesting

      The big benefits of source-based distros are the ability to tailor packages to each install (ie the ability to compile certain features in or out), to choose optimizations on each package (do you want -Os, -O2, -03, or are you really daring -> -ffast-math?).

      In some circles (e.g. #mysql on Freenode) this is considered a Bad Thing. Users come in on Gentoo systems complaining about how 'Unstable' MySQL is. Did they compile from source? Yes. Did they compile from official source? Yes. What EXACTLY did they do to compile from official source? 'I just did "emerge mysql"'

      The result is that the user's CFLAGS, Gentoo's patches/defaults, and so on, end up with a binary that is quite a bit different from the stock MySQL install, and it's not terribly surprising to me that the only 'unstable' MySQL situations I've seen are on Gentoo (which is not to say others don't occur).

      Another issue with compiling from source is libraries. Even on Debian (with manual compiles by my predecessor), I've seen situations where I'll compile Apache 2 against libssl, but then a few updates later, I'll recompile PHP or curl, which will pick up a new version of libssl - resulting in hard-to-diagnose incompatibilities. The simplest solution I could find was to move the whole system over to complete debianisation, moving the manual Apache compile, configs, etc. over to the Debian package version. The result? Other pakages knew what was installed, I could be guaranteed of consistent compilation options (since I had no easy way to find out how Apache was compiled previously), and so on.

      Binary packages for the win.

    2. Re:Other benefits by Arandir · · Score: 1

      The result is that the user's CFLAGS, Gentoo's patches/defaults, and so on, end up with a binary that is quite a bit different from the stock MySQL install, and it's not terribly surprising to me that the only 'unstable' MySQL situations I've seen are on Gentoo (which is not to say others don't occur).

      How is this any different from SuSE, Fedoria, Debian, etc? Hardly anyone has a "stock" MySQL with zero patches and just exactly the same libraries linked in as the developers do. One distro has a bug fix included and another doesn't while a third installs to a non-standard location. Even worse a fourth distro has the temerity not to use this week's libssl! What is a tyrannical developer to do?

      If you don't like it, then it's time for YOU to start shipping binaries. Because once you have source code, you cannot control how it gets built. That's one attribute of this thing called "Free Software."

      If there are certain compile flags we should not use, then TELL US in your documentation. That might solve many of your Gentoo "problems". But don't bitch that we're not running exactly the same binary, bit for bit, as you are. That's asinine.

      --
      A Government Is a Body of People, Usually Notably Ungoverned
    3. Re:Other benefits by rjstanford · · Score: 1

      How is this any different from SuSE, Fedoria, Debian, etc? Hardly anyone has a "stock" MySQL with zero patches and just exactly the same libraries linked in as the developers do. One distro has a bug fix included and another doesn't while a third installs to a non-standard location. Even worse a fourth distro has the temerity not to use this week's libssl! What is a tyrannical developer to do?

      Well, first of all, with the distros, you're talking about 15-20 different binaries, not thousands. Second, the distros will have - or at least should have - tested their versions pretty well, at least as far as the major stuff like MySQL goes. Third, they can provide frontline support - if it turns out that one of their "custom" settings caused a problem, they fix it once and it gets pushed out to all of their users. None of this applies to Joe Average who compiles it (strangely, thanks to their settings) from source and then doesn't know what to do when it doesn't work.

      Building from source only really gives you advantages if you know how - and are willing - to dip into that same source when there's an issue.

      --
      You're special forces then? That's great! I just love your olympics!
    4. Re:Other benefits by mrsbrisby · · Score: 0

      The big benefits of precompiling are that you don't need to support 1500 different sets of libraries in your development environments, and that the package will generally work right with minimum fuss.

      No. The benefits of sharing a binary is greater than that. You get to take advantage of all the QA the packager has done, and all the QA everyone else using that package has done.

      Libraries aren't even related.

      The big benefits of source-based distros are the ability to tailor packages to each install (ie the ability to compile certain features in or out), to choose optimizations on each package (do you want -Os, -O2, -03, or are you really daring -ffast-math?).

      No. There are no benefits to source-based distros. Or if there are, it's not because they're "source-based".

      There are however, numerous drawbacks: They're slower, they have a QA-size of one, and they waste time, just to name a few.

      For what it's worth: I have no problem "tailoring" binary packages for other distributions, and its helpful that other people have tailored them the same way- I get the ability to turn on or off certain compile-time flags, while still taking advantage of a large QA pool.

    5. Re:Other benefits by dhasenan · · Score: 1

      The benefit of a source-based distribution is that ./configure is executed, not just make; so the end user has a much larger set of options in configuring a package.

      The benefit of a binary distribution is that the package maintainer only has to make sure that ONE configuration actually works, and only has to create one set of options for it.

      In order for a binary distribution to maintain the same number of options, it would have to store a much larger library of binary packages, though it could present an identical interface to the end user. In order for a source-based distribution to maintain that number of options, however, the maintainer has to set the correct options for the correct USE flags and set up dependencies for each configuration (most likely, one set of dependencies for each USE flag, and just do union for multiple flags).

      Yes, a binary distribution can use plugins and binary patches, but plugins require that the application be created in a particular manner. Binary patches are close to the same functionality, I believe, but correct me if I'm wrong.

      So it's a question of storage versus number of options, and for that, source seems to be most efficient.

      Still, the time spent compiling is quite annoying and may offset any other advantages presented by using source packages rather than binary packages.

      I use Gentoo because I like the package manager more than anything else. And getting a system that has a complete GNU toolchain--autoconf, automake, so forth--by default; that it has little else until I install it; and its init system. It's hella annoying to wait for packages to compile, though.

    6. Re:Other benefits by Anonymous Coward · · Score: 0

      > If you don't like it, then it's time for YOU to start shipping binaries. Because
      > once you have source code, you cannot control how it gets built.
      He never wanted to control how it gets built. He's just saying it's a problem when he tries to troubleshoot bugs in MySQL. Besides, it's not like if upstream provided binaries Gentoo users will cease compiling from source -- or do you mean to stop distributing source code?

      > But don't bitch that we're not running exactly the same binary, bit for bit, as
      > you are.

      The guy was complaining that Gentoo users go to the #MySQL channel to bitch. I don't think that's an unreasonable complaint. Of course you may think that the MySQL developers have a duty to make sure the stuff works in every single possible weird compile flag, notwithstanding custom patches made by Gentoo maintainers. But then there's a reason why most distros stick to a simple -O2 and not that -O9 -ffast-math -funroll-loops : you risk breaking things in weird ways.

      > If there are certain compile flags we should not use, then TELL US in your
      > documentation.

      Anything except -O2?

      Sheesh. Quit bitching. I'd mod you troll if I had the mod points.

    7. Re:Other benefits by Anonymous Coward · · Score: 0

      The benefit of a source-based distribution is that ./configure is executed, not just make

      Hahahaha, what? That's the exact sort of totally clueless comment I was expecting to see in a thread where someone mentioned Gentoy. Go back to your playpen kid.

    8. Re:Other benefits by Arandir · · Score: 1

      We're not talking about thousands of different binaries. We're talking about a plain simple "emerge MySQL". If MySQL is so fragile it can't handle that, then it's time for Postgres to step to the fore.

      I am not a Gentoo user. But I do use a source based system (FreeBSD), and it's aggravating to think that I won't get support *merely* because I am not using a binary package. The attitude of MySQL developers to automatically blow off all Gentoo users is amazingly arrogant.

      --
      A Government Is a Body of People, Usually Notably Ungoverned
    9. Re:Other benefits by Wonko · · Score: 1

      We're not talking about thousands of different binaries. We're talking about a plain simple "emerge MySQL". If MySQL is so fragile it can't handle that, then it's time for Postgres to step to the fore.

      I don't think anyone is saying that it is unsafe to build MySQL from source. I think they are saying that it is just less stable when compiled with optimizations that are too aggressive. Plenty of software suffers from this problem.

      I have no experience with Gentoo, so I can't make a statement as to the stability of a default install of MySQL in that environment. However, at the very least I would expect Gentoo's packaging system to be smart enough to not apply incompatible flags to packages it is building. As a user, I shouldn't have to know that MySQL doesn't work right with -O3. Is there a way to tell Gentoo something like "use -O3, but only if it is probably safe?"

      Someone said this would turn into a "Debian vs Gentoo" debate. I happen to be on the Debian side of the fence, and I certainly won't argue that everything should be pre packaged. If you run a busy database or web server you will definitely see a noticable improvement if MySQL/PostgreSQL or Apache are optimized for your architecture. You don't need Gentoo for that, though. It is quite easy to compile your own packages from source (I don't like to install anything on my machines without making it a .deb first).

    10. Re:Other benefits by rjstanford · · Score: 1

      You said:

      We're not talking about thousands of different binaries. We're talking about a plain simple "emerge MySQL".

      But from my post's grandparent:

      The result is that the user's CFLAGS, Gentoo's patches/defaults, and so on, end up with a binary that is quite a bit different from the stock MySQL install, and it's not terribly surprising to me that the only 'unstable' MySQL situations I've seen are on Gentoo (which is not to say others don't occur).

      So with CFLAGS, USE settings, etc, we could well be getting into thousands of different possibilities. I would put FreeBSD's ports approach at the same level as any other distro's binary release for the stability purposes of this discussion.

      --
      You're special forces then? That's great! I just love your olympics!
    11. Re:Other benefits by Arandir · · Score: 1

      But from my post's grandparent:

      But the immediately preceeding sentence to your quote:

      I just did "emerge mysql". My assumption was, and still is, that the user merely did an "emerge mysql", WITHOUT any special optimized USE flags, CFLAGS, etc.

      But regardless, if there are USE strings or CFLAGS that are inappropriate for use with MySQL, then the solution is to fix that particular emerge script, and NOT to blame the user.

      --
      A Government Is a Body of People, Usually Notably Ungoverned
  4. Advantages to both by EggyToast · · Score: 4, Insightful
    Sure, compiling your own sometimes results in a more efficient binary, but it's also a great way to make sure you have all the dependencies for whatever you're installing.

    Conversely, if programmers sufficiently document their binaries, that's not as much of a problem. URLs for other binaries, or instructions for checking/compiling dependencies, can speed up that process.

    Of course, binaries are a huge advantage to non-experts and beginners, who just want a program to be there. They don't care about maximizing efficiency, they care about getting their work/fun done.

    So really, it entirely depends on the application. For programs that are typically for the hardcore programmer/user crowd, source-only makes sense -- those people who use the program are going to know how to compile and check everything already. But for programs like, say, a CD burning program? I definitely think both should be provided, and installation for both should be well documented. Given how easy it is to provide a binary, even if it's "fat," there's no reason why a more popular program can't provide both versions.

    1. Re:Advantages to both by Short+Circuit · · Score: 1

      Or you just run Apt (for either Debian or RPM-based distros), and it takes care of your dependency issues for you.

    2. Re:Advantages to both by Geekboy(Wizard) · · Score: 1

      except when apt decides to delete all of your kernels when you upgrade a text editor.

      (no joke, upgrade 'nano', and keep an eye on the dependancies)

    3. Re:Advantages to both by Tony+Hoyle · · Score: 1

      I call bullshit.

      tmh@sisko:~$ apt-cache depends nano
      nano
          Depends: libc6
          Depends: libncurses5
          Suggests: spell
          Conflicts: nano-tiny
          Conflicts:
          Replaces:

    4. Re:Advantages to both by Geekboy(Wizard) · · Score: 1

      try actually doing it. I've had it happen to me (and several other people I know) several times.

    5. Re:Advantages to both by rebelcan · · Score: 1

      Do any of the kernels avaliable to apt rely on libc6? If you had an older kernel that relied on an older version of libc, then is it possible those would be uninstalled? Or would that take an "apt-get dist-upgrade"?

      As far as preferences go, I'm a debian guy. But occasionally I'll compile something from source ( like MPlayer ), even if I don't get very many benifits asides from a higher version number.

      --
      God is dead -- Nietzsche
      Nietzsche is dead -- God
      Zombie Nietzsche lives! -- Zombie Nietzsche
    6. Re:Advantages to both by Col.+Bloodnok · · Score: 1

      Sure, compiling your own sometimes results in a more efficient binary, but it's also a great way to make sure you have all the dependencies for whatever you're installing.

      Yes, for your workstation, perhaps. As long as you don't plug it into my network. Did you audit that code before you compiled it? Did you document that audit?

      People with experience of implementing any OS in a mission critical, change control environment will be rolling their eyes.

      Of course, binaries are a huge advantage to non-experts and beginners, who just want a program to be there. They don't care about maximizing efficiency, they care about getting their work/fun done.

      You seem to be confusing the process of application performance tuning, with the process of compiler flag tweaking. The former is usually done with an understanding of the behaviour of the application with regard to the published OS interfaces. The other tends to be an iterrative process with unpredictable results.

    7. Re:Advantages to both by beermad · · Score: 1

      The effort involved in compiling a lot of programs isn't justified by the benefit from doing it, but where you've got a program that's very CPU-intensive (perhaps audio editing software like Audacity) or that's fundamental to your system (like the kernel) then compiling with optimisations for your specific processor can make a huge difference.

      A couple of years ago, I timed how long it took GWC to clean-up a 15 minute audio sample before and after optimising my kernel; with the Mandrake-supplied kernel it took 1 minute 30 seconds. After optimising my kernel the same task took 32 seconds.

      Funnily enough, I always recompile my own kernel...

    8. Re:Advantages to both by Wonko · · Score: 1

      Do any of the kernels avaliable to apt rely on libc6? If you had an older kernel that relied on an older version of libc, then is it possible those would be uninstalled? Or would that take an "apt-get dist-upgrade"?

      Yes, that would require a dist-upgrade. At least with Debian, I have no experience with apt and RPM based distros. I imagine it would be possible to define the package dependencies in a way that would make it think your system doesn't require a kernel... I don't think it could happen with Debian, though (unless they were trying something REALLY out there in unstable :p).

    9. Re:Advantages to both by Methuseus · · Score: 1

      I've had Mandrake randomly delete all the kernels in my /boot partition randomly when I install Mozilla or mplayer or something completely harmless.

      --
      Two things are infinite: the universe and human stupidity, though I'm not yet sure about the universe. - A Einstein
    10. Re:Advantages to both by Wonko · · Score: 1

      I've had Mandrake randomly delete all the kernels in my /boot partition randomly when I install Mozilla or mplayer or something completely harmless.

      Thank you, I think you've helped back me up. I am assuming you were using apt? Apt can only be as good as the dependencies listed in the packages. When I moved from RPM based distros to Debian 6+ years ago I was very impressed with how much better things were in practice. At the time I had assumed it was because apt rocked. When RPM distros got apt I assumed Debian would lose its big advantage. It sounds like Debian's advantages weren't completely lost, just reduced.

    11. Re:Advantages to both by Methuseus · · Score: 1

      IT was only a few years ago, and if I understand your meaning, yes it would have been apt-like in that it checks dependencies and all that. If not, sorry but I'm not sure what you're referring to.

      --
      Two things are infinite: the universe and human stupidity, though I'm not yet sure about the universe. - A Einstein
  5. Don't waste your time. by jrockway · · Score: 4, Informative

    Recompiling software gets you almost nothing. Maybe 10% more performance, at the very maximum.

    There are special cases like when you want to use dynamic libraries instead of static (to save memory), or when there's a major architecture change (PPC -> x86 for Apple). In those cases you'll gain something.

    Another case is rewriting your program to use CPU-specific instructions, like Altivec or SSE3. That, in certain circumstances, will speed up your program.

    But if you're compiling OO.org or Mozilla because you think your 686 version will be 100% faster than the 386 version, you're wrong.

    --
    My other car is first.
    1. Re:Don't waste your time. by WilliamSChips · · Score: 1

      My Gentoo system is less cluttered with packages than any RedHat-type system will ever be, and less cluttered than most Debian-type systems with a similar amount of software. Because, if I don't want to have to use, say, aspell(which acts mostly as an annoyance due to the fact that my spelling is usually quite good and I read over my posts), I just put it as a negative on my USE flags(Actually, the flag is 'spell', but you can find out what USE flags a package uses with emerge --verbose). That's the real bonus of compilation.
      But OpenOffice.org, due to being the only package on my computer(currently a 900MHz Duron, although that might change in the near future) that takes over 24 hours to compile, is installed as a binary on my Gentoo system.

      --
      Please, for the good of Humanity, vote Obama.
    2. Re:Don't waste your time. by SeeMyNuts! · · Score: 1

      "Recompiling software gets you almost nothing. Maybe 10% more performance, at the very maximum."

      Beyond that, I ran into a problem once when using some very tempting compiler flags and broke the application. These problems are generally due to very difficult-to-crack bugs in the application or the compiler (or just my bad luck), which is why I just ended up not bothering. Nearly everyone should just use -O2 like the packagers use and be done with it. That way, it's more likely that more than one person in the universe can duplicate the problem and find a resolution that benefits everyone and doesn't waste valuable developer time.

    3. Re:Don't waste your time. by Anonymous Coward · · Score: 1, Insightful

      I tried it. A fully-compiled-from-scratch gentoo box (oh jesus what a goddamn pain in the ass that was) gave me about 2-4% faster performance on a large build (lots of sh + javac). Whoopee. Totally not even close to being worth the DAYS it took me to set up. Maybe it's worth it to some people, but chances are that if your software running 3% faster is worth days of your time, you've already optimized it out the wazoo.

      And it's been posted before, but http://funroll-loops.org./

      ps: you can make Debian do the same thing, you just don't have the USE flags.

    4. Re:Don't waste your time. by bheading · · Score: 4, Insightful

      Recompiling software gets you almost nothing. Maybe 10% more performance, at the very maximum.

      Nonsense. Recompiling the same code provides a 0% performance improvement, because it produces an identical result. Most packages I have seen on Linux distros are compiled with -O2 or -O3. It is highly unlikely that the various other switches provided by GCC will provide anything significant. The trouble with the debate is that nobody has properly researched this and attempted to gather hard evidence showing the improved performance that is allegedly gained.

      A system administrator's job will be on the line if a system crashes due to instability caused by compiling code with different compiler flags than those provided by default by the author or vendor; and in any case the performance improvement will be less than the likely improvement which may be gained by spending a few $K on a faster box with more CPUs. If I were an employer looking for a sysadmin I'd root out the Gentoo fans, the overclockers, the tuners and the tweakers right off.

    5. Re:Don't waste your time. by 0xABADC0DA · · Score: 2, Interesting

      Most programs may get an average speedup of 10%. But if the speedup happens in something critical you get a massive speed increase. I was using the resynth plugin in gimp to remove some text and fill it in with the background texture (interpolated). The difference between running it on gentoo linux and that of pre-compiled windows version was over 4x. Depending on the image size it can easily run for hours. Now that's not typical, but on the other hand I didn't do anything special on linux to get this speedup, it just happened because gentoo compiled it from source. I only discovered it because the difference was so huge.

      But sometimes the results are contrary to expectations though. For instance, unless you set up the filesystem carefully over time the mess of files that is portage and the temp files from compiling will scatter programs all over the fs, making the system much slower to use than a binary distro like ubuntu.

    6. Re:Don't waste your time. by Cal+Paterson · · Score: 1

      If I were an employer looking for a sysadmin I'd root out the Gentoo fans, the overclockers, the tuners and the tweakers right off.

      You know, a gentooer/oc'er/tuner/tweaker isn't going to be stupid and run gentoo for something important. They kinds of people often have the kind of in depth technical knowledge of hardware and software that really do help. There's nothing wrong with using gentoo on workstation/desktop machines; it's very good for this with nice flexibility. I know a couple of overclockers who are very into cpu cycles and their other stuff, but they still run their webserver on p3's with Debian and FreeBSD.

      This kind of attitude could be a reason you're not an employer.

    7. Re:Don't waste your time. by Anonymous Coward · · Score: 0

      The problem is that it's hard to weed out fanboys from pro's in the Gentoo community, because like the Debian community before it many are plain zealots. If I were hiring, I'd want pro's that can admit their fav tool can't hack it, not some zealot who'll give me the runaround and waiste my time & $$$

      Just look at sites like netcraft to see how many people do run gentoo for things like websites etc, even companies. Kinda scary IMHO....

    8. Re:Don't waste your time. by ObsessiveMathsFreak · · Score: 1

      Most packages I have seen on Linux distros are compiled with -O2 or -O3. It is highly unlikely that the various other switches provided by GCC will provide anything significant.

      Mostly because said switches are included when the main optimisation switches are provided.

      --
      May the Maths Be with you!
    9. Re:Don't waste your time. by Zephiria · · Score: 1

      Like another person said.
      Problem with weeding them out is that your effectivly getting rid of the guys who ENJOY reading up on new things and learning new stuff, so long as the work machines are fine let them tweak and play away they might even come up with usefull helpfull things for your production/work machines.

    10. Re:Don't waste your time. by Anonymous Coward · · Score: 0

      So, you tried Gimp on Windows and on Gentoo, and you figure it out that the performance difference is caused by optimization flags? It's not because Gimp is not natively developed on Windows, or maybe because some kind of problems are recurrent on windows (eg. memory management and swapfile algorithms, dynamic process queuing, etc), or just because windows is quite different from his unix counterparts? So, if you install cygwin, and then build Gimp with the same flags you used, it should run as fast as on Gentoo, right? Think about it.
      Oh, and don't forget to uninstall all the cpu-hungry stuff usually found on windows, like AV tools, crappy usb devices (adsl modems are a fine example), crappy wireless cards, etc.

    11. Re:Don't waste your time. by bheading · · Score: 1

      You know, a gentooer/oc'er/tuner/tweaker isn't going to be stupid and run gentoo for something important.

      I made a mistake by generalizing about Gentoo users, but now I feel OK because you also made a generalization :)

      It depends what your definition of "stupid" is. I think investing in an expensive cooling system and causing a potential fire hazard through overclocking fits the definition quite well. The days of the SL98A Celeron 300As are long gone.

      There's nothing wrong with using gentoo on workstation/desktop machines; it's very good for this with nice flexibility.

      Flexibility I can buy, but I have serious doubts about the sanity of people who think that compiling the code themselves adds anything whatsoever to their user experience.

      This kind of attitude could be a reason you're not an employer.

      I don't know any employer who would want l33t script kiddies running their critical production boxen, I'm afraid.

    12. Re:Don't waste your time. by bheading · · Score: 1

      Mostly because said switches are included when the main optimisation switches are provided.

      Try telling them that on the Gentoo forums.

      BTW it's a royal pain in the arse the way the GCC documentation on this matter appears to be somewhat inaccurate; the list of optimizations turned on with each level of -O doesn't seem to be correct, at least on the 3.3.x versions I tried.

    13. Re:Don't waste your time. by ljkopen · · Score: 1
      > Recompiling the same code provides a 0% performance improvement...

      Your argument ignores the fact that the Intel C++ Compiler (icc) provides quicker execution times for many sets of code. It even has been found to speed up execution times Athlon processors.

      > A system administrator's job will be on the line if a system crashes due to... overclockers, the tuners and the tweakers.

      This is why I test things before they are moved into a production environment and never overclock, and may sometimes underclock. However I do tune and tweak. But my definition of tuneing and tweaking may be different from yours.

      NOTE: I think it was three+ years ago that I began to use Gentoo. My main reason was that mplayer "just worked" with any video format I gave it. I set up the use flags, and didn't have to "find" a secondary site to support windows or quicktime codecs. It was already there. Over time... anything else that I decided I needed was "already there".

      I havn't shoped for another distribution since. I havn't had the need. Maybe someday. But not since three years ago.

    14. Re:Don't waste your time. by Anonymous Coward · · Score: 0
      "Recompiling the same code provides a 0% performance improvement, because it produces an identical result"
      It doesn't produce an identical result. Do a SHA-1 hash sum on 2 binaries from the same source, one compiled with the minumum flags needed to compile and the other with the minimum plus, say, architecture-specific switches for your target arch. The binaries will be different. I once did a speed test using a PI number generator. After each run I recompiled the program with extra optimization and architecture-specific flags for my machine. As I kept on optimizing, the time spent to produce the same number of digits of PI decreased until I ended up with a binary that ran in HALF the time that the original, vanilla binary did. As for whether or not this kind of thing *should* be done for a given program, that depends upon one's target environment, purpose, expected gains, etc. And that's best left to another discussion. As for myself, I go with both pre-compiled binaries _and_ source compiles. Why? Sometimes a piece of software is only available as a source package. Sometimes the available binaries don't have the features that I need. Sometimes I've downloaded a 3rd-party piece of software whose dependencies cannot be satisfied with any pre-compiled packages that are available for my system. Sometimes I want only a static binary for emergency situations when I don't have the shared libraries available to me. Sometimes an exploit exists for a package and my upstream provider has not released a fix in a reasonable amount of time. There are numerous reasons. If I have the choice, I stick with pre-compiled packages. But there *are* cases when it makes sense to roll one's own binaries. One recent example that comes to mind is when I recently installed Subversion. The most-recent version of Berkeley DB that was available for my OS was not 100% compatible with Subversion and would possibly have introduced instability if I had not chosen to compile my own version of BDB. So your point that rolling one's own binaries can result in a relative increase in instability does not apply 100% of the time. As with most things, it depends. And that's all I have to say about that.
    15. Re:Don't waste your time. by Spoke · · Score: 4, Interesting
      Most packages I have seen on Linux distros are compiled with -O2 or -O3. It is highly unlikely that the various other switches provided by GCC will provide anything significant.
      Besides the obvious -O parameters to gcc, specifying the arch of the platform (-march=i386 for example) can sometimes have a decent effect on performance. A lot of distributions compile for the most common platform which usually means specifying -march=i386 -mtune=i686. That gets you binaries that run on any i386 or better, while tuning the code for i686 machines. If you're running an older processor or something like a VIA or AMD cpu, often compiling with -march=c3-2 or -march=athlon64 or whatever specific CPU you're running can provide a noticable benefit, especially on newer versions of gcc.
    16. Re:Don't waste your time. by scotch · · Score: 1
      My Gentoo system is less cluttered with packages than any RedHat-type system will ever be, and less cluttered than most Debian-type systems with a similar amount of software

      Congratulations - who fucking cares? Do you get some special value out of your computer when it is "uncluttered"? "Oh my god, my box is so lean - no aspell". Wow, one less thing that won't keep you up at night stressing. Do you have a lack of disk space or something? Even "cluttered" distros like RHEL/Fedora are only going to use 5 or 10 gigs of space if you select just about every package available. For $40 you can get a 100 gig drive these days. Of all the things that make a distribution good (e.g. control, upgrading, maintenance, support, package availablility, security, etc) - cluttered or not doesn't even show up on the list except for some very niche uses.

      --
      XML causes global warming.
    17. Re:Don't waste your time. by L.Bob.Rife · · Score: 1

      Nonsense. Recompiling the same code provides a 0% performance improvement

      It is highly unlikely that the various other switches provided by GCC will provide anything significant.

      The problem with your argument is that processors have improved since the 386. Not just more MHZ and GHZ, but actual design improvements, and better ways to execute code. If you compile for a 386 (which most distros do), you dont get to take advantage of those new subroutines inside the processor that an athlon uses. Sure the Athlon can use 386 code, but time has in fact improved some of the ways processors work, and it needs differently compiled code to do that.

      A system administrator's job will be on the line if a system crashes due to instability caused by compiling code with different compiler flags than those provided by default by the author or vendor;

      Heres the crux of the argumnet: stability vs configurability. You are making the assumption that stability is more important, when this is not true for all sysadmins, or servers.

      If I were an employer looking for a sysadmin I'd root out the Gentoo fans

      Why do you think that if code is compiled locally its inherently unstable? Debian package builders don't have a magical gcc which makes code crash less than my gcc.

    18. Re:Don't waste your time. by Wdomburg · · Score: 1

      How is that different from unselecting aspell when installing a binary distribution exactly?

    19. Re:Don't waste your time. by Wdomburg · · Score: 1

      s/isn't going to be stupid/isn't necessarily going to be stupid/

      There are plenty of people who are plenty stupid enough to do this sort of thing. I knew one person who's documentation for building a web server started with checking out CVS versions of various packages.

    20. Re:Don't waste your time. by Anonymous Coward · · Score: 0

      Yes I recompiled the linux gimp plugin with normal -O for generic pentium and it was similar speed to Windows version. Compiling for your hardware can make a huge difference. Either compile from source or get over the fact that your programs are significantly slower, but cut out the crap.

    21. Re:Don't waste your time. by gbjbaanb · · Score: 1

      Why do you think that if code is compiled locally its inherently unstable? Debian package builders don't have a magical gcc which makes code crash less than my gcc.

      Not that local compiled code is unstable, but it is less stable than a binary package. (* big difference).

      The guy who compiles a binary for me (and everyone else) has it tested on thousands of machines, if there is a bug in his compile switches or *anything*, it will be found and fixed once. With a locally compiled version, I end up finding the bug first (and everyone else who compiles it too) and we reproduce the effort of working with the bug a hundredfold.

      I refer particularly to my recent experiences with compiling a custom apache for a webserver control panel (one that has a good rep for reliability). In this case, compiling PHP 4.4.2 on my 64-bit box didn't work due to issues with compiling Pear. An rpm for this would have been a drop in and go issue, and I would have saved myself several hours compiling and reverting to the old version.

      For some things, compiling is a good idea. But for many, many packages, especially very widely popular packages (such as Apache for instance), then binary distribution is definitely the superior solution. (doubly so with Apache and its loadable modules).

      The performance issue, BTW, is another bit of FUD in this issue. All the binary packages I use come in several varieties for different platform, SMP, and processor varieties. Unlike Windows where you get the x86 version built with 'blend' processor options, the package builders compile in a sandbox with the different processor flags set so I get to install a 64-bit SMP version every time.

    22. Re:Don't waste your time. by WilliamSChips · · Score: 1

      Dependencies.

      --
      Please, for the good of Humanity, vote Obama.
    23. Re:Don't waste your time. by Cal+Paterson · · Score: 1

      I made a mistake by generalizing about Gentoo users, but now I feel OK because you also made a generalization :)

      How did I? There is a level of general knowledge about Unix needed to run to gentoo, and there is a level of knowledge gained from using it. It's the same as many other things, skills learn from one activity translate to others.

      Flexibility I can buy, but I have serious doubts about the sanity of people who think that compiling the code themselves adds anything whatsoever to their user experience.

      Compiling the code yourself does mean flexibility. You can control exactly what libraries you link to, what kind of things you put in, ectera. It can mean an improvement in the user experience; you're not stuck to any maintainers decisions about what to link to, how to do it etc. You get more flexibility when you do something by hand. Whether that is offset by unpredictable problems depends on what you're using it for.

      I don't know any employer who would want l33t script kiddies running their critical production boxen, I'm afraid.

      Using the term "l33t script kiddies" to you basically trying to infer that gentoo users are malicious crackers. In your foolishness in trying to work in a particular phrase, you've forgotten that it has nothing to do with the topic at hand! Whoops! Try to include some kind of relevant closing statement in your inevitable reply to this! Even better, why not use the following phrase in your reply; it represents your arguement well:

      "Gentoo users are idiots! If my company thought I was competant enough to recruit staff (which they don't, for some reason probably related to my incompetance/inability to objectively discern between use for fields of endevour/use of sterotypes when relating to sections of the canditate pool (even though I've never actually interviewed anyone!) I would surely discriminate against anyone who took any interest in using their computers in specific ways, or used a particular distribution I deemed to be stupid.

    24. Re:Don't waste your time. by Wdomburg · · Score: 1

      And if the applications you're installing depend on aspell, you'll need to install them whether it's binary or source. Unless it's an optional dependency and you want to build a version with crippled functionality on purpose for a dubious space saving or performance gain.

  6. As usual, the answer is... by Sensible+Clod · · Score: 3, Insightful
    it depends.

    If the time required to compile (plus trouble) is less than the time/trouble saved through performance gains (assuming you actually compile it correctly to get said gains), then compile. Else download and install.

    But then again, if you just have a lot of time on your hands, it doesn't really matter what you do.

    --

    The difference between spam and poop is that you don't have to dig through septic tanks looking for real food. -- Me
  7. In the old days... by __aaclcg7560 · · Score: 1

    I used to that when I first got into Linux so many years ago when a lot of hardware wasn't supported or you need to add some special parameters. These days, with the latest distributions, I don't have to do anything special since everything is recognized and supported. In fact, I don't remember how to compile the source anymore. At 36, I must be getting old.

    1. Re:In the old days... by Anonymous Coward · · Score: 0

      yeah, at 37 the fun of beating X into submission, the kernel into submission and optimizing the heck out of somethin inconsequential is just fading away.

      Maybe that's an ask /. question in itself. After you have been around the block enough times to have seen most everything once how do you keep on going around? I mean, what is really surprising out there -- something that leaves you amazed, not saying "yeah you could do that." I guess this is why I think innovation is dead in the current computer universe.

    2. Re:In the old days... by Anonymous Coward · · Score: 0
      On the flip side, the computers are now fast enough that it's no big deal to rebuild your own either.


      What we do here is - all the components where our product has version dependancies(postgresql, apache, some kernel modules) we build them mostly so we can insure the same version across OS's. For the rest (dns, etc) we use the pre-built ones.

    3. Re:In the old days... by __aaclcg7560 · · Score: 1

      This thread might give you some ideas on the current state of being over 30 in the software industry. The question comes up every now and then. For me personally, learning to program on the Mac is a new challenge. Most of my friends are amazed that I haven't touched my PC in the last month since I got the Mac Mini.

  8. TEN PERCENT! by LeonGeeste · · Score: 5, Insightful

    In my field, ten percent is everything. If I could increase performance by ten percent, I'd get a 100% bonus for the year. My servers need to handle so much data and are always backlogged (and adding more on is exensive!) Don't trivialize ten percent.

    --
    Rank my idea: http://www.sinceslicedbread.com/node/531
    1. Re:TEN PERCENT! by SWroclawski · · Score: 0, Troll

      You'd get 100% bonus for a 10% speedup?

      And they don't have the resources to decrease the server load from over 100% (it's over 100% since you said you're backlogged) ?

      What happens when a server dies? It just gets worse?

      Also, are you counting the time in your overhead in that "time saving" 10%? Would you get your 100% bonus if you now had to spend 20% of your time on this 10% speed increase?

    2. Re:TEN PERCENT! by Gulthek · · Score: 1

      The bonus would be for getting a 10% speed increase without buying new hardware!

    3. Re:TEN PERCENT! by LeonGeeste · · Score: 1
      You'd get 100% bonus for a 10% speedup?

      Yes. Go learn marginal analysis.

      And they don't have the resources to decrease the server load from over 100% (it's over 100% since you said you're backlogged) ?

      Yes, getting more servers for our particular application is extremely expesive, with the security precautions that have to be taken.

      What happens when a server dies? It just gets worse?

      You betcha.

      Also, are you counting the time in your overhead in that "time saving" 10%?

      Yes.

      Would you get your 100% bonus if you now had to spend 20% of your time on this 10% speed increase?

      Hell yeah, that 10% gain will do a lot more good than I can do with 20% of my time!

      --
      Rank my idea: http://www.sinceslicedbread.com/node/531
    4. Re:TEN PERCENT! by pclminion · · Score: 0, Flamebait
      Don't trivialize ten percent.

      If you could boost performance by 10% by tweaking some compiler settings, you would have done so already (and a task so simple would not be worth a 100% pay raise). So your example is inapplicable to the argument.

    5. Re:TEN PERCENT! by ashridah · · Score: 1

      So let me get this straight, you intend to spend the rest of your life compiling software yourself, fiddling with flags, in order to POTENTIALLY gain 1% -> 10% (and I find the figure of 10% both ludicrous and without any basis in fact, particularly given previous benchmarks.)?

      You do realise that, since you claim to be backlogged, in the short term the backlog is going to drastically increase since you'll be wasting time and resources compiling stuff, right? That's one hell of a gamble.

      Besides, if you're running a server farm to do sensitive processing, do you really want some USE flag potentially screwing over your ability to debug your application? That's what things like -fomit-frame-pointers, or whatever it is, does in order to reduce ram usage.

      I really REALLY doubt that recompiling an entire operating system for 'better performance' is going to make anything like the differences the ultimate parent has raised, unless your bottleneck comes from the floating-point performance of bash or something :).
      I'd be more inclined to get some benchmarks of the application doing the processing, and looking at ways to increase throughput by reducing the effort in the common path and removing blocking system calls, etc. No compile-time flag is going to do that magically for you, that happens WAAAAY further up when it's being developed.

      ash

    6. Re:TEN PERCENT! by A+beautiful+mind · · Score: 1

      Unless you use a very basic package of software - you would get more than that by micro-optimizing any given software, you seem to imply that you need performance.

      For most of the users performance change under 10% doesn't matter.

      --
      It takes a man to suffer ignorance and smile
      Be yourself no matter what they say
    7. Re:TEN PERCENT! by Just+Some+Guy · · Score: 1
      You'd get 100% bonus for a 10% speedup?

      Imagine a server room with $1,000,000 worth of hardware. LeonGeeste's 10% speedup would give his boss an extra $100,000 worth of computing ability. You don't think that'd be worth a bonus?

      To those who argue that such a simple tweak isn't worth compensation: he'd be getting paid for the amount of learning it took to get to point that he can implement huge money saving ideas. As the old story says, it's not the price of the fix itself that they're paying for.

      --
      Dewey, what part of this looks like authorities should be involved?
    8. Re:TEN PERCENT! by Anonymous Coward · · Score: 0

      You do realise that, since you claim to be backlogged, in the short term the backlog is going to drastically increase since you'll be wasting time and resources compiling stuff, right? That's one hell of a gamble.

      Who suggested he'd be doing the compiling on the same machine? Using "gamble" makes it sounds like a dice roll, instead of a calculated risk that an investment in time can result in performance increases.

      Besides, if you're running a server farm to do sensitive processing, do you really want some USE flag potentially screwing over your ability to debug your application? That's what things like -fomit-frame-pointers, or whatever it is, does in order to reduce ram usage.

      Not using a frame pointer saves a register, not really what I'm assuming you mean by RAM. On a register starved architecture, that can be truly significant. USE flag wouldn't be where that belongs anyway, but in CFLAGS in /etc/make.conf, if you're using Gentoo.

      Also, potential problems like you're describing this sound like you're spreading FUD. For some of us, late answers are wrong answers.

    9. Re:TEN PERCENT! by S.+Traaken · · Score: 1

      I think you missed the point.

      The comment was that a 10% improvement is not trivial, not that Gentoo (or compile flags or whatever) is the way to achieve it.

    10. Re:TEN PERCENT! by jaseuk · · Score: 0

      This whole thread is pointless anyway, the 10% figure was pulled out of someone's arse. I suspect the performance gain is 1% or less, most applications are disk or network bound rather than CPU these days so code optimisations are pointless.

      A 10% CPU speed gain would give you 2.7Ghz performance on a 2.4Ghz CPU. Unless you are running a big number crunching cluster then this isn't going to mean a great deal. If you are running a big maths app then the chances are you are compiling your own code from source with all the optimisations you could get anyway.

      Jason

    11. Re:TEN PERCENT! by Kevin+Stevens · · Score: 1

      Seeing these replies, I get the feeling that a lot of people don't understand how in the world 10% can really be a problem. Don't think of desktop apps, think of systems, think of grid computing, think of high performance apps. I can tell you that in finance, getting an answer 10% faster is extremely valuable. We're talking getting complex computations done in milliseconds so you can see if that stock or option is worth trading and if so, get the order out to your competitors.

      Or on the other end, think of a grid computing application that has to provide real time type data. Lets say it takes 10,000 $1000 dollar machines ($10 million worth) to come up with an answer to a certain problem every hour using the "standard" program. You speed that thing up 10%, you are saving not only $1 million on the initial hardware outlay, but the cost of keeping 1,000 extra machines around.

      As another example, think of hotmail or another large web application provider. If you could reduce their computation and capacity costs by 10%, I am pretty sure someone would get a nice fat bonus.

      Of course these people already (I hope!) have their applications compiled with as many optimizations as they feel comfortable, which makes this particular discussion kind of moot for them.

    12. Re:TEN PERCENT! by mrsbrisby · · Score: 1

      In my field, ten percent is everything. If I could increase performance by ten percent, I'd get a 100% bonus for the year. My servers need to handle so much data and are always backlogged (and adding more on is exensive!) Don't trivialize ten percent.

      I hope that the point is that you cannot increase performance of your servers by 10% by recompiling your software, just decrease YOUR performance by 200% or more by attempting to do so.

      Recompiling someone elses software is usually foolish. You lose support, your QA department becomes YOU (instead of all the other people using a distribution), and for what? Have you measured it? Is the increase signficant? Why aren't those shiny new CFLAGS in -O2 by default? What doesn't your distribution do it for you?

      Don't trivialize 200%. It's an awful lot of upfront work, and you will never see a return on it.

    13. Re:TEN PERCENT! by larry+bagina · · Score: 3, Funny
      You remind me of two economists walking down the street.

      "Look", said one, "somebody dropped a $20 bill!"

      "That's not possible", responded the other, "If there was a $20 bill there, someone would have picked it up already."

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    14. Re:TEN PERCENT! by kimvette · · Score: 1

      10% could very well be worth a 100% bonus in pay.

      If for example, the GP is in the movie special effects business and his bread and butter is rendering 3D jobs or ripping MPEG2 files, a 10% increase in performance can save days or even weeks on a final rendering job, especially in a clustered environment.

      We've done some small 3D animations (I'm not in the movie industry BTW although one of my clients is - yes, the fools who did chmod 777 / on OS/X because they HATE security - and they wondered why the periodically got hacked and pwned on such a "secure" operating system ) and on a non-SMP, non-cluster-aware (circa 2002) application the rendering took 14 DAYS to complete - for a complex 15 second animation. Multiply that by an order of magnitude (or two magnitudes - in comparison most movie scenes are FAR more complex than what we rendered) for the complexity you'd spend a HELL of a lot more time to render the scene.

      Okay, say on an SMP-ware app, on modern hardware, that 100x more complex scene on new hardware still takes 15 days to complete, and you have many more scenes to render. Let's also say that you cluster it and effectively quadruple the processing power - with clustering management overhead you don't get quite 4x the performance - so let's say that the job is brought down to 5 days to render. Now let's say that the scene just grew in length because the director changed his mind. Add in two days to adjust the model and play through the wireframe or solid-shaded scenes, but your deadline is still next ten days away. From experience you know that the scene will likely take 11 days to render and compile to a format you can deliver. You're going to miss your contractual deadline, and because your lawyer didn't include clauses that say you cannot be held responsible if the director changes the job, you eat the cost of the entire job. You still need to pay the 3D artists, your IT folks, legal, marketing, your electric bill, and so forth.

      That 10% performance increase would have enabled you to deliver it within your contractual deadline and would have netted a couple hundred grand, but now net loss to you is nearing six figures between other jobs you had to turn down to complete this one plus all the business costs of completing the job you still are contractually bound to deliver, but now cannot collect payment for. You could try to sue the production company for changing the job on you, but guess what? It wasn't Disney you contracted with, it was a production company created for the sole purpose of producing this movie, and it was dissolved as soon as the final movie was handed off to Disney. You now spent money on lawyers to chase a company which no longer exists, and not only did you do the job for free, you have to pay legal yet more money.

      That 100% bonus would be more than offset by the lost.

      Straw man? Perhaps, but it has happened, and that's often how it works. A 10% performance increase is HUGE. You can bet that if I were running a rendering farm, it would be compiled from source and all stable optimizations would be enabled.

      --
      The Christian Right is Neither (Christian nor right). See: Matthew 23, Matthew 25, Ezekiel 16:48-50
    15. Re:TEN PERCENT! by kimvette · · Score: 1
      A 10% CPU speed gain would give you 2.7Ghz performance on a 2.4Ghz CPU. Unless you are running a big number crunching cluster then this isn't going to mean a great deal. If you are running a big maths app then the chances are you are compiling your own code from source with all the optimisations you could get anyway.


      No, You have it backwards. A 10% performance gain from CPU optimizations compiled in will net you near-2.4Ghz performance on a 2.4Ghz processor. It will never give you 2.7Ghz peformance on a 2.4 Ghz processor.

      If your binaries are compiled without MMX, SSE, SSE2, SMP/SMT, etc. then you're missing out on the multimedia-optimized calls, and your applications are unware of more advanced thread scheduling. Therefore, your applications will not be taking full advantage of your processor, effectively giving you the performance of a (since we're using the 10% number) 2.0Ghz box.

      Non-optimized binaries don't give you the full performance of your processor.

      It's like using a stock restrictive exhaust on a high-performance V8 engine. In stock form with the restrictive optimized-for-noise-level-and-profit exhaust system, you're getting a lower CFM than say, a Corsa or Flowmaster exhaust, where the system is optimized for high flow and velocity with efficient noise reduction used to balance the difference between legal sound levels and performance, regardless of cost. One of my cars has the stock exhaust because I like quiet systems, but my other has a stainless steel flowmaster exhaust because it's old enough to be exempt (in my state) from noise and emission laws - performance is the ONLY goal of that car. (yes, I have a clean record BTW).

      Binaries shipped with most distributions are intended to be "safe" (stable) on ANY system it's installed on. They cannot know in advanced if you're installing on a Celery, an early Athlon or Duron, a Pentium III, Pentium 4, or Athlon X2 or Opteron. They compile them to be stable and functional on all of the processors, and sometimes forego taking advantage of more efficient, special-purpose instructions bleeding-edge systems can provide.
      --
      The Christian Right is Neither (Christian nor right). See: Matthew 23, Matthew 25, Ezekiel 16:48-50
    16. Re:TEN PERCENT! by kimvette · · Score: 1

      That's the problem.

      Many here think of an application (OOo Writer, M$ Word, Solitaire, Halo) opening 10% more quickly, or possibly a 10% faster framerate, and they Just. Don't. Get. It.

      Why? Not because they're stupid; they just have not been exposed to large computing jobs in the business world yet, or they're isolated from the ramifications of scheduling.

      When you have larger jobs which take anywhere from hours to days, weeks, or even months of processing time to complete, that 10% increase in performance is huge. In fact, a 2% increase can be huge because on really large jobs 2% can mean days shaved off of a job's completion time. 10% is a HUGE time savings and well worth the effort expended.

      --
      The Christian Right is Neither (Christian nor right). See: Matthew 23, Matthew 25, Ezekiel 16:48-50
    17. Re:TEN PERCENT! by Wonko · · Score: 1

      Why? Not because they're stupid; they just have not been exposed to large computing jobs in the business world yet, or they're isolated from the ramifications of scheduling.

      It is just as stupid to think that every piece of software needs to be 10% faster. If you have 10 web servers and you can make them server pages 10% faster you now only need 9. If you can make your simulation software run 10% faster you can save money on hardware (possibly quite a bit, of course).

      You will get that 10% by optimizing your web server or your simulation software. Why on earth would you waste your time recompiling every single thing on the machine from source to do that? Does it matter if Bash runs 5% faster? Or cron? Probably not.

      Many here think of an application (OOo Writer, M$ Word, Solitaire, Halo) opening 10% more quickly, or possibly a 10% faster framerate, and they Just. Don't. Get. It.

      They don't get it in exactly the opposite way that you don't (seem) to get it. Since we are talking desktop use here, I'll think about my own desktop. The only things that actually use a significant amount of CPU (from most to least) for me here is video encoding (transcode), video playback (mplayer), and maybe Firefox and my X server.

      Transcode can run for tens of hours at a time. It isn't worth the time to recompile, though, since I don't care when it finishes. Mplayer only uses a fraction of one of my CPUs and I can't make it play back any faster, so I won't recompile that... On my (slow) laptop, it uses 50+% CPU. I might consider it there, because it might drop my cpu speed down to the next notch.

      Firefox can spin the CPU to the max for seconds at a time. I might notice a 10% increase in speed, if I could get it (especially on my laptop). In my case, that might be worth the rebuild. Too bad I don't have a way to objectively measure the speed (I tried once on my laptop, it didn't feel any faster :p). I would imagine optimizing OOo would be a reasonable idea for someone who uses it quite a bit.

      My Ubuntu desktop has over 1600 packages installed... That isn't quite 1600 packages that need to be compiled, since a single program can be split up into multiple packages. I could probably hand build a half dozen of those packages (which is easy enough to do with dpkg) and I would notice 90% of the performance benefits of optimizing each package.

      The Gentoo crowd will tell me that I would be saving memory if I could leave out support for libraries I don't use. They may be right, I have no idea. I would imagine a lot of that code just gets swapped out (or never even read into RAM).

      kimvette, I have absolutely no idea how much of this is actually directed at you. I have been reading the comments and everyone seems to be 100% on one side or the other, when the optimal solution is likely in the middle. We have known this for a very long time though, back when I had a 386 everyone recommended compiling your own Linux kernel so as not to waste cpu/ram with stuff you'll never use :).

    18. Re:TEN PERCENT! by arivanov · · Score: 1

      I would second that.

      Even if you do that, you are likely to get better results with optimised recompilation of system libraries instead of the software itself. Unless the application is written by an idiot with a fancy hobby of rewriting libc (or Dan Bernstein which according to some people is the same) your main constraints are silly things like the malloc family, IO, libm function, etc. Most of these are safe to recompile with CPU specific optimisations. In fact large part of them can take -O6 -march (on x86) while plenty of applications break if you use a mere -O.

      Overall, all of this is usually unnecessary. I have found that optimising the system design, data layout and optimising the kernel for the correct CPU usually yields much more than any compiler optimisations of libraries and applications.

      --
      Baker's Law: Misery no longer loves company. Nowadays it insists on it
      http://www.sigsegv.cx/
  9. build your own! by rsmith · · Score: 1

    On my FreeBSD I compile almost everything from ports. That way you have maximum control about the options and CFLAGS with wich your app is compiled.

    It's as easy as 'cd /usr/ports/category/portdir; make install clean'.

    If you have a number of identical machines, you could compile and build packages on one machine, and then install them on all the others.

    On Linux I think that Gentoo's portage comes closest.

    --
    Never ascribe to malice that which is adequately explained by incompetence.
    1. Re:build your own! by ckd · · Score: 1

      No, first you do cd /usr/ports/sysutils/portupgrade; make install clean

      Then, all you need to do is run portinstall portname for each port you want to install.

    2. Re:build your own! by mrsbrisby · · Score: 1

      On my FreeBSD I compile almost everything from ports. That way you have maximum control about the options and CFLAGS with wich your app is compiled.

      Whoopy. You've managed to take the worst aspects of FreeBSD (that fewer people use it) and combine it with the fact nobody is QAing your CFLAGS but you.

      Thanks for putting untested configurations on the Internet!

      On Linux I think that Gentoo's portage comes closest.

      Portage is much more stupid than FreeBSD's ports. With FreeBSD's ports- just about everything is QA's and available in binary form elsewhere. the /usr/ports tree makes it very easy to get to those things- so what if they use make to do it? It's _exactly_ the same thing as rpm/rpmbuild.

      Don't think for a moment "compiling all your programs" - or "custom tailoring CFLAGS" isn't costing you something very significant.

      yum/rpm/rpmbuild or apt/dpkg/debuild are perfectly fine for tuning compile-time operations without busting the QA group. They do _exactly_ what /usr/ports and Gentoo portage do, they're just an awful lot more polished, faster, and all around better.

  10. Oh lordy... by JoeLinux · · Score: 0, Flamebait

    Can we please avoid the "Gentoo and LFS" vs. "Everyone else" flamewar that will ensue?

    Just in case, though, I'm getting my asbestos suit...

    1. Re:Oh lordy... by caffeination · · Score: 1

      Welcome to Slashdot, where a call to not have a flamewar gets modded down as flamebait! Or is it opposites day again? I can never tell!

    2. Re:Oh lordy... by zippthorne · · Score: 1

      pfft. everyone knows it's "LFS" vs. "Gentoo and everyone else" ....

      --
      Can you be Even More Awesome?!
  11. "Absolute best performance" fallacy by vlad_petric · · Score: 4, Insightful

    It's true that gcc can generate P4-specific code, for instance, but in most cases and with generic compilation flags this will barely make a difference. I am personally not aware of a single mainstream linux app that does 5% better when optimized for P4 as opposed to generic 386 (I'm not including here apps that have hand-crafted assembly for a couple of instruction-set architectures, like, say, mplayer). I guess things might change slightly with gcc 4.* which has automatic vectorization, but in my experience automatically-vectorizable C code is very rare, unless written specifically that way.

    --

    The Raven

    1. Re:"Absolute best performance" fallacy by Just+Some+Guy · · Score: 4, Informative
      I am personally not aware of a single mainstream linux app that does 5% better when optimized for P4 as opposed to generic 386

      Running "openssl speed" compiled with "-O3 -march=pentium4" gave about 3 times the performance of "-O" on my server. Being able to handle 3 times the number of SSL connections was certainly worth the 10 seconds required to put correct values in Gentoo's /etc/make.conf.

      --
      Dewey, what part of this looks like authorities should be involved?
    2. Re:"Absolute best performance" fallacy by Anonymous Coward · · Score: 0

      openssl, jtr, ffmpeg

    3. Re:"Absolute best performance" fallacy by TheRaven64 · · Score: 1
      When generating code for a generic x86 CPU, gcc will replace constant multiplications by shift/add sequences. If you have an Athlon, then you have two multipliers and a single shifter. This means that a constant multiplication will be much quicker as a multiply instruction than a sequence of shifts and adds. This is just one example of when GCC can generate highly sub-optimal code, I'm sure there are many others. If you really need the performance, then carefully tweaking your compiler options can give a significant speed boost (on some code I wrote turning on function inlining gave about a 500% speed boost, for example), although what options are correct may be highly program dependent.

      Running off-the-shelf software, however, you are highly unlikely to see (or, in many cases, need) this much extra speed. Maybe if your CPU spends a lot of time at 100% it might be worth seeing if you can optimise whatever the bottleneck is, but 99% of the time you spend far more time compiling than you save from the optimisations.

      --
      I am TheRaven on Soylent News
    4. Re:"Absolute best performance" fallacy by Anonymous Coward · · Score: 1, Insightful

      What distro ships OpenSSL with no optimizations period? Bogus argument++

  12. better headline by Anonymous Coward · · Score: 0

    I think the headline should say "use pre-compiled binaries". Otherwise the proposed decision is to basically precompile or compile.

  13. Benifit Ratio. by Anonymous Coward · · Score: 0

    "Should You Pre-Compile Binaries or Roll Your Own?"

    How much time do you have, versus what do you gain in that time? Beyound bragging rights that is.

  14. I am Between Self Compiling and Gentoo by eno2001 · · Score: 4, Insightful

    Up until this past year I've been a big fan of using a very stripped down Redhat (then later Fedora) distro and doing my own custom compilations of things like OpenSSL, Apache, OpenSSH, DHCPD, BIND, Courier, MySQL, PHP, XFree86 and X.org, and of course the Kernel itself. The main reason? It "just works". When I originally started using Linux and used RPMs I was very annoyed with them. I think RPM sucks. I also think BSD ports suck too. I don't like using stuff on my machine that I didn't massage first. That's just the way I am.

    A co-worker introduced me to Gentoo late last year and I have to say I am very impressed. It's much faster than the optimizations I was using. Of course I didn't compile everything in RedHat or Fedora by hand. That's why Gentoo really rocks. You CAN hand compile everything from the ground up! I also used to use Linux From Scratch. And YES, I do use this stuff on production machines. You just can't get any better performance or security by doing it all yourself. The only reason to use package managers is if you are new to Linux or just don't want to learn much. But if you don't dig in, then you're at risk of thinking that something in your installation is broken, when it's not. I've seen many people throw up their hands saying, "I have to re-install my Linux box dammit!" when all they really needed to do was fix a symlink, edit a config file or downgrade something for compatibility reasons.

    For example, on a laptop at home I decided I wanted to use the Xdmx server from X.org, so I hand compiled X.org. After that, I kept having this problem where the acpid (tracks the laptop's battery life among other things) daemon wasn't starting and would produce an error message whenever I logged into Gnome. I dug around on the net for quite a while and finally found out that the version of X.org (a devel version, not a stable version) grabs ACPI if you are using the RedHat graphical boot screen. The fix? Stop the RHGB from running by removing the RHGB kernel option. I think a lot of people would have assumed they hosed their installation and reinstalled if that problem really bothered them. It's not hard to find solutions to most problems in Linux no matter how obscure. That's why only knowing how to use pre-compiled binaries is a detriment if you're serious about using Linux.

    --
    -"...bad old ideas look confusingly fresh when they are packaged as technology" - Jaron Lanier (Digital Maoism on Edge.o
    1. Re:I am Between Self Compiling and Gentoo by Mr.+Vandemar · · Score: 2

      First you learn to use Linux. Then you learn how to set up a source based distribution. Then you learn not to. ;) I'm joking of course, but dismissing binary distributions as "not for serious users" is a bit extreme. After you've used Linux long enough, you stop caring about little details, and just want it to use it with a minimum of fuss.

    2. Re:I am Between Self Compiling and Gentoo by eno2001 · · Score: 1

      Perhaps that's why I am impressed with Gentoo. It really is like having a package manager that compiles everything for you. I can't see myself every going back to a "dumbed down" distro like Fedora, SuSE or Mandriva though. They just don't offer the performance I want. Especially since I tend to use old hardware. My main machine at home is nearly ten years old and it's running the latest apps just fine. It couldn't do that without custom compiles or Gentoo. And it has no hope of running Windows XP. I tried that back when XP debuted and it took it about fifteen minutes to boot!

      --
      -"...bad old ideas look confusingly fresh when they are packaged as technology" - Jaron Lanier (Digital Maoism on Edge.o
    3. Re:I am Between Self Compiling and Gentoo by TheCarp · · Score: 3, Insightful

      Don't apologize, you hit the nail on the head.

      You learn not to.

      Yes, there are times when a source based distro is good. There are times when you NEED the level of control that it gives you.

      Most jobs, in most environments don't. In fact, most sysadmins that I have seen just don't have the resources to exert that much control, or put that much love and care into every system.... nor should they.

      I have said before, in specific cases (research computing clusters where you essentially have 3 machines, one of which is copied n times as "nodes" that can be reimaged from a new image pretty much at will - is the one case where I have really seen it used to good effect) source based distros are great. Of for your hobby machine, or you r laptop.

      As soon as you start talking less about "running linux" and more about "deploying services", the focus shifts. Source based distros are a management nightmare in any manner of large or hetrogeneous environment.

      Frankly, the majority of systems that I have had responsibility for havn't even had a compiler on them, never mind a full blown development environment, usually not even library headers.

      Why? Because we don't want admins compiling code on just any box and tossing it in place. So, why make it easy for them to do so? Nothing should EVER EVER EVER be compiled on the production mail server, or the web server.... it should be compiled on the compiler machine, the dev box.

      When you start making distinctions between the roles of boxes like that, as you should do in any larger environment, then you start to see the benefits of a source based distro melt away, and the real power of package management come into full effect.

      Most linux users, the home user, will never see this. I know I didn't understand it until I had been doing it for a living for a few years.

      -Steve

      --
      "I opened my eyes, and everything went dark again"
    4. Re:I am Between Self Compiling and Gentoo by Raphael · · Score: 3, Insightful
      You just can't get any better performance or security by doing it all yourself.

      The performance can be debated, but you have got the security argument backwards. If you use pre-packaged binaries, you can get security updates quickly and automatically because any responsible Linux distributor will provide updated packages in a timely manner. This is especially useful if you maintain a large number of machines and want to make sure that the latest security patches are quickly applied to all of them.

      On the other hand, compiling your own software requires you to pay attention to all security announcements and apply the security patches yourself. It may be possible to automate that to some extent (e.g., Gentoo provides some help for security patches), but not as easily as with the pre-packaged binaries.

      From a security point of view, I am glad that some others are doing most of the work for me. The issue of performance can be debated because there are many pros and cons, but security is usually better for the pre-packaged binaries. Note that I am talking about security from the point of view of applying the latest security patches and staying ahead of the script kiddies, not in terms of initial configuration of the system. And by the way, I am not against compiling software on my own because I compile several packages from sources (directly from cvs or svn, especially for the stuff that I contribute to). But then I am aware that the security may actually be weaker for those packages than for the ones that I can update automatically.

      --
      -Raphaël
    5. Re:I am Between Self Compiling and Gentoo by supersuckers · · Score: 1
      The only reason to use package managers is if you are new to Linux or just don't want to learn much.

      Or perhaps time? When my boss says "give me a moodle server" and I can build a box, install debian and moodle, and still have it for him that morning, he's a lot happier than me saying "oh wait, bash etc. is still compiling".
    6. Re:I am Between Self Compiling and Gentoo by digidave · · Score: 3, Interesting

      Exactly. I started using Debian because not only are the packages the best in the world, but it's easy to get things working. Now I'm beta testing VMWare Server because that makes it even easier. I created a few virtual machines (one LAMP, one Ruby on Rails/Lighty, one database-only, etc) and can have them running in less than ten minutes + the time it takes to do any specific configuration for whatever app goes on there, which is usually only a few minutes. The VMs are configured to auto-update themselves from Debian's repositories every night, so out of the box I just run apt-get to update from when I made the VM and it's all set to go.

      I used to compile every major package, back when I didn't know as much about Linux or being a sysadmin. Now that I know what I'm doing I have the confidence needed to use a binary package manager to its fullest.

      --
      The global economy is a great thing until you feel it locally.
    7. Re:I am Between Self Compiling and Gentoo by bheading · · Score: 1

      A co-worker introduced me to Gentoo late last year and I have to say I am very impressed. It's much faster than the optimizations I was using

      How much faster ? How did you measure this ? How can you be sure there were no other variables other than compiler flags ?

      You CAN hand compile everything from the ground up!

      But why would you want to ?

      The only reason to use package managers is if you are new to Linux or just don't want to learn much.

      The expert UNIX system administrators with 20+ years experience in the field use package managers on Solaris and Linux machines. Can you explain why you think that is ?

    8. Re:I am Between Self Compiling and Gentoo by Anonymous Coward · · Score: 0

      "You CAN hand compile everything from the ground up!" -- Unfortunately this is not strictly true. Gentoo includes proprietary software you can't compile.

    9. Re:I am Between Self Compiling and Gentoo by eno2001 · · Score: 1

      Because they like to save time. However, if time is not an issue compiling is still better if you want high performance. EVERY pre-compiled binary I've ever used never performs as well as something custom compiled for the specific platform or CPU. Screw portability if you want performance. Frankly I'd prefer all assembly language...

      --
      -"...bad old ideas look confusingly fresh when they are packaged as technology" - Jaron Lanier (Digital Maoism on Edge.o
    10. Re:I am Between Self Compiling and Gentoo by sydneyfong · · Score: 1

      ...if time is not an issue...
      Your assumption is fundamentally flawed, especially in business settings.
      Of course, you may choose to spend all your time tweaking your own machine, but that's only you.

      Frankly I'd prefer all assembly language...
      Real men don't write asm, real men design chips that executes SQL in hardware!

      --
      Don't quote me on this.
    11. Re:I am Between Self Compiling and Gentoo by buchanmilne · · Score: 1
      I think RPM sucks.

      ...

      The only reason to use package managers is if you are new to Linux or just don't want to learn much.

      Why didn't you just take the time to learn RPM?

      Hint: portage is a package management system, just as rpm is, but you probably didn't bother with rpm-build.

      Binary packages have advantages as well:

      • fast deployment (we can deploy the entire software stack and configs and updates for a new server in under 15 minutes)
      • certification
      • easier tracking of the origin of the software
      • verification of all the components of the package
      • integrity checking on all the files in the package

      Now, you can build RPMs from source, which gives you the majority of the advantages any source-based system gives you, and if you handle it well, you can also get revision control of both source and binary packages. There are good package managers available for all binary-based distros, which remove any semblance of "dependany hell". I find many people simultaneously complain that "my previous distro prevented me from learning" and "my previous distro had dependancy hell". If you had bothered to spend as much time learning about the package management tools on the previous distro as you spent instlaling Gentoo, you would not have had depenancy hell.

      So, I don't really see that (eg.) Gentoo has many advantages, and it just wouldn't be allowed in many environments (in ours, compilers are not permitted on production machines).

      Maintainer of ~ 90 (source) packages in a binary-based distribution (not counting packages only for internal use)

    12. Re:I am Between Self Compiling and Gentoo by dildo · · Score: 2, Funny

      Why did this guy copy his comment directly from Funroll-loops ?

    13. Re:I am Between Self Compiling and Gentoo by eno2001 · · Score: 1

      Actually your comment about VMs is where I am. I like to build my stuff as close as possible from the ground up and then use the base image to make VMs. For me, update usually means updating each package by hand. It's slower, but I still like the benefits it offers over precompiled binaries.

      --
      -"...bad old ideas look confusingly fresh when they are packaged as technology" - Jaron Lanier (Digital Maoism on Edge.o
    14. Re:I am Between Self Compiling and Gentoo by Anonymous Coward · · Score: 0

      If the dev box gets infected by some virus, it will infect all the production machines.

      So I don't think what you mention is secure at all and I would never allow that.

  15. compiling your own is about more than performance by kikibobo · · Score: 1

    Unless you're running on special hardware (like a VIA chipset, for example), it's incredibly unlikely that compiling your own binaries will get you any particular performance advantage.

    There is a very good reason for compiling your own, though: you can control all kinds of things via ./configure (typically). It's pretty handy to have control over this stuff, and it DOES get to be a bit wasteful if every binary you have installed has every possible option linked in.

    N00bs obviously find the compilation process a little daunting, but it's a good exercise in figuring out how things work and fit together: ./configure --help | less

  16. deployment? by TheCarp · · Score: 5, Insightful

    Do these guys even know what deplpoyment means?

    They are not only wrong in their conclusion, but the article barely scratches the surface of the question.

    Put simply, compiling software on your own is fine for a one off, or your desktop, or your hobby machine.ou.. or if you either a) need the latest wizbang features (and maybe can put up with the latest gobang bugs) or b) need really specific version control or c) can't find a precompiled package with the right ompile time options set.

    Other than that, you should pretty much always use pre-built.

    Sure, you can build your entire system from scratch if you like, libc on up. Why? The performance increase will be so minor that you will have to run benchmarks if you even want to be able to tell there was a change. You will then have to recompile everything you ever decide to update.

    This strategy is a nightmare as the systems get more diverse and complex.

    it also has nothing to do with deployment. Deployment is what you do after you have decided what you want and made it work once. Deployment is when you go and put it on some number of machines to do real work.

    I would love to see them talk more about the differences in deployment. With precompiled packages from the os vendor, ala debian or redhat, its easy. You use apt-get or rpm and off you go. Maybe you even have a redhat network satalite or a local apt repository to give yourself more control. Then you can easily inject local packages or control the stream (no, sorry, I am NOT ready to upgrade to the new release)

    but should you compile "most of the time"? hell no!

    It is, in fact, the vast minority of software where you really need the latest features and or special compile options. Its the vast minority of the time where the performance increase will even be perceptable.

    Why waste the time and cpu cycles? Takes over a day to get a full gentoo desktop going, and for what? I can have ubuntu installed and ready to go with a full desktop in maybe 2 hours.

    Lets take the common scenario.... new openssl remote root exploit comes out. The email you read just basically said, in no uncertain terms, that half your network is now just waiting to be rooted by the next script kiddie who notices. Thats lets say... 50 machines.

    Now your job is to deploy a new openssl to all these machines.

    You could notice that the vulnerability came out in such a time frame that they allowed the OS vendors like debian to release fixes (often happens, if not they are usually out within a very reasonable time frame)... so you hit apt-get update && apt-get upgrade

    or maybe you just promote the packgae into your repository, and let the automated updates deploy it for you. You go home, have a coffee, and be ready to log in remotly if anything goes tits up.

    Now if you are hand compiling what do you do? Compile, test. And then um.... ahh... scp the dir to 49 machines and ssh in and do a make install on each?

    How is this better than using a package manager again? Now you ahve dirs sitting around, you have to hope that your compile box is sufficiently similar to the other boxes that you didn't just add a library requirement (say because configure found that yoru dev box has libfuckmyshit.so installed and this neat new bits of openssl can make use of it)

    How about when a box crashes and burns and you now need to take your lovingly handcrafted box, and rebuild it, and put all that lovingly compiles software back on it.

    Fuck all that... give me a good binary distro any day of the week. I will hand compile when I HAVE to... and not before.

    -Steve

    --
    "I opened my eyes, and everything went dark again"
    1. Re:deployment? by miyako · · Score: 1

      I really don't think that anyone who builds things from source does it the way that you suggest (or if they do they deserve the headaches they get). Without going into why someone would choose to build from source (there are reasons peppered throughout this thread) let's look at a much more sane (and I would hope more common) way of going about it:

      Sysadmin wants to install/upgrade program.
      Sysadmin decides for whatever reason that this should be built from source.
      Sysadmin downloads source to testing machine.
      Sysadmin builds and tests the program to ensure that it works in the testing environment.
      Sysadmin builds the program for the few environments the program will need to run under.
      Sysadmin takes these binaries and installs them on the machines the same as (s)he would with a binary package.

      Deployment is done after building and testing. No reasonble person is going to compile the program 50 times when they only have to do so once or twice. Sometimes (Often?) it's much easier to build the program from source for the limited number of environments in the shop than to try to force the binary to work on those systems in a square-peg-round-hole sort of way.

      --
      Famous Last Words: "hmm...wikipedia says it's edible"
    2. Re:deployment? by blueturffan · · Score: 1
      quote:
      Do these guys even know what deplpoyment means?
      I don't know what it means. Is it a depleted polymer? Does it have something to do with seafood?

    3. Re:deployment? by Anonymous Coward · · Score: 0

      > Now if you are hand compiling what do you do? Compile, test. And then um.... ahh... scp the dir to 49 machines and ssh in and do a make install on each?

      Gee, don't they have NFS where you work? That's what I do for all the linux machines (about a dozen for the lab I admin, but Sun and Xerox both scale it up to thousands). With the windows boxen, I just push an MSI out, pure drag and drop.

      Maybe you should try admining your network as a unit instead of a bunch of disconnected machines like your home hobby network.

    4. Re:deployment? by Anonymous Coward · · Score: 0

      Put simply, compiling software on your own is fine for a one off, or your desktop, or your hobby machine.ou.. or if you either a) need the latest wizbang features (and maybe can put up with the latest gobang bugs) or b) need really specific version control or c) can't find a precompiled package with the right ompile time options set.

      Other than that, you should pretty much always use pre-built.


      Hear, hear! You'd think it wouldn't be such a battle to get folks to understand this obvious conclusion. As witnessed by the replies to this story, however, there is no shortage of goofballs who can't grasp the concept that one must consider costs as well as benefits when making a decision. "Duh...but I get a 1.3% performance boost building from source...uh....duh...duh...duh". And the folks who decide to build from source tend to be exactly the ones who aren't actually seasoned developers. The seasoned developers intuitively understand the costs associated--they understand that a seemingly inconsequential flag change can cause bugs that are a nightmare to fix--and they don't go down that road unless there is a damn good reason.

    5. Re:deployment? by Anonymous Coward · · Score: 0

      Put simply, compiling software on your own is fine for a one off, or your desktop, or your hobby machine.ou.. or if you either a) need the latest wizbang features (and maybe can put up with the latest gobang bugs) or b) need really specific version control or c) can't find a precompiled package with the right ompile time options set.

      You obviously don't work a place with enough competent people.

      I'm used to installing nothing but a barebone base system, then having everything compiled from source - for different architectures - on different lab machines. This again is distributed to hundreds (hmm, might be thousands now.) servers.

      Yes, I'm used to working in companies basically building our own distribution of system tools and daemons upon a base system.

      No, it doesn't cause that big problems with deployment (that is caught in testing).

      Yes, I do hope that most bigger companies work that way. It does increase security, stability, and helps the administrators know what they're doing.

      Heck, it's a better way to get our custom patches implemented anyways.

    6. Re:deployment? by Anonymous Coward · · Score: 0
      I can have ubuntu installed and ready to go with a full desktop in maybe 2 hours.

      And I can have root on your ubuntu machine in less than 10 seconds by reading a plain text file. :P
    7. Re:deployment? by TheCarp · · Score: 1

      Sure we have NFS, and use it to good effect. I never said that it can't be done... just that the overhead involved is not, in my opinion, worth it.

      however, whether you scp the directory over, or share it out via NFS... you are still doing a make install on every machine, AT BEST. (at worst your doing full compiles everywhere, whcih doesn't so much work with NFS unless you want to either do machines serially, or copy the directory locally)

      You still have no registry of what file is installed where from what package (which a package manager gives you, or at least any one worth its salt, and even several that arn't).

      I maintain that packages make much more sense in large corperate environments. Its not that you can't develop processes around source distribution, I just maintain that the benefits are few, and far outweighted by the costs.

      Negligable performance increase, no security increase (unless you are personally auditing, in house, the code before you compile and install it), AND you miss out on the nice features of package management. Hardly a win there.

      -Steve

      --
      "I opened my eyes, and everything went dark again"
    8. Re:deployment? by TheCarp · · Score: 1

      Yup... in my last job we started with a few solaris boxes and almost no management infrastructure, and had to build from the ground up.

      By the time I left, we had nearly 100 machines. We compiled everything we could from source, but... we made packages and distributed the packages. So it was kind of like we were the OS vendor.

      In fact, in many corperate environemtns, there ends up being a group that ends up basically being an in house os vendor, building what the base system is, and building local packages and keeping them up to date. That was my job.

      I built build scripts and put it all in CVS for exactly that reason... managing source is a nightmare. I didn't install CVS or make build scripts right away. I did it, like many admins, because I had been bitten in the ass.

      What flags did we use last time? How do you make it install into a specific dir? What patches did we apply?

      Well... by the time we left, I could tell you that stuff for our compiles. It was a pain to build, and eventually we needed student workers just to keep up with the package demand... it was way too much for what we were doing.

      Basically... if binary packages had been available sanely for what we wanted to do (this was under solaris), I would have said we should use them. It wasn;'t.... so we effectivly managed alot of source.

      It was only worth it because we had no other real choice (honestly the sunfreeware stuff was just too often not quite right... not like good old fashioned debian packages or even, as much as I hate to admit it, RedHat... they have really improved since I decided that I hated them, and their latest stuff is pretty good)

      -Steve

      --
      "I opened my eyes, and everything went dark again"
    9. Re:deployment? by TheCarp · · Score: 1

      And if you notice, I said source can be made to work. I have seen it work. My problem is that the article didn't even scratch the surface of the issues involved and I just don't see how source is that big of a win in alot of environments.

      Is a deployment strategy based on building everything from source doable? Yup.Does it make sense? Sometimes yes, sometimes no.

      What I object to is the idea that if your an expert, you are going to choose source. Frankly, I just don't see how it follows that source is more supportable, more secure, or more stable.

      It is at best, just as good. Bad package management, in truth, is just as bad as bad source management. However, there are certainly options with both to make your life easier.

      Frankly, if the deployment strategy is so undeveloped that the choice between binary packages and source distros is still to be made, I don't see any reason to build a source system at this point. Unless I had very specific needs, that pointed to needing to manage alot of source... I would almost always go the binaries route.

      -Steve

      --
      "I opened my eyes, and everything went dark again"
  17. The real issue is dependencies by Todd+Knarr · · Score: 4, Insightful

    If you're compiling your own for performance reasons, don't bother. There's a few packages that can benefit from being compiled for specific hardware, the kernel and libc, for example, and things like math libraries that can use special instructions when compiled for specific hardware. For the most part, though, your apps aren't going to be limited by the instruction set, they'll be limited by things like graphics and disk I/O performance and available memory. IMHO if you're trying to squeeze the last 1% of performance out of a system, you probably should look at whether you need to just throw more hardware horsepower at the problem.

    The big benefits and drawbacks of custom-compiled vs. pre-built packages is in the dependencies. Pre-built packages don't require you to install development packages, compilers and all the cruft that goes along with a development environment. You can slap those packages in and go with a lot less installation, and you can be sure they're built with a reasonable selection of features. On the other hand, those pre-built packages come with dependencies. When you install a pre-built package you pretty much have to have the versions of all the libraries and other software it depends on. By contrast, when you compile your own packages they'll build against the versions of other software you already have, using all the same compiler options, and they'll probably auto-configure to not use stuff you don't have installed. This leads to a more consistent set of binaries, fewer situations where you need multiple versions of other packages installed (eg. having to install Python 2.3 for package X alongside Python 2.4 for package Y) and overall a cleaner package tree.

    Where the cut-off is depends on your situation. If there's only a few instances of dependency cruft, it may not be an issue. If you have a lot of dueling dependencies, it may be worth while to recompile to reduce the number of different versions of stuff you need. If you've got externally-dictated constraints (eg. only one version of OpenSSL is approved for your systems and everything must use it or not use SSL at all) then you may have no choice but to compile your own if you can't find a pre-built package that was built against the appropriate versions of libraries.

    1. Re:The real issue is dependencies by Anonymous Coward · · Score: 0

      By contrast, when you compile your own packages they'll build against the versions of other software you already have, using all the same compiler options, and they'll probably auto-configure to not use stuff you don't have installed.

      And, as an added benefit, you'll be running an untested configuration with who knows what bugs. Oh, joy.

    2. Re:The real issue is dependencies by Todd+Knarr · · Score: 1

      Unlikely. The developers have tested all the combinations of configuration settings, which includes things like compiler options. Your distribution may not have tested it, but someone else has. It's like buying an HP computer: just because the store didn't test it for compatibility of parts doesn't mean it's untested, HP tested it for compatibility before they shipped it to the store.

      Variations in libraries causing a problem is possible, but developers already think about that kind of thing. The standard autoconfiguration scripts check versions and will refuse to use libraries old enough to be known to be problems, and when making new versions of libraries developers tend to either insure backwards compatibility or arrange it so old code just won't compile with the newer library version.

      It's theoretically possible that the specific version of the compiler you're using has some strange bug in it that causes it to generate bad code, but that's rare and such problems tend to get fixed very quickly for obvious reasons. You could also be using some strange compiler that nobody's heard of and the vendor doesn't support anymore, but in that case you probably can't get pre-built packages anyway and you're used to the situation.

      In short, your statement's akin to claiming I don't know the sky's blue because I'm not looking at it right this exact second: theoretically the sky could have turned green since I last looked at it, but it's unlikely it could and not cause such a commotion that I'd know something was up (likewise, if it wasn't blue because it was storming or night I'd probably know too).

    3. Re:The real issue is dependencies by Anonymous Coward · · Score: 0

      Unlikely. The developers have tested all the combinations of configuration settings, which includes things like compiler options. Your distribution may not have tested it, but someone else has. It's like buying an HP computer: just because the store didn't test it for compatibility of parts doesn't mean it's untested, HP tested it for compatibility before they shipped it to the store.

      You're taking "configuration" to mean only program configuration settings. Also included in configuration are the libraries upon which the program depends.

      Variations in libraries causing a problem is possible, but developers already think about that kind of thing. The standard autoconfiguration scripts check versions and will refuse to use libraries old enough to be known to be problems, and when making new versions of libraries developers tend to either insure backwards compatibility or arrange it so old code just won't compile with the newer library version.

      Yes, variations in libraries causing a problem is possible. Thank you for admitting the problem. Yes, developers *try* to anticipate and prevent problems, but one honest look at the stability of software should convince you not to put too much weight on their attempts. Bottom line is you are either working with a tested configuration (again, that includes libraries) or you're not. If it's been tested, then somebody has already built it, and it makes no sense to rebuild it yourself unless there is absolutely no other option. Building from source should be done only when there's no workable way around doing it.

      In short, your statement's akin to claiming I don't know the sky's blue because I'm not looking at it right this exact second: theoretically the sky could have turned green since I last looked at it, but it's unlikely it could and not cause such a commotion that I'd know something was up (likewise, if it wasn't blue because it was storming or night I'd probably know too).

      No, I'm taking the view that accepting added risk of failure for no good reason is stupid. If you've developed software for long, you know damn well that seemingly minor things like a slight change in how a library function has been implemented can cause unanticipated problems. Proper configuration management is critical for stability.

    4. Re:The real issue is dependencies by Anonymous Coward · · Score: 0

      Actually if you have gentoo, and you use, emerge, you actually compile from source tested packages. So they will actually work well together, 99% of the time. And the other 1%, you can always easily rollback to a previous version. How's that for package management?

  18. Performance isn't the big reason by stonefoz · · Score: 1

    Most software has at least one mutaly exclusive option, if even just libray version numbers. If it can't be set while it's running your only choice it to compile it yourself leading it to be something to know. I personaly haven't seen a real performace boost worth the time it takes to leave the beaten path of precompiled binaries. I'm sure it's there but i don't belive it realy worth the trouble. Both Amd and Intel design their architetures to preform well with backwards compatiablity. Licensing problems with distribution is can be gotten around with source only distribution since gpl allows you to do about anything if you not redistributing such as linux multi-media apps are plagued by patents. I'd know how to do it, but leave it as a last option

    --
    I think I just cashed out all my cool points.
  19. snapshot2.png 2nd link by caffeination · · Score: 1

    sorry about that, screwed up the second link (I'm trying to make tea and post to /. at the same time)

  20. hardware, ease of distribution, latest version by bzipitidoo · · Score: 3, Insightful
    The article missed an aspect of the hardware issue. Got the part about rolling your own to optimize for your dual core Pentium 4 rather than using a binary compiled for a 486, but not the part about getting it work on totally different hardware, such as an Alpha or PowerPC.

    Another missed point is it's usually easier for the developers and hardware vendors. Easier to distribute source code than maintain dozens of binaries. Just another advantage of open source. Many projects have a few binaries for the most popular platforms, and source code for those who want to use something less common.

    Latest version and leading edge. I've been trying Gentoo. In most cases the extra performance isn't much, and isn't worth the hassle. And Gentoo defeats one of the attractions of roll your own: the leading edge. There is always a lag between when a project releases a new version, and a distributor can get around to turning the new version into a new package. Article didn't mention that aspect either. If your distro is slow, you can bypass them and go straight to the source, or, if available, the source's binaries. Ubuntu Linux 5.10, for instance, is still stuck on Firefox 1.0.7. I'm not talking about checking out the very latest CVS source tree, just the latest release.

    --
    Intellectual Property is a monopolistic, selfish, and defective concept. It is "tyranny over the mind of man"
    1. Re:hardware, ease of distribution, latest version by Maljin+Jolt · · Score: 1

      I've been trying Gentoo.

      Good. Though you didn't try hard enough.

      In most cases the extra performance isn't much, and isn't worth the hassle.

      Nonsense. Perhaps you didn't stressed your CFLAGS enough. 30% of speed performance in X11 on pentium4 is typical gain against generic 686. Don't forget to enable SSEn.

      And Gentoo defeats one of the attractions of roll your own: the leading edge.

      Nonsense. Did you hear about portage overlay? You can have zero day release versions of anything of your own, plus the comfort of portage.

      --
      There you are, staring at me again.
    2. Re:hardware, ease of distribution, latest version by Anonymous Coward · · Score: 0

      "Ubuntu Linux 5.10, for instance, is still stuck on Firefox 1.0.7."

      You're not using Dapper yet? That's the only difference between Dapper and Hoary: latest version, and leading edge.

    3. Re:hardware, ease of distribution, latest version by Anonymous Coward · · Score: 0

      The ability to build your own binaries packages and then install them on other machines is one of the handiest gentoo features; I've created a central repository for the portage tree and the compiled binaries and automated the deployment using a few simple scripts. Moreover, virtualizing the servers via xen also greatly simplifies backups, restores and hardware maintenance, while preserving the uptime of the services. Speed is the least of my concerns; gentoo allowed me to have a highly secure (thanks to the endless customization opportunities) server farm, that is also a breeze to mantain and keep running. I really doubt that I could have attained that with any other distro, much less with proprietary software.

  21. for me the real issue is scale by Anonymous Coward · · Score: 0

    After doing the LFS hard labor and basking in the wam smug glow of knowing my system was 100% built by hand I really got to appreciate the from source route as a security feature (as in I actually *HAD* read through every line in the system - at least a quick glance) But it doesn't scale well. What did I have? Basically a kernel, uClib and busybox, great for an embedded system, but not quite a desktop. It took me a futher week to get some semblence of X running and it never quite worked out. The best part though was learning to config packages by hand, and also realising that I could build static binaries without any dependencies at all. In fact there is an optimal scale of system, probably something about as complex as a kiosk application, where this tradeoff between building one-off statics vs a huge library of .so works out best. For a full blown desktop though forget it. Having said all that though I have to admit I've never built a Gentoo.

  22. Staying Current with Options by Neil+Hodges · · Score: 1

    I like building things from source because I may want to have as few things built as possible, and because certain options set by default may break a system. I also like compiling because it offers the user a chance to support anything from a Pentium 4 to an AMD K6 (or lower), along with MMX, MMX2, SSE, SSE2, and 3DNow!.

    Another advantage in my eyes is that it is possible to get the newest features without a long time before passing into a stable environment intended for a server on my home PC. I use X11R7 and the CVS version of Gaim on Gentoo, for example. Even SourceMage, with its far fewer patches and the slightest older software options, has met my needs.

    The last plus is that as long as the originally installed version from the CD (or otherwise) is new enough, it'll be able to be updated to the newest, as Gentoo, NetBSD, FreeBSD, and SourceMage show -- though NetBSD and FreeBSD have their system sources located outside of their Ports and Pkgsrc systems, respectively. This contrasts from when I was using Red Hat Linux 8; it fell out of support for a while, and the structure of the system was dated enough (compared to now) that upgrading was a hassle.

  23. Precompiled binaries are fine by dtfinch · · Score: 1

    Unless they don't work, are incompatible, are unavailable, or are for some other reason unsuitable. Then you compile your own.

  24. yum by i621148 · · Score: 1

    I don't know but I am pretty addicted to yum by now.

  25. Yes, pre-compile - but not for the obvious reason by jimicus · · Score: 4, Insightful
    I use Gentoo - and I even use it on production servers.

    However, I don't consider performance to be a particularly big benefit. Once you've got gcc doing it's basic -O3 or whatever, anything else is marginal at best.

    There are, however, two things I get out of it which are useful to me. These should not be ignored:

    • Choose compilation options. Most packages have a number of options available at compile time. Generally with pre-compiled packages, you either get every single option compiled in OR you get "whatever options ${VENDOR} thinks are most appropriate". Gentoo provides flags as an intrinsic part of portage which allow you to specify which options are compiled in.
    • A vast number of regularly updated packages. Put simply, I can emerge almost anything, whereas every other distribution I've used, sooner or later I come across a package I need which doesn't have an RPM or what have you, and I have to build my own complete with the dependency hell that can entail.


    Of course, there are drawbacks:

    • Many commercial non-F/OSS packages aren't available as ebuilds and their installers get confused with Gentoo's creative filesystem layout, which is not entirely LSB-compliant in places (particularly /etc/rcX.d).
    • Gentoo packages are declared "stable" more-or-less by fiat rather than by extensive regression testing, and it's not unknown for an upgrade to completely break things without having the good grace to announce it first. This isn't necessarily a problem if you test everything before you go live and you have contingencies in place - which you should be doing anyway. But it can be annoying.


    I guess it's just a case of "know the tool you're using".
  26. the only answer: by just-a-stone · · Score: 1
    depends

    tfa mentions some of the reasons for compiling packages, but it's rather incomplete. in my case, in order of frequency:
    • updates for packages that fit at least one of the other reasons
    • i need a customized version (statically linked extensions, different bindings or dependencies, configure,... feature x only availeable as patch)
    • i need a binary that acts as similar as possible as on another unix system where i configured and built it the same way
    • i want it in its own dependency tree to be able to run and update the server's main issue daemons without write permissions on /usr and /bin or without implications on maintenance connectivity (like the way i use solaris 10 zones)
    • there is no package for this software
    • support contract for a commercial third party product claims only to support vanilla version xy
    • i needed to fix something (mainly security, information disclosures and segfaults)
    • the pre-built binary or it's source does not fit our policies
    • there is no current package
    • we hit overcautious or useless built-in hard limits
    • i don't trust the environment and need a sane binary, verified and compiled on another system with certain dependencies
    • it's too slow

    imho it's not always an optional decision if rolling your own would be better, in some cases you don't have a choice. but i do not want to have gcc (/similar) installed on production systems.
  27. Precompiled binaries are tested by pclminion · · Score: 1
    One difference between compiling from source and using a precompiled binary that is often overlooked, is that the precompiled binary has possibly been tested. In comparison, a binary you build yourself have never been tested by anyone, anywhere. There are so many possible variances between build environments that it's unlikely any two people will ever compile to the exact same binary.

    An unforgivable mistake in the sphere of commercial software is to test a DEBUG build and release an OPTIMIZED build. The binary you are releasing is different from the one you tested -- in effect, you are releasing untested code! This is one of the problems with a debugging scheme centered around conditional compilation. The very presence of the debugging code can affect the behavior and appearance of the bug.

  28. Yeah, that will make people REALLY want to adopt.. by maillemaker · · Score: 1

    Look, when I download a piece of software, I want to click "install", and start using it. I don't want to have to finish writing it before it will be useable on my computer.

    I don't know what the state of the art is for compiling code these days, but I know that when I download a program to use on my computer, I don't want to make a Computer Science project out of actually getting it to RUN on my computer. So if it /must/ be compiled to run, I shouldn't know anything about it happening - the compiler and the act of compilation should happen transparently to me.

    If I have to go out and download a compiler and who knows what else and get all of /that/ running before I can get to compiling the program I really want to run, I won't be interested.

    Steve

    --
    A work that expires before its copyright never enters the public domain and thus enjoys eternal copyright protection.
  29. desktop: apt-get, server : make -params by dindi · · Score: 1

    Well for the desktop i really do not care, just apt-get all the crap, and it is a slow machine running X, mozilla and terminals. No reason to compile.

    Now on the serversm when there is an advantage to be taken, I would compile apps, but not everything. Like mysql and apache (that accounts for 90% for processor time) I would compile if there is heavy load, but for others i really do not care.

    Now BSD is a different devil, there you must compile it when using ports, so I guess that is the way to go.

    1. Re:desktop: apt-get, server : make -params by Anonymous Coward · · Score: 0

      On BSD, you can use the ports system to build from source, or install a precompiled package from a binary package mirror (check pkg_add -r on free/open). Also, if you like the ports approach, you can use pkgsrc (the netbsd ports system) on other operating systems, like dragonflybsd, linux or solaris.

    2. Re:desktop: apt-get, server : make -params by dindi · · Score: 1

      hmm good info, thanks . pkgsrc: will look into it. Binary ports: it is good as source as it is :) there is space, time and CPU, so I just keep it working :)

  30. Wow, lay off the drugs dude. by Anonymous Coward · · Score: 0

    I got less than double the performance with that same test, so it sounds like you are full of it. And of course, simply using -O2 and -mcpu=i686 which is the defaults in most binary distros gives you almost identical performance to -O3 -march=pentium4, without the broken binaries that randomly segfault.

    And last but not least, if you think you can handle 3 times more SSL connections because openssl speed is faster, then you are nuts. Openssl speed is notoriously broken, giving wildly varying results. And even if actual ssl speed were 3 times better, there are still lots of delays in the course of an ssl http request that will take away alot of that 3x performance gain.

    1. Re:Wow, lay off the drugs dude. by Just+Some+Guy · · Score: 1
      I got less than double the performance with that same test

      Ah, so a 100% speedup is perfectly believable, but 200% is completely preposterous? Whatever. But even if it was only 50%, it's still 10 times better than the "no more than 5% improvement" being bandied around.

      At any rate, I guess you missed the words "on my server". I don't care about your server, or anyone else's. Mine ran measurably faster. Mod me down and whine about it all you want, but it doesn't change the fact that I ran the tests on my system and saw solid results.

      --
      Dewey, what part of this looks like authorities should be involved?
  31. Another great thing about managed code... by ThinkFr33ly · · Score: 2, Insightful

    ...is that you get the benefit of the optimization that can only occur when compiling for a specific machine without actually needing to do the work yourself.

    In platforms like .NET and Java the IL/byte code is JIT'ed before execution and can have these machine-specific optimizations inserted.

    No need to break out gcc or try and resolve dependencies. Ahh... I loved the managed world. :)

    1. Re:Another great thing about managed code... by SnprBoB86 · · Score: 1

      I concur!

      And there is the potential for future optimizations. For example: the CLR could conceivably do profile-guided optimization automatically.

      --
      http://brandonbloom.name
    2. Re:Another great thing about managed code... by Anonymous Coward · · Score: 0

      now, the problem is that you have to reJIT the whole thing any time you start the program (except if there are some kind of JIT cache)

  32. wha? by arsenix · · Score: 1


    precompiled binaries? isn't that what windows users use because they don't have a compiler?

    --
    (this is offended to the end of comments you post, 120 chars)
    1. Re:wha? by Goaway · · Score: 0, Troll

      Precompiled binaries is what Windows users use because Windows supports them, unlike Linux.

  33. Small systems by SDrag0n · · Score: 1

    I have a small, older (450 PII 256M, 10G) computer that my grandparents gave to me since they figured I could do something with it. I run gentoo on it for a few reasons (and yes, the initial install sucked, A LOT) but, it all fits very well on a small HD. I just recently installed CentOS for a friend to do some testing with on my system, I didn't even install all the software I have on my 450 and it took about 9G for the install. As cool as that is, for my older system, which I definately don't want to invest any money in, I'm not sure I could get everything I want on it with a 10G HD. I mainly use it as a development machine with LAMP, INTEL FORTRAN, and a few other odds and ends (yes, X is installed with KDE) and it fits well in about 6G of space because it doesn't have all the random things I don't use (see CUPS) My point in that while binary distrobutions are very nice to get a system up and running, they don't always fit the mold of what you need/want. There are too many other factors.

    --
    I don't have time to make a sig
  34. One niggle by caffeination · · Score: 1
    I nearly hosed my system when I hand compiled a development version of an exotic X server, but thanks to my hands on approach to system administration, I was able to get out of that doozey after mere hours of searching. God knows what I would have done about it if I wasn't so happy to dig in and screw with random shit!
    What can I say that won't come off as a flame? Ah! At least nobody will accuse you of lying about being a Gentoo user!

    By the way, the hands on approach is possible in other ways. I use Slackware and sometimes fuck with stuff too, but I get to be more intrepid than you because I've got less to lose, because when my system stops booting, it's back to normal after about an hour and a half of reinstallation.

  35. Sorry, I have to say this by Alworx · · Score: 1

    Sorry, I couldn't resist it:

    "in Soviet Russia, Binaries pre-compile you!"

    (don't know what that means, though)

    Alex.

    1. Re:Sorry, I have to say this by Anonymous Coward · · Score: 0

      You need to learn to resist, fuckhead lamer!

  36. Yet another... by Anonymous Coward · · Score: 0

    One true religion post. Yes, I understand that getting people riled up gets more adviews and generates more revenue, but I still wish Slashdot would have grown up and moved on from these kinds of topics.

    On topic:

    I think it's obvious that circumstances dictate the answer, like:

    Do you have the time to keep the binary up-to-date yourself?
    What's your goal here- Performance, custom feature sets, or just using the product?

  37. Stay true! by Kelz · · Score: 1

    Stay true to your roots and just hope your intelligence gets above a 10. Home-rolled binaries give that extra kick. Please make it a little harder!

  38. Custom for critical, vanilla for infrastructure. by khasim · · Score: 1

    From a maintenance standpoint, vanilla is better.

    From an optimization/customization standpoint, rolling your own is better.

    So, for the items that should be vanilla from company to company (DHCP / DNS / File serving / etc), I recommend using as vanilla a system as possible.

    In theory, there should be something that differentiates your company from all of the others. If this is an app or database or other computer related item, then it should be fully customized and fully documented. You want to squeeze every last ounce of power and functionality out of this.

    This way, the infrastructure will take up very little of your time so you can focus on the items that make the money for your company.

  39. Most binaries, a little compile by gullevek · · Score: 1

    In my long Linux usage time I used serval distros. One of them was Gentoo and at that time I thought compiling all from source is the answer to all the RPM dependency hell questions.

    Well, sorry, no, never. Compiling all makes absolutly NO sense at all, except for some special packages, where you have to do a special setup.

    You waste so much time with compiling (eg in Gentoo) and at the end you have more troubles with libraries, etc. I run Debian/testing on my workstation and on most of my servers and I only had _one_ issue and that was when I upgraded mysql from 4 to 5 and I had to convert some tables by hand. And I would have had the same issue with compile from source.

    So the only time I compile something is, when I need very special settings in a software. For example apache with php. Mostly I need some special things in PHP that might not be in the default binary package.

    And thats it. Compiling from source (especially in Linux where you have awesome binary distributions) is a PURE waste of time. I used Gentoo for one year and now I have Debian for more than a year and Debian one in everything, hands down.

    --
    "Freiheit ist immer auch die Freiheit des Andersdenkenden" - Rosa Luxemburg, 1871 - 1919
  40. The One True Answer by jd · · Score: 1
    It depends on what you're doing, what you need, why you're installing and what you're installing on. THAT is the only real answer - at least, in general.


    Specifically, if the default configuration is all you need, then go with the default. It'll make maintenance a lot easier and won't take up time doing customization that will never be utilized.


    If you need something fairly standard - or at least uniformly weird - and an installer is available, then Gentoo is an excellent halfway house. Because package interactions can be seriously complex, Gentoo cannot possibly deal with all situations well. It's only really viable if manual intervention to customize the specifics is fairly minimal.


    Finally, if you need something non-standard - a platform Linux will run on but no distribution exists for it, or you're doing high-end work and the exact package configurations necessary are outside of the norm, or if you HAVE to use a non-standard compiler (Pathscale, Intel, Green Hills, whatever) - then you definitely want to roll your own. You have no choice. None. Zero. Zilch. It doesn't matter what anybody says about difficulty, you'll just have to live with it.


    Well, almost. If you've a cluster, you only have to live with it once. You then use BitTorrent or a mirroring tool to duplicate your master image across the cluster. If you're using hardware RAID set to mirror between drives, simply pull out one drive and plug it into another machine and let the RAID controller copy the disk for you. You could even have your master machine run as a repository for APT or YUM, install a bootable core system on the other machines, and let the repository upgrade the other machines.


    (ROCKS uses BitTorrent to install itself over a cluster, which is neat and demonstrates how clusters need not be a problem for sysadmins.)


    There are so many variables and so many ways of fine-tuning each answer that the ONLY sensible answer is "it depends". Anything beyond that pre-supposes far too much.

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
  41. Sometimes optimization is trivial by Fished · · Score: 1
    I remember a program my boss hired written back on my first SA job. This program was to automate the creation of accounts on the university's UNIX systems. Unfortunately, when delivered it had a bug in the uid creation algorithm that gave it O(n!)--i.e. for 5000+ users, if you extrapolated the curve, it would have taken 5.2 billion years to finish.

    In desperation, because the developer was an idiot, I took a look at the code. By adding one word: making a variable representing the UID static, the app went from O(n!) to O(n). Of course, this was a college, so I didn't get a bonus. But the point is that simple optimizations often yield HUGE results. I'm tempted to say that complex optimizations are rarely as effective as simple ones.

    --
    "He who would learn astronomy, and other recondite arts, let him go elsewhere. " -- John Calvin, commenting on Genesis 1
  42. Agreed on FreeBSD by Penguinisto · · Score: 1
    When I started using ports, I was simply amazed. I'm not a real huge fan of *BSD yet (still beating the unholy crap out of chillispot as installed by ports), but I certainly have a huge amount of respect for the ease with which ports handles it all - and compiles it to taste.

    /P

    --
    Quo usque tandem abutere, Nimbus, patientia nostra?
  43. Using -Os (optimize for size) faster than O2!!! by Anonymous Coward · · Score: 0

    I found that using Os with gcc results in binaries that perform faster on my servers than O2. This doesn't happen 100% of the time, but it happens enough to make it worthwhile for me to recompile daemons like Apache2 and its modules using Os.

    I suspect that with smaller binaries, there is reduced disk I/O, reduced page faults, and reduced RAM usage which is more worthwhile than the extra optimizations in O2.

    1. Re:Using -Os (optimize for size) faster than O2!!! by pclminion · · Score: 1
      I suspect that with smaller binaries, there is reduced disk I/O, reduced page faults, and reduced RAM usage which is more worthwhile than the extra optimizations in O2.

      -Os and -O2 are closely related. It could be that some of the -O2 optimizations are actually counterproductive for your particular application. In addition, a smaller binary size means more code can fit in cache, which leads to fewer cache misses. -Os is the same as -O2 but with code-size-increasing optimizations turned off (such as loop unrolling).

      It would be enlightening to run the application under cachegrind with the two optimization configurations. I suspect that the -Os binary has a lower percentage of instruction cache misses.

    2. Re:Using -Os (optimize for size) faster than O2!!! by AliasN · · Score: 1

      A bit off topic, but I thought -0s binaries were rarely used in precompiled packages, and weren't reccomended by many? Maybe I'm completely off. As for compiling, I agree in some aspects, but others seem to be left out. Altivec makes a very big difference, especially with things like MPlayer, so it's important for PPC machines to have that enabled. It's just one of those things that gives it that extra special feel. Also, if a binary is 32-bit running on a 64-bit system, you will have a noticeable speed difference that running a completely native 64-bit version of that same app. I'm not saying that it's worth it to recompile Firefox so you can refresh slashdot even faster and nab that first comment, I'm saying it might be preferable in heavily used apps, such as Xorg, Luminocity (new OpenGL Windowmanager), Cedega and UT2004 (well, you can't compile those, but the thought is there), and things like MySQL.

  44. Gentoo vs. Debian by Noksagt · · Score: 3, Informative
    I usually find the most interesting criticisms of Gentoo (and the most insightful questions about it) come from Debian users. Yours are certainly no less relevant than others I've read.

    I've used both Debian and Gentoo. I am now (mostly) using Gentoo and not Debian. I hope you might find my perspective helpful. (But it should also be stated I also use ports on FreeBSD, and I have come to the conclusion that source-based distros are easier for me to use.)

    As for the first I think that compiling from source may well give you a speedup. But when my computer is setting with me at the desktop/ssh session very few processes are running and the network latency / my thinking time are most likely to be the biggest source of delays.

    How I'd love to have so much dead CPU time! If your computer's not doing anything for you, why bother having one? Truth be told, one can reap performance gains in more definitive ways than trying to have your compiler make different binaries. As you indicated, running few processes helps. As can swapping in a custom kernel and/or using a faster filesystem (both of which you can do on Deb fairly easily).

    True for heavily loaded servers the compilation might give you a boost but I'd be suprised if it was significant.

    I don't usually see a huge advantage, but it does depend on the app. For desktop users, app launchtime is often significant. I do think using '-Os' to make smaller binaries (which get into memory faster) does usually create a noticeable benefit. And for workstation/server apps, every few percent for "faster" apps could be helpful to some people (but I agree that it is typically only a few percent). But just leaving apps open is often "good enough" for load time & perhaps there aren't many who really need the extra few percent.

    These do strike me as an insanely useful thing.

    Yes. Absolutely. Particularly when you have relatively common needs across all apps. Perhaps you want to run an X-less server? Or perhaps you want to have apps with only KDE/QT or only Gnome/GTK+ or what not. USE comes to the rescue.

    But I have one niggling little doubt: I suspect they only work for code that supports it. e.g. project foo has optional support for libbar. If the upstream/original code doesn't have a feature marked as optional I don't imagine the Gentoo people would rework it to strip it out.

    You are typically correct. But the thing is that foo more often than not will have optional support for some feature. But some gentoo ebuilds do, indeed, have USE flags that aren't just ./configure flags for some applications. For example, you can install xpdf with the 'nodrm' use flag, which applies a patch to cause xpdf to ignore drm restrictions. Indeed, for making custom ebuilds, USE flags prove to be quite useful: you can use them to test multiple patches without the need to apply a given patch to all installations & can easily check which features a certain app has (by checking which flags it was emerged with).

    Finally the merging of configuration files in /etc seems useful. But I wonder if this is the correct approach. My distribution of choice, Debian, already does its utmost to preserve all configuration file changes automagically. I find it hard to understand what Gentoo does differently which makes it better.

    Gentoo's approach gives the user more choice. It preserves your old files by default. You can choose to replace the old config with a newer config or, more useful, merge (typically using sdiff) in changes between the old and new config. It doesn't choose what is best for you.

    Debian's defaults are normally sane. But not always.

    But one thing is true: If you're building from source and making use of modified USE flags and compiler flags then changes are you're the only person in the planet with a particular setup - that means

    1. Re:Gentoo vs. Debian by Anonymous Coward · · Score: 1, Insightful

      The way DFSG guidelines have effected package repositories has notably been unfortunate

      Unfortunate for people who don't care about freedom -- but if that's the case, why aren't you using Red Hat or SUSE?

  45. No difference 90% of the time by katorga · · Score: 1

    Machines are so fast today, that for personal use I don't see any difference between custom compiled code optimized for my cpu and precompiled. Bear in mind that most precompiled binaries are already available for the major cpu's (P4, AMD, AMD64, etc).

  46. How to get best of both worlds by kahunak · · Score: 2, Insightful

    When I started using Linux I started with an old Slackware, some time later I started to compile everything myself and test different gcc options, and even patched some programs to use a devfs only system. About two years ago I decided that I have nor the time neither the will to keep doing it, I switched to debian unstable, as I was used to be always on the edge. Now I run debian stable in every machine, the server, the desktop and the notebook. I have compiled, adjusting by hand every option, some packages like wine and mencoder, but just because I use both to heavy filter and encode The Simpsons from DVB-T everyday and it take about 10 hours to complete the job, so every little percent is important. Everything else doesn't need such hard tuning.

    Just compile speed-critical programs yourself and get everything else from a stable distribution.

  47. Re:Yeah, that will make people REALLY want to adop by Spaceman40 · · Score: 2, Insightful
    Look, when I download a piece of software, I want to click "install", and start using it.
    Why bother with the former? You want to click "install," and not just skip to the "using" part?
    --
    I [may] disapprove of what you say, but I will defend to the death your right to say it.
  48. Lame, Lame, Lame... by ickoonite · · Score: 0, Troll

    Really lame. I'd pen a post lamenting what Slashdot has come to these days, but that would only serve to convey an expectation of something greater, which, frankly, is just sad...

    So SM posts this for shits and giggles. Fair enough. It brings the Gentoo Ricer crowd out, which is entertaining for the rest of us and generates page views ergo ad revenue. I can almost see a four steps to profit cliché here, but I'll leave that to someone else.

    Seriously though, what a load of bollocks. I certainly can't claim to have the vintage of some of the 20+ years sysadmins on here, but I've been a Linux user for 7-8 years now and that is evidently long enough to come to understand the merits of package management. Yes, when you're fat and fifteen and still living in your parent['s|s'] basement with nothing better to do all day than stick it out watching makefile lines scroll by, Gentoo seems like a good idea. If you're really fucking sad, you might even notice a perceptible difference.

    But fuck, please stop trolling like a bunch of Mac/Ogg/etc zealots telling the rest of us about it - we don't fucking care. We have jobs to do, partners to go home to, lives to get on with. If I did still care for Linux on my main machine, Ubuntu would have me up and running in an hour or so - I couldn't have my computer out of action for a day because it's...er...compiling.

    Now don't get me wrong - I understand the mentality. I know the mentality. It's the same mentality that led me to reinstall Windows anything as frequently as once a week for a period in an attempt to get it running tip top. It's about the struggle, the fun of getting there, the war, the conflict, the strife - that's the fun part. I am of a computing generation that cut its teeth editing CONFIG.SYS and AUTOEXEC.BAT files with elaborate startup menu configurations to optimise memory availability for specific applications (remember expanded memory, anyone?).* And it was great - we loved it, well, some of us did - until we actually had to get some work done.

    Now I have to get work done, so I use a Mac. And countless Linux sysadmins out there will say the same thing - in the real world, you have to deliver results. Real, actual results. Dependability. Not downing the server every evening for a recompile. Reliability. Actual rather than theoretical uptime. We simply don't have time to be sitting round waiting for X to build so we can just sling some graphics on the screen.

    And if y'all were doing something useful with your lives, neither would you...

    iqu :|

    (* Kudos to John Gruber for reminding me (through quoting someone else) of the glory days of MS-DOS - choice quote: "As a PC user, enduring the grotesqueries of that experience is something that we are actually proud of.")

    1. Re:Lame, Lame, Lame... by Anonymous Coward · · Score: 0

      Parent should be modded down. +1 patronizing.

      "And countless Linux sysadmins out there will say the same thing - in the real world, you have to deliver results." Thanks for the 'real world' tip. Thanks to all you my-sysadmin-experience-is-best zealots for shining the light on those evil gentoo zealots. Troll.

      I strongly support choice. If you (as the all-powerful sysadmin) decide you job is better performed by , use it. I don't care.

      The merits of a distribution for many people are its flexibility and customizability, not the ease of administration for some sysadmin. You might be right about your point, but your presentation was poor.

  49. But by Noksagt · · Score: 1

    You can install source dpkgs and binary ebuilds too. (I also use FreeBSD, but think that portage has smoothed out installation from source & that dpkg is fine for installation from binaries.)

  50. Depends really by DrSkwid · · Score: 1

    On whether I have the 45 spare minutes required to compile my OS and applications from scratch ?

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  51. Moox builds of Firefox by Mike+McTernan · · Score: 1

    I like the middle ground of having a range of pre-built binaries that are optimised for common machine types, allowing the user to install the one most appropriate. This allows benefits in performance, as well as reducing the permutations of the software that need supporting.

    The Moox builds (http://www.moox.ws/ of Firefox did exactly this, and gave a noticable performance increase over the 'regular' mozilla.com pre-built binaries for Win32. Before the site went down, there were also benchmarks of his builds showing the performance increase - the PDF is still in the Wayback machine linked from the following page: http://web.archive.org/web/20050216043112/http://m oox.ws/tech/mozilla.

    --
    -- Mike
  52. To waist or not to waist? That is the question. by Device666 · · Score: 1

    I don't care only about some 10%. Compiling from source, means that you learn to know which packages are sometimes a pain in th *ss to compile. There are a lot of practices where all the benefits of rolling your own binaries is total a waist of precious time. But in some conditions people want to use open source code, want to compile them and hate to be dependant on some company or organisation which does all the compilation for you. Ofcourse you can always compile the stuff you want, but for the sake of clarity and control it can be a good thing to have some source packaging system like BSD ports or portage (gentoo). For Developpers this is a great thing. trying to get your granny to learn OpenBSD will definately earn you geekpoints, but if she is not a developer she wouldn't probably need it. Other people want to investigate what stuff is new in general and they want to do it in some managed way. The source based gentoo was the first linux to boot on macintel hardware. Having knowledge of your system (including code) and gives maximum control to hack. For the linux distributing organisations it can be less trouble to distribute source, it relieves you of the wait of time to compile every piece of source to some specific platform and use the valuable time to to more important things, bug fixes or porting. Source is especially useful when there is only source available and no binary. If you are a security expert and you have written some revolutionary malloc (fuzzy stuff to prevent happy heap hacking) you can easily try to spot the new bugs. Research and knowledge sharing is a valid reason to compile from source. Source code is also great for amateurs who want to learn about all about *nuxes and accompanied freedoms in theory and also in practice. And there are lot of other uses to which compiling is a great thing to do. But if you only like things out of the box, you're completely waisting your time, then go binary. It's nice to know there is some open source to see and have the proof of compiling it, if no one would care about compiling from source we all would not care about binaries also and everyone would be using probably Windows. "Use the source Luke"

    1. Re:To waist or not to waist? That is the question. by kv9 · · Score: 1

      10% off your waist aint that bad

  53. Why can't ALL oses do this? by enmane · · Score: 1

    I wondered this when I heard about Gentoo.

    Let's see, all cpus have a CPUID string, the memory is reported by the BIOS, and I would think the chipsets should be able to get worked out also. In other words, isn't all the hardware able to get probed during boot up and if so, then let the OS set the flags properly and take 1.5 hrs to install instead of 0.5 hours (if I so choose).

    If I want other packages installed, just be sure to check a config file created by the OS during install and set the proper flags and go to town.

    Gentoo is based on the user knowing the ins and outs of their system but isn't this something that can be automated? Why can't the OS figure out what the best flags are to set? Oh well, call me K-RAY-Z!

  54. Debian! by myowntrueself · · Score: 1

    I've used gentoo a lot at home and debian a lot at work.

    Debian really does demonstrate the problems inherent in letting someone else make decisions about what options and dependencies should exist for a piece of software.

    To see what I mean, you have a freshly installed debian box you want to monitor with nagios.

    So, you want to install the nagios nrpe server on this machine.

    The Debian package for this is in two parts:

    1. nagios-nrpe-plugin

    This is the plugins that are actually used by an nrpe server. If you install this, the nagios monitoring server cannot connect to your freshly build server to monitor things under nrpe.

    2. nagios-nrpe-server

    This is the actual nrpe server component; the part that listens on the network for the nagios monitoring server to connect and to get it to run the various plugins.

    Ok so on your freshly installed, lean mean serving machine (well as lean and mean as a default Debian install can be with the c compilers, ppp et.al.) do;

    # apt-get install nagios-nrpe-plugin nagios-nrpe-server

    and be prepared for a shock at what else it wants to bring in.

    Its a database server? No webserver required?

    TOUGH SHIT!

    The Debian package maintainer *decided* that if you want the nagios nrpe server component you also MUST have the nagios server component itself, and this requires a webserver. And thats just one example.

    With gentoo I get to set my USE flags according to what *I* want support for.

    However I would never consider using gentoo in a production environment. Never. Thats after two years of using it at home.

    --
    In the free world the media isn't government run; the government is media run.
    1. Re:Debian! by elyograg · · Score: 1

      I use Debian for any server systems I can. I've wanted to try Gentoo, but my spare hardware is all very old and slow, so inertia keeps me on Debian.

      In the current stable release of Debian (sarge), the nagios-nrpe-plugin package does indeed depend on the actual nagios program, which through other dependencies, requires a webserver. Considering the massive number of packages in Debian, it's amazing there aren't more stupid problems like this.

      On the testing and unstable versions, the dependency on nagios has become a recommendation, so this is no longer a problem. Gentoo would be a way around the problem without running whatever risks are inherent in the testing and unstable distributions.

      --
      - "Well?" "Deep Subject."
    2. Re:Debian! by Schraegstrichpunkt · · Score: 1
      That sounds like an oversight on the part of the developer. Did you file a bug report?

      In any case, the dependency isn't there anymore.

  55. compiling from the source... by v3xt0r · · Score: 0

    is the way to go.

    I don't mean, compile the ENTIRE OS from source, that will take hours, if not days (or even weeks).

    Slackware is a great distro. Debian is also very nice. Redhat, Suse, Fedora, and Ubuntu are just not for me.

    I like slackware because you can install ALL of the applications that come with it, and then easily 'removepkg ...' to remkove the packages that I INSIST be compiled from scratch, which are usually Network/Server related.

    Desktop applications I could careless about, I'll install a package for say, jedit, but not for Apache.

    It's nice to be able to write your own shell scripts that perform all the required installation commands, and then easily replicate the hell out of a server farm with no hassle, but that can be done with any distro really.

    --
    the only permanence in existence, is the impermanence of existence.
  56. Always use pre-compiled binaries by Simonetta · · Score: 0, Flamebait

    Always use pre-compiled binaries. It's a no-brainer. Source code is only for modifing something that the developers forgot or refused to do. And it's only for professionals with a lot of time on their hands. It is never cost or time-efficient to do your own compiling.

        Any good reason for having the users of a program compile their own binaries is a good reason not to consider using Linux at all for anything serious. Because if there is any good reason to compile binaries then it means that the program is not stable or finished or even well-planned. And these kind of programs are ones that you don't want to mess around with unless you're getting paid for it or have some unusual emotional attachment to the application.

        It's just common sense.

    1. Re:Always use pre-compiled binaries by v3xt0r · · Score: 0

      Customization, Flexibility, and Security.

      3 reasons why I prefer to compile (Network/Server) applications from the source.

      --
      the only permanence in existence, is the impermanence of existence.
  57. Compiler more important than compiling? by lawaetf1 · · Score: 4, Interesting

    Fine the subject doesn't make complete sense.. BUT... doesn't compiling code with Intel's cc result in significantly better binaries than any flag you can throw at gcc?? From http://www.intel.com/cd/ids/developer/asmo-na/eng/ 219902.htm, MySQL claims 20 percent performance improvement over gcc.

    I'm not saying we all have access to icc, but if someone wants to make a binary available, I'm more liable to use that than compiling from source. Call me crazy. And I know someone will.

    --
    CommentBot 0.7a running with args "-module irritate,disagree -target random"
    1. Re:Compiler more important than compiling? by Pop69 · · Score: 2, Informative

      doesn't compiling code with Intel's cc result in significantly better binaries than any flag you can throw at gcc??

      Not if you're running on an AMD64 it doesn't.

      http://yro.slashdot.org/article.pl?sid=05/07/12/13 20202

    2. Re:Compiler more important than compiling? by evilviper · · Score: 1
      doesn't compiling code with Intel's cc result in significantly better binaries than any flag you can throw at gcc??

      Depends on the code. With things that have been highly optimized for speed already, such as xmame, mplayer, etc., icc may churn out slow or (often) even corrupt code.

      With ICC, or with gcc using aggressive cflags (ie. -O3), I'd do some very extensive testing to make sure numbers aren't getting swapped somewhere in the process. Significantly better compiler performance often comes at the cost of opmitizing out important pieces of code.

      ICC is at a huge disadvantage just due to GCC being so very easily available. Coders for CPU-intensive programs do some tricks to opmitimize for gcc, or re-write in assembly things GCC can't make fast enough... ICC doesn't have anything like that.
      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
  58. Bytecode? by GWBasic · · Score: 1

    I thought bytecode was supposed to solve the problem? Specifically, with .Net, you can run a program that caches a compiled version of a .Net assembly. In theory, it could compile it to run optimally on your specific chip.

  59. It's not really about performance by martinde · · Score: 4, Insightful

    (Full disclosure, I've been using Debian since 1996. I'm backporting packages to stable as I write this, so I'm definitely not coming from a "one size fits all" perspective.)

    If there is one thing that appeals to me about Gentoo (as I understand it), it's the concept of meta-configuration at build time. Unfortunately, lots of options in packages get configured at BUILD TIME, so either the binary packages have those options on, or they don't. When this is the case, if the distro doesn't provide multiple binary packages with all of the useful configurations, then you end up having to build from source. (IMO, building from source means compiling from source packages whenever possible.)

    So I like the concept of saying in one place, "build for KDE", "build with ssl support", "build with ldap support", etc. Maybe someday everything will be runtime configurable, but until that day, I'll be wishing for that meta-level of configuration...

    Having said all of that, check out apt-source, apt-build, and their ilk if you're interested in "Debian from source". Debian binary packages solve about 97% of my problems so I'm not usually looking for "make world" kind of functionality.

    Enough rambling for now.

  60. Commie 64 Linux by Heembo · · Score: 1

    I'm most partial to my Commie64 Linux distribution solely for the Commodore 64. I have to recompile just about every linux package known to man, only 1 out 1000 OSS projects actually work, and the hardware is rather limiting, but MAN am I COOL!

    --
    Horns are really just a broken halo.
    1. Re:Commie 64 Linux by Captain+DaFt · · Score: 1

      I think you were being facetious, but you got my curiosity up.
      Dang! It's real! (Well... LUnix - the Next Generation, instead of Linux) But Dang!
      http://lng.sourceforge.net/

      (Now where is BSD for Commodore?) };-)

      --
      The U.S. really needs an English to Wisdom dictionary.
    2. Re:Commie 64 Linux by Heembo · · Score: 1

      I *was* being facetious, but now I'm running to my basement to grab my Commie 64! Let the party begin!! w00t w00t!!!

      --
      Horns are really just a broken halo.
  61. Native Mac Intel by mike3k · · Score: 1

    Since I got my Intel mac, I always install source packages with Darwin Ports since almost no prebuilt packages are Intel native.

  62. That's not a good example. by Grendel+Drago · · Score: 1

    The thing wasn't so much that you were stunningly clever; it seems to be that the developer was so, so, so boneheaded. But the sorts of optimizations being talked about aren't about correcting insanely stupid errors so much as they're about making subtle, marginal changes. I doubt there's that much paper-bag optimization to be done in mysql, for instance...

    --
    Laws do not persuade just because they threaten. --Seneca
  63. More to the point... by Pliny · · Score: 2, Informative

    A vast number of regularly updated packages. Put simply, I can emerge almost anything, whereas every other distribution I've used, sooner or later I come across a package I need which doesn't have an RPM or what have you, and I have to build my own complete with the dependency hell that can entail.

    More than that, almost half the time you can install an updated package not yet in Portage by renaming the most recent ebuild to match the new version number.

    If that fails, you can invest a few hours and learn how to write your own ebuilds... It's insane how easy it really can be to get any bleating edge bit of software running.

    --
    What does this button d$#%* NO CARRIER
    1. Re:More to the point... by Anonymous Coward · · Score: 0

      Erw, invest a few hours?

      So you're spending a few of your employers hours to get something like this working? Looks like you're not busy enough.

  64. I switched from Gentoo to Ubuntu... by Anonymous Coward · · Score: 0

    ...when I realized that I could get a better speedup by working at minimum wage for every minute that would go to compilation, then using the money for faster computers. :P

  65. Different Reason for Using Gentoo by zbyte64 · · Score: 1

    TBH, none of those reasons are the deciding factors for why I use Gentoo over Debian.

    Now before I continue and get flamed to death, I'll be the first to admint that Debian is one of the best distros out there. But it is only my second favorite.

    I use gentoo simply because I like how it does the configurations. Its a bit hard for me to explain, but I find it consistent and logical. That may seem like a small/unimportant reason to choose a distro, but it is the deciding factor for me when I have to choose between debian and gentoo.

    Now what I would really like to see (but won't happen) is have gentoo also be able to use debian packages. I love how packages install fast on debian, as well as the selection. But I love allot of things about gentoo. Ofc, I imagine this would lead an array of problems dealing with libs. Heck, I sometimes have problems porting my gentoo program to debian due to different lib names.

    All in all, it comes down to the user and what they prefer. I value certain things that other people value differently. This is why there are so many distros to begin with. So plz stop saying one distro is waaay better then another, unless ofc, it truelly does suck (dead project, poorly implemented project, etc). Ya that sounds contradictory, but there are distros out there with next to no redeeming values except for that fact someone used it as a learning tool (which is a good thing).

  66. You gotta love 'if it moves, compile it' boys... by ezh · · Score: 2, Funny

    Boss: Jack, I want this new webserver machine to be up and running as soon as possible
    Jack, the Gentoo Admin: Yes, sure chief! It will take just a couple of days to compile everything...

    What do you think is gonna happen next?

  67. Love portage, hate compiling by amigabill · · Score: 1

    I really like Gentoo's portage package system, but I hate waiting for the thing to compile everything. While there are some binary items in portage, there's way way more source-only things.

  68. Multiple Versions Required by Killer+Eye · · Score: 3, Interesting

    In my experience, it is often necessary to recompile from source simply to have more than one version of the same package available at once! Too many pre-built binaries assume they are the only version in the universe you could want in /usr/local/bin.

    For some packages a recompile is merely annoying, having to download and reconfigure with a new prefix and rebuild; but for others, it can be a horrible web of configuration options to find numerous dependencies in special locations. This complexity can be really frustrating if all you want to do is relocate the tool so two different versions can be installed.

    Pre-built binaries should assume by default that they'll go into a version-specific directory (say /opt/pkgname/1.0), and at the same time they should assume their dependencies can also be found there. The /usr/local hierarchy would remain, but as a hierarchy of references to specific versions of things. The /usr/local hierarchy would contain selected default versions, it would be used for efficient runtime linking (have "ld" search one "lib", not 20 different packages), and it would be targeted for dependencies that truly don't care about the version that is used.

    There are other details, of course...for example, it may matter what compiler you use, you may want 32-bit and 64-bit, etc. But the basic principle is still simple: have a standard package version tree on all Unix-like systems so you can "just download" binaries without conflicts, once and for all.

    --
    "Microsoft killed my company, I hold a personal grudge. I don't use Microsoft products and neither should you."-JWZ
  69. Solaris & SysV by phocutus · · Score: 0

    I build SysV Solaris packages all the time for my company. Places like Blastwave (for Sun Packages), or RPMs for LINUX Distro's always tend to throw dependences you don't want. I like controling the software install I make. I usually find it easier to build my own package, do a checkinstall, preinstall, postinstall, request, and depend script and tah-dah! Deployment package in the macking totally customized for the intended purpose. Which can be cookie cutted. Depending on your needs, you may not mind installing EVERY fscking RPM for a dependency, but I prefer controlling every aspect. Not ot mention building specific optmization for our Opteron / SPARC servers.

  70. Right tool for the right job by tuna_boat_tony · · Score: 2, Informative

    Precompiled binaries suite most situations. IMO, it's silly (and time consuming) to compile everything from source all the time. However, if you need a newer version of a program or some specific settings comiling from source is the way to go. Arch linux approaches this well. They offer optimized, often completely up-to-date, precompiled binaries in pacman, but allow you to build from source with the Arch Build System if neccissary.

    1. Re:Right tool for the right job by tom8658 · · Score: 1

      Absolutely. Why compile gAIM and XChat from source? They spend 99% of their time waiting for user input anyway. Pacman installs tools like that for me in half a minute. When I want to compile something from source, like MySQL, not for speed but for security reasons (protection against pre-rolled buffer overflow attacks), ABS makes that easy too. Add "-custom" to the name, point it at the current source tarball, and when security fixes get rolled out in the new version, just run makepkg again. It's a wonderful package manager, and the base install is tiny. Like Slack for i686.

  71. Mark Twice With a Micrometer, Cut With an Ax by Doc+Ruby · · Score: 1

    Basic software production rule: first get it to work at all. Then optimize it.

    --

    --
    make install -not war

  72. Crack-smoking moderators????? by Anonymous Coward · · Score: 0

    How on Earth is this man's comment a troll? The moderator is way off-base.

  73. That is why I still use Debian over Gentoo by clump · · Score: 1
    1. If the user has NOT changed their local version, just upgrade to the new distributed default. The assumption is if they were happy with the old default, they'll be happy with the new ones. This covers the vast majority of cases. 2. If the user has changed their local version, offer them the chance to look at the diff, and then either overwrite, don't overwrite, or shell it and deal with by hand. If they choose not to overwrite, then the distributed default is left alongside the real config file for later perusal/integration.
    I liked Gentoo when I tried it, but it annoyed me to no end how config files were handled. I vastly prefer the Debian way you describe. Perhaps things have changed in Gentoo, as the last time I used Gentoo was ~2003, however I recall a minor Gentoo update to /etc/passwd was a major pain for me to deal with. I felt much more confident with Debian's handling of config files.
  74. Good ol' Fedora. by dfloyd888 · · Score: 1

    This is my two cents, but I still use Fedora, but there are a number of high quality distributions out there that may be the best fit for you.

    I know that Debian and others have very good methods to ensure that packages are signed, but for me, Redhat's rpm is one of the best ways to validate a package. The signature is included with the package, and assuming I have a valid public key from the maker of the package, I can obtain rpm packages from any source, and with a rpm --checksig, check for tampering before the packages are installed. Of course, packages have a MD5 hash, which easily determines if the package was accidently corrupted.

    With RedHat, Fedora, and other rpm based distributions, I can check if files have been tampered with with a single command. Its not as thorough as Tripwire, but its another way to check integrity of a system's files and permissions as originally installed. Its not perfect, as you will get lots of false positives (especially if lock down all but vital SUID files and use wrappers), but its a good guide. Checking files agains rpm's database is not secure against a hacker or program that edits the rpm database, but it provides some help should I suspect binary corruption.

    Of course, I'm forgoing the fine-tuning of binaries that one gains with Gentoo or a source-based distribution, but for what I use Linux for, Fedora is fine.

  75. O/T question answering by Al+Dimond · · Score: 1

    After you get the "238 files in /etc need updating" thing, issue "etc-update". It will lead to a menu-based program where you can view the diff between the old and new files and choose either to use the old, use the new or merge manually.

    I suppose if you had a binary in /etc somewhere it might throw you in $EDITOR to edit that file out of mild ignorance. Perhaps a check must be done on file types. I've never run into this myself; must not have any binaries in my /etc tree.

  76. precompile of the masses by icepick72 · · Score: 1

    From the other perspective, if Microsoft has for years gotten away with providing the same binaries to all users and its popularity has not decreased because of it, I cannot see why precompiled binaries on any platform would make a difference to the end-user. Yes, they do make a difference to the developer, administrator, etc. but if it makes a difference for one developer and no difference to 100 end-users, why not just keep it precompiled. I know ... speed, feature bloat, security, etc. but from the end-user perspective it means jack-sh**.

  77. In SOVIET RUSSIA.. by Anonymous Coward · · Score: 0

    .. packages compile YOU!

  78. I got Karma to burn by sheldon · · Score: 0, Flamebait

    So I was curious about the author...

    http://www.edtittel.com/etbio.htm

    This is the shorter version...

    Ed started out with an academic career in Anthropology. He then realized that digging up old bones had no future, so he got into computers in 1981.

    Since then, Ed has been utilizing his anthropology experience in the computer field, by digging up old computing techniques and trying to do things the hard way, just like back when he started in 1981. That's why he advocates for you to compile your own version of every package rather than just accepting the defaults, like we did in the old days. Ed also advocates recompiling because it allows you to pick options, being completely unaware of new modern technologies such as dynamic link libraries(otherwise known as DLLs) which incorporate optional components at runtime instead of needing to be linked in at compile time.

    Ed spends an awful lot of time writing books and articles instead of having to get real work done like most of us in the business, which is why he's so concerned with a stupid question like compiling packages from scratch.

    In short... this is by far the stupidest article I've read this month on slashdot, and Zonk posts a lot of really dumb articles so that's really hitting the bottom of the barrel.

  79. Ubuntu User by 4ndys · · Score: 1

    As an Ubuntu user, I've found apt-get gives me pretty much all I need, and it's in deb form. If I do compile from source, I'll use sudo checkinstall rather than sudo make install, as then I get a deb at the end that I can remove just as easily as I installed it.

  80. FreeBSD by vga_init · · Score: 4, Interesting
    For years I lived in the world of FreeBSD.

    Not only had I built every package from source (using ports), I also took the trouble to rebuild the base system and kernel with a custom configuration and options.

    The benefits to some of this were obvious; the FreeBSD GENERIC kernel at the time seemed (to my eyes) to suffer a massive performance loss from its configuration. Anyone running FreeBSD *must* build at least a custom kernel, even if they use the binary distribution of everything else.

    It was a lot of effort. What did I get out of it? It was by the end one of the speediest systems I had ever used since the days of DOS. Most programs loaded faster than their binary equivalents (on older machines the differences were more glaringly obvious, such as the time it took to initialize X).

    One time I clocked my old machine, running a custom built FreeBSD installation, against the other computers in the house from power-on to a full desktop (after login).

    On my machine, the entire affair (BIOS, bootloader, bootstrapping, system loading, X, login, desktop environment (WindowMaker in this case)) cost a mere 45 seconds. My father's machine, which was in all respects a faster computer, loaded Windows 2000 in the course of perhaps two minutes. Also, I stopped timing after the desktop came up, but Windows does continue to load and fidget about for a good while after that. The extra time taken for it to settle down would have cost it another minute, but only because of all the crap my dad had set to load, which I don't blame Windows for.

    The kitchen computer also ran Windows 2000, but had a slimmer configuration, so it loaded shortly over a minute. FreeBSD, however, still beat them both badly.

    In light of my own experience, compiling from source can get you some rather wonderful results. However, I noticed that not all systems were created equal. While FreeBSD GENERIC was as slow as molasses, I find in linux that the binary kernels that come with my distributions seem to load and operate just as fast, if not faster than my custom build of FreeBSD. In linux I have used only binary packages, and the system overall "feels" just as fast, though some operations are a little slower (like loading emacs ;)).

    I appreciate the arguments presented by both camps, but I feel the need to point out that some are too quick to downplay the possible performance gains offered by custom builds, because they certainly exist. Sometimes they can be noticeably significant.

    1. Re:FreeBSD by Just+Some+Guy · · Score: 1
      I find in linux that the binary kernels that come with my distributions seem to load and operate just as fast, if not faster than my custom build of FreeBSD. In linux I have used only binary packages, and the system overall "feels" just as fast, though some operations are a little slower (like loading emacs ;)).

      I use both Linux and FreeBSD at home and work, and here's my take on it. FreeBSD seems to be designed for maximum throughput, whereas Linux seems to be designed for maximum interactivity. My Linux desktop feels a lot snappier than it did when I was running FreeBSD on the same hardware, but I think I can push more (email / web queries / database transactions ) through our BSD servers than their Linux equivalents.

      Still, I know that's a massive generalization and not always true. I usually use Linux for the desktop because many desktop applications are written assuming Linux, and I usually use FreeBSD for the server because administering it is easy and many server apps are tested heavily on it.

      --
      Dewey, what part of this looks like authorities should be involved?
    2. Re:FreeBSD by deathjestr · · Score: 1

      The differences in boot times of your systems seem irrelevant. First of all, you aren't comparing custom built FreeBSD to prebuilt FreeBSD, you're comparing it to Windows 2000. The two operating systems are so different it's hard to come to any meaningful conclusion regarding the advantages of building from source by comparing them.

      Most people would agree that there is a large difference in bootup time between a GENERIC kernel and a custom built one, but bootup is a special case. The GENERIC kernel is built for compatibility, so there are all sorts of drivers built into it that many people don't use. They're there so people can boot the system and have it 'just work'. At boot time, the kernel has to probe everything and figure out what drivers are best suited for each piece of hardware in the system. If the kernel has a larger pool of drivers to choose from, this process takes longer (as you would probably expect). When a FreeBSD user custom-builds a kernel, he usually takes out all the drivers for hardware he doesn't have or doesn't want support for. This makes the pool of available drivers smaller and hardware detection at boot time becomes faster.

      But how quickly a system boots says nothing about how well it performs once it is up and running. While speed at bootup may be important to some people, such as laptop users, what everyone really cares about is the performance advantages of custom-built applications (or a custom-built world/kernel) once the system is started. While I have never done thorough performance benchmarks to compare custom-built applications with pre-built applications, I would expect the performance advantages to be nil.

      The overwhelming majority of user applications perform calculations for no more than 5 milliseconds before they give up the CPU to wait for I/O anyway, and a recompile isn't going to speed up your hard disks, your PCI bus, or the speed at which you can press keys on your keyboard. What a desktop user should care about more than speed is response time, but this is a property of the OS that is in most cases completely independent of the application.

      I'm not really sure whether I'd expect a measurable difference in performance between a custom built kernel and a prebuilt one. But if you watch your FreeBSD kernel build, you'll notice compiler flags like --nommx, --no3dnow, --nosse and --nosse2. This means that many of the features exclusive to newer processors are not being used by the kernel anyway (this isn't a bad thing - the kernel simply can't do anything useful with them).

      As always, there are some exceptions to what I've said here. For example, a special-purpose scientific application which spends a lot of time on the CPU and very little time doing I/O would certainly benefit greatly from a custom build optimized for your processor. A compute-intensive graphics application or a big first-person shooter game would probably benefit as well.

  81. The Myth of performance by Ulrich+Hobelmann · · Score: 1, Interesting

    Why should self-compilation give you ANY performance at all? Compilation is nothing but the automated translation of source code into binary machine code (put simply).

    Now assuming that most people use the same recent version of a given software, and the same recent version of a compiler (like GCC), and a few reasonable optimization flags, why should the resulting compiled binary differ AT ALL across different systems? What difference is there between compiling yourself, or having someone else compile it FOR THE SAME SYSTEM (say, Debian, NetBSD, or Gentoo), and having you install a binary BIT-FOR-BIT copy of that binary?

    Sorry, but are you guys on drugs?

  82. Compile by religion by Anonymous Coward · · Score: 0

    Vrooom vroooooom! CFLAGS just kicked in, yo!

  83. The world made easy for you by SpaghettiPattern · · Score: 1
    If you are a corporation:
    • You of course have a clear idea of how your systems should be installed.
    • Get an OSS partner. (RedHat, Novell, whatever.)
    • Demand signed, performing banaries for software you don't need to tweak.
    • Demand source coude just in case.
    • Work closely with you OSS partner to improve the distribution.

    If you are a small/medium company:
    • Clearly divide OS and data partitions.
    • Make clear and simple user and group scheme.
    • Make clear and simple file sharing scheme.
    • Make automount scheme.
    • Fully mirror your disks.
    • Choose a Linux distro (whatever.)
    • Install your systems with it.
    • Close your firewall for anything you don't need.
    • Update as infrequent as possible. But don't be sloppy on security.

    If you are a domestic lazy bastard like I am:
    • Do like small/medium companies would do.
    • Live a life with SO, kids, whatever.

    If you are a purist unlike me:
    • Don't make cook book lists.
    --

    I hadn't the slightest objection to his spending his time planning massacres for the bourgeoisie... (P.G. Wodehouse)
  84. Only when I need a specific feature by _Shad0w_ · · Score: 1

    Once upon a time I used to compile my own binaries; now days I have better things to do with my time.

    The only time I compile my own binaries now is when the standard binary package doesn't have a feature enabled that I want, the most common example of that is Exim. In those cases it's just a case of doing an apt-get source, modifying the appropiate files and then doing dpkg-buildpackage. Voila, nice binary packages built the way I want them.

    --

    Yeah, I had a sig once; I got bored of it.

  85. Check out acovea by Random+Walk · · Score: 1
    Nonsense. Recompiling the same code provides a 0% performance improvement, because it produces an identical result. Most packages I have seen on Linux distros are compiled with -O2 or -O3.

    First of all, -O2 or -O3 might not be the best choice - for each given piece of code, there is almost always some arcane combination of switches that produces faster (10 per cent or more) executables than -O2 or -O3. There is an open-source tool (acovea) to find the best combination of switches for a given program. See the benchmarks posted there.

    Second, if you compile yourself, you can use icc (the Intel compiler), which usually (but not always) produces faster executables than gcc (see the benchmarks).

  86. You hippie bastards by Anonymous Coward · · Score: 0

    "Rolling your own"? Good God people. Don't get me wrong, I like Linux as much as the next non-conformist tech guy, but must we have this euphemism? I swear, if the penguin gets replaced with a cartoon Che Guevara, I'm quitting the internet.

  87. The key word in your post by Anonymous Coward · · Score: 0

    is lab machines.

        Hint: the vast majority of companies do not have any labs. So you might ask yourself, pinky, "is my experience in any way representative of the vast majority of corporate computer usage?"

        I've worked in research (corporate, defense, & academia) as well as in industrial production, financial services, and medical records. Any place with labs is completely different from the corporate mainstream. So I think the answer would be No.

    1. Re:The key word in your post by TheCarp · · Score: 1

      Welld epends on the type of lab.

      I work ina corperate environment and we have a "lab" but its a testing lab for pre-production work, hardware certification, etc.

      Basically, its where I would live if it wasn't for console servers.

      -Steve

      --
      "I opened my eyes, and everything went dark again"
  88. Professional IT by w128jad · · Score: 1

    Compilation for the source is sometimes a bad idea if certification concerns are an issue for your business.

    In the enterprise environment, IT departments can typically have service contracts with software vendors and support consultants. These contracts typically require an "un-tainted" kernel at a minimum, defined as the vendor packaged binary distribution.

    For our Oracle support contract, we must have a specific formula of one binary distro OS (untainted kernel and libraries) to match a specific Oracle DB binary, etc. As soon as the support company (oracle) finds evidence that you "rolled your own", you just threw your support contract funds out the window.

    On the other hand, binary distribution of software is not always safe either. For instance, with RedHat support contracts, if you load a kernel module that isn't certified by RedHat for your binary kernel (for instance to support a filesystem that Redhat doesn't support by default, or a proprietary hardware driver), your kernel is flagged as "tainted" and your contract on that machine is void until you can standardize back to certified binaries.

    At least in this scenario, an administrator should practice care when deciding to compile any binary. If you want to be on the safe side, follow common Unix conventions of installing under /usr/local/bin, /usr/local/sbin, and /usr/local/lib for software and libraries you have compiled. Don't install software that loads kernel modules, unless you can be sure it is a certified binary. Ensure that you can install proprietary binaries under /opt.

    Never install a recompiled binary overtop of a file that in registered with a package management database if you intend to use the package management system in the future. It will cause a lot of needless headache when bugs start happening.

    Cheers!

    --
    w2^7me out.
  89. Science came up with a way to resolve these issues by dildo · · Score: 1

    Its called an "experiment". This is the idea:

    Troll 1 says: "My computer runs so much faster with compiled binaries!"
    Troll 2 says: "Balderdash! Precompiled binaries are just as good!"

    Mr. Scientist says: "This sounds like a testable hypothesis! Let's get two identical computers and compare the speed of different programs! We'll get a guy with a stopwatch to measure how fast it takes to do simple tasks, like booting up. Troll 1 and Troll 2 -- you guys can't be the guy with the stopwatch; in fact, I think you guys should stay 10 miles away from the lab."

    Troll 1: "But I just know that Mozilla boots 10 seconds faster if I've compiled it..."

    Scientist: "SILENCE! Anecdotes are not data. Especially when they come from a biased jerk like yourself."

    Troll 2: "See, these crazy gentoo guys... [mwrfff!]"

    Scientist: "[Stuffing sock in Troll 2's mouth] The SOB may be right, but you'll look at the data that proves him correct and never accept it."

    [Scientist lets out a deep sigh.]

    Scientist: "Ok. The computers will be exactly IDENTICAL except for the different versions of the program. We will have stopwatch guy measure the speeds of each program at least 10, probably more than 40 times. Stopwatch guy will be a grad student who is more interested in girls than Linux -- wait, we will make sure that he has no idea what Linux is. We won't tell him which computer is running which version, just in case. We'll just pay him $10 an hour to do these boring ass tests."

    Troll 1: "But what about the USE flags that we compile the binary with?"

    Scientist: "We will do a trial for each possible USE flag. We will toggle every single variable and compare it to a control. The grad student will spend a lot of time doing this sort of thing, (but grad students are made for slave labor...)"

    Troll 1: "I'm sorry, what were you talking about? We were busy writing more posts to this slashdot thread thoroughly trashing each other."
    Troll 2: "Yeah, I'm pointing out to this jerk that I've been a sysadmin for my basement Beowulf cluster of NetBSD equipped toasters for over a decade, and my extensive experience says that it takes forever to compile anything on a Toaster, so the net time I would lose through compiling would outweigh any runtime advantages until I've toasted 4 gigaloafs... only at that point would I begin to save time."
    Troll 1: "And I'm pointing out how I installed Gentoo on the aerofoil of my car and the friction on my wheels is up over 0.1%, effectively overclocking my car's engine by over 5 horsepower -- never mind that my 57 horsepower engine never gets up to speeds large enough to experience any significant gain..."
    Troll 2: "You installed Gentoo on your car? How do you compile using a car? Do you lift it off the ground and spin your wheels in the air for three weekends..."
    Troll 1: "You're so old. I've even managed to compile Gentoo on my girlfriend..."
    Troll 2: "No doubt a RealDoll equipped with the vibration pack from a Nintendo 64-"
    Troll 1: "-I wrote my own vibrate driver and installed it in the RealDol-"
    Troll 2: "-Man, that is nothing compared to the driver I wrote that toasts a devil shape into the toast-"
    Scientist: "-excuse me-"
    Troll 1: "-when I'm overclocking my girlfriend sometimes I have to cool her off with liquid nitrogen-"
    Scientist: "-sweet lord! I can't take this crap anymore! It's like watching a debate between Flat Earthers and Intelligent Designers! I only did this to get my own IgNobel, but it just isn't worth it anymore. Get the hell out of my office, and stop using my wireless, you pathetic losers!."

  90. Re:You gotta love 'if it moves, compile it' boys.. by Raptor+CK · · Score: 1

    That gentoo admin isn't very good, then.

    He should have prepared a stage3 tarball from a similar server. In a redundant environment, this should be easy, since he'd just dupe it all from the existing box. Heck, if the systems have identical hardware, then you'd just clone the entire install, change the hostname, and walk away. At worst, that's a couple of hours, though if you've got a small base install, a fast disk array, and GigE (hell, pick two of the three,) you can wrap it up in half that time.

    Even if this isn't an option, why isn't he bootstrapping with distcc, using Catalyst, or otherwise distributing/pre-building for the setup?

    At any rate, a halfway decent workstation can go from stage1 to GUI with OO.org and all the crap in between in about 24 hours, if you know what you're doing, and that's with one CPU. Sure, that's a long wait, but that's what a home user might expect. For production use, it should never take that long. The hardware is simply far too unlikely to be that slow.

    --
    Raptor
    "Procrastination is great. It gives me a lot more time to do things that I'm never going to do."
  91. FreeBSD by MightyMartian · · Score: 1

    In a lot of ways I've found FreeBSD a lot like coming home. My first introduction to *nix was a Tandy 6000 running Xenix, which had at least something of a BSD heritage. I've really come to appreciate it. I know it's not as *cutting edge* as Linux, but at the same time I really am very impressed with its packaging system.

    --
    The world's burning. Moped Jesus spotted on I50. Details at 11.
  92. Re:You gotta love 'if it moves, compile it' boys.. by Proteus · · Score: 1

    Ah, but you're assuming an Ignorant Zealot type of Gentoo Admin. I've deployed Gentoo production before, and your hypothetical would have run one of two ways:

    Boss: Proteus, I want this new webserver machine up and running ASAP.
    Proteus: Ok, Boss, let me just boot from this deployment CD and clone the standard Gentoo set. I should have us ready to go in a couple of hours.

    OR

    Boss: Proteus, I want this new webserver machine up and running ASAP.
    Proteus: Ok, Boss, I'll build it with a stage-3 Gentoo and use only binary ebuilds; it'll be up in a couple of hours, and I'll schedule the rebuild-from-source during maintenance windows.

    Obviously, I preferred the former, but the latter worked fine.

    All things considered, though, I much prefer Debian for corporate production installs.

    --
    We may not imagine how our lives could be more frustrating and complex—but Congress can. – Cullen Hightower
  93. Re:Custom for critical, vanilla for infrastructure by Schraegstrichpunkt · · Score: 1
    In theory, there should be something that differentiates your company from all of the others. If this is an app or database or other computer related item, then it should be fully customized and fully documented. You want to squeeze every last ounce of power and functionality out of this.

    What about disk space? The disk space taken up by a build tree can be a lot.

    In any case, extra disk space, RAM, and CPU power are almost always cheaper than having your staff spend time on set-up and maintenance.