Stuff for Gentoo Linux

I have been using Gentoo Linux on various machines since 2004. Apart from filing a few bugs I have hacked some minor things that I think could be useful. Here they are.

nVidia CS driver under XEN

After changing my kernel to sys-kernel/xen-sources-2.6.34-r4, I found that the closed-source nVidia driver (x11-drivers/nvidia-drivers-195.36.31) doesn't work with XEN kernels. I can understand they would have problems getting it to work in a domU but for it not to work in dom0 is ridiculous. A look around the web confirms it can be done. A whole lot of different patches existbut they are usually for old versions of the driver. To get a newer version such as the above to work on Gentoo boils down to two steps:

  1. Some driver versions still require setting IGNORE_XEN_PRESENCE=1 before emerging.
  2. As nVidia still uses kernel interfaces (specifically the pgd_offset_k macro) that have been deprecated since around 2.6.26, and for no good reason, a little patch to the source is required in usr/src/nv/nv-linux.h. Locate the NV_PGD_OFFSET macro and replace it with the following:
    
    #define NV_PGD_OFFSET(address, kernel, mm) \
      ({ \
        pgd_t *__pgd;                  \
        __pgd;                         \
       })

mencoder/x264 bugs

Today I was bitten by a bug in mencoder (media-video/mplayer-1.0_rc4_p20091026-r1) while trying to transcode some video to X.264 in two passes. First a bunch of warnings like the following:

x264 [warning]: non-strictly-monotonic PTS 0min   4mb  A-V:0.033 [604:705]

then an abort with the error message:

x264 [error]: requested bitrate is too low. estimated minimum is 21 kbps
x264_encoder_open failed.
FATAL: Cannot initialize video driver.

This is depite my explicitely specifying the bitrate. Seem like mencoder is passing wrong timing values to libx264.
Fortunately, this has been fixed in media-video/mplayer-1.0_rc4_p20100612.

Perl 5.10 on Gentoo

Perl 5.10 has been in Gentoo's unstable branch for a couple of architectures for some time now, while it comes as standard with pretty much every other distribution. Upgrading is still not working flawlessly but this line from bugs.gentoo.org (with my additions for g-cpan stuff) got all the modules recompiled:

locate 5.8.8 | grep ^/usr/ | grep -v ^/usr/portage | xargs equery belongs | grep -v perl-gcpan | uniq | sed -e s/^/\=/ | xargs emerge --oneshot

Notes on Gentoo/MIPS for the Cobalt Qube 2

I bought one of those neat little boxes a while ago to serve as a router, proxy, media server etc. that doesn't consume as much energy as your regular Intel box, looks good, and is generally geeky :) Of course it's going to run Gentoo! It's not quite finished yet but here are some notes on stuff I found noteworthy during the installation already.

sarad

I wrote an init script and corresponding config file [SIG] for the SARA daemon that serves the BNC. Also see the security patch for this daemon that fixes critical buffer overflows!

HSC

HSC comes with an ebuild file for portage. The latest version [SIG] has been simplified a bit and unlike the last one distributed with the 1.0 sources uses the recommended shell functions for configuration and compilation.

Die Office-Bibliothek unter Gentoo

This section is probably of no interest to users who don't speak German as it deals with German-language dictionary software.

Ah, Closed-Source-Software – da kann man endlos Spaß damit haben. Die Office-Bibliothek ist so ein Programm. Wer Nachschlagewerke von Duden oder Brockhaus benutzen will, kommt nicht darum herum. Man kann schon dankbar sein, dass die Nulpen von Joanneum Research (den eigentlich an dieser Stelle fälligen rassistischen Kommentar zu dot-at verkneife ich mir mal) wenn schon keine vernünftige Suchfunktion so doch wenigstens eine Linux-Version (eine Linux-für-x86-Version, um genau zu sein) hinbekommen haben. Schön wäre es jetzt noch gewesen, wenn man die auch unter Gentoo/x86 einfach installieren könnte, was man aber nicht kann. D.h. installieren schon, nur läuft das Machwerk dann nicht. Mal abgesehen davon, dass die .tar.gz-Variante vergisst, diverse Fonts nach /opt/officebib/ zu installieren und stattdessen das komplette data-Verzeichnis world-writable macht1.

$ officebib
xset:  bad font path element (#76), possible causes are:
Directory does not exist or has wrong permissions
Directory missing fonts.dir
Incorrect font server address or syntax
/opt/officebib/officebib.bin: /opt/officebib/libgcc_s.so.1: version `GCC_3.3'
not found (required by /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/libstdc++.so.6)
xset:  warning, no entries deleted from font path.

Wieso bringt das Ding eigentlich seine eigene libgcc mit? Um Inkompatibilitäten mit den installierten zu vermeiden? Hier ist sie offensichtlich Ursache derselben: sie ist schlicht überflüssig. Nach dem löschen von /opt/officebib/libgcc_s.so.1 läuft das Programm so gut wie es eben läuft.

Diese Methode funktioniert mit Version 4.0, Build 180105 der Office-Bibliothek und gcc 3.4, ältere Versionen habe ich nicht getestet. Interessanterweise scheint die mit Version 3.0 Rev. 1 mitgelieferte libgcc zu funktionieren, dies ist aber nur ein eher zufälliges Ergebnis vom Rechner eines Kollegen, das ich zu faul war, mir näher anzuschauen.


  1. Weil unter Windohs is das schließlich auch so!!!1! Wär ja auch noch schöner, wenn User Arsch sein neues Wörterbuch installieren will und dann was von ‘permission denied’ zu lesen kriegt, was er mangels Wörterbuch gar nicht versteht.
    Man mag sich wirklich nicht vorstellen, wie viele über manipulierte Lexikondaten ausnutzbare Buffer Overflows in dieser Qualitätssoftware stecken...

Last change: 29-Dec-2010, 21:15

You are not supposed to see this—arachnoids only: nude metal goth porn tits video i phone thai hentai gangbang girls i touch lolita emo slutsparis ghettoschlampen arschgeficktgay geigh salope enculée pédé