Why I love Gentoo

After doing an emerge world on an older box I get:

* Messages for package sys-libs/com_err-1.40.4:

* PLEASE PLEASE take note of this
* Please make *sure* to run revdep-rebuild now
* Certain things on your system may have linked against a
* different version of com_err -- those things need to be
* recompiled.  Sorry for the inconvenience

In other words, “This update is going to break your system. We kind of screwed up. Something changed. Here’s how to fix it.”

So now I don’t have to google around frantically trying to figure out why randomserviced is suddenly failing. And the Gentoo guys even apologize.

Honesty, transparency, and humility in software. Go figure.

Portage Logging

Something else I should have known about long ago.   To turn on logging in portage, simply add the following to /etc/make.conf:

PORTAGE_ELOG_CLASSES="warn error log"
PORTAGE_ELOG_SYSTEM="save"

The will add log files for each package to /var/log/portage/elog/:

# ls -lah
total 108K
drwxrws--- 2 portage portage 4.0K 2008-06-06 01:13 .
drwxr-xr-x 3 root    root    4.0K 2007-10-04 12:29 ..
-rw-r--r-- 1 root    portage  200 2008-06-06 00:58 dev-db:postgresql-8.0.15:20080605-155810.log
-rw-rw-r-- 1 root    portage  72K 2008-06-06 00:44 summary.log
-rw-r--r-- 1 root    portage   67 2008-06-06 01:06 sys-apps:coreutils-6.10-r2:20080605-160624.log
-rw-r--r-- 1 root    portage  108 2008-06-06 01:08 sys-apps:shadow-4.0.18.2:20080605-160842.log

Useful to have around when you miss a barrage of announcements after a large emerge.

Manually fetching files in Gentoo

Here’s something I’d never had to do before. Be careful as this kind of tip will only popup for you once on the first emerge.

Manually pushing the archive into distfiles and running emerge worked fine. For a moment I was concerned that I might actually have to build something from source. Whew!

Gentoo Compiler Caching

I really should learn to be more patient and read the docs. Today I stumbled across Gentoo compiler caching. From the About ccache section:

ccache is a fast compiler cache. When you compile a program, it will cache intermediate results so that, whenever you recompile the same program, the compilation time is greatly reduced. In common compilations this can result in 5 to 10 times faster compilation times.

Sheesh. How much time have I wasted sitting around drooling on myself waiting for portage to build package XYZ?

In addition to learning to read the docs I should also probably learn to stop drooling on myself.

mod_perl on Gentoo

mod_perl doesn’t play so nice with Gentoo. Perl and, specifically, g-cpan still seem to have problems.

I’ve been scratching my head (read: driving my head into my desk) over the following error:

Can't locate lib.pm in @INC (@INC contains: blah blah blah) at /etc/apache2/modules.d/apache2-mod_perl-startup.pl line 1.\nBEGIN failed--compilation aborted at /etc/apache2/modules.d/apache2-mod_perl-startup.pl line 1.\nCompilation failed in require at (eval 2) line 1.\n

Thanks to an obscure post at the bottom of a thread from a couple of years back I was able to fix it with

# perl-cleaner reallyall
# emerge libperl

perl-cleaner appears to be like revdep-rebuild, but Larry Wall style.

Now I can run Apache::ASP.

Thank you crazy Larry Wall people.