April 12th, 2009

Amarok 2 with Gentoo on AMD64

Finally, that’s possible. I will explain what’s necessary in case it’s not yet in portage (just saw the patches are making it to overlays now :D ) but not without a warning and explanation: Amarok 2 has been blocked by MySQL not compiling correctly for use as a shared library. The main bug report on Gentoo’s bugtracker is here for MySQL. Although it now seems to have made its way into mysql-extras overlay (?) it may still take a while to be verified for not causing any problems at all.

DO NOT TRY THE FOLLOWING STEPS ON A PRODUCTIVE SYSTEM!

Read all instructions carefully. I’m not responsible for any data loss or corruption you may experience by following this howto and using the patched MySQL or beta release of Amarok.

You may want to backup your databases before you go into patching. You have been warned (although everything seems to be fine on my system).

Patching MySQL
When I got it working yesterday, I still patched the eclass file to add a USE-flag “pic” for triggering a GCC option. The current status from the bug comments is that it should be a false solution and not be necessary anymore. However, I still get a linker error “recompile with -fPIC” when compiling Amarok 2 afterwards. So you still need to patch the eclass file using the files stroken out on the bug report (mysql.eclass and a patch to it, apply the patch or grab the resulting file here). You may want to try if it works for you without the patched eclass, though. If you choose to apply the patched eclass, you need to put it in your overlay into /eclass directory (top-level like a category). On the next emerge you will be warned to add “metadata-transfer” to your FEATURES variable in /etc/make.conf and run emerge –regen after each sync (this will take a while; ~20 minutes on my 3GHz Core2Duo).

Now we need an ebuild, too. Download the patch file to MySQL’s source code (better check if it’s still current) and store it in your local overlay’s dev-db/mysql/files. Copy the latest ebuild for MySQL from official portage to your overlay and rename it to match version numbers with the patch. Run ebuild mysql-whateverversion.ebuild digest, unmask and emerge it! (using “embedded” USE-flag)

Amarok 2.1 Beta 1
If we go unstable, we do it right. So we are going to create an ebuild for Amarok 2.1 Beta 1, too. Again, BE WARNED: There are some possible corruption issues with ID3 tags (also reported for 2.0.1). You don’t want that to happen, so be careful not to do any writing operations to your files in Amarok until that bug gets fixed. (I got a couple more with reading tags but my files are still intact, so I’m fine; all bugs are already in the bug tracker)

Amarok 2.1 depends on taglib-extras, which is currently not in portage. So simply go to http://gpo.zugaina.org/media-libs/taglib-extras and grab 0.1.2’s ebuild, put it in overlay, digest, unmask and emerge.

For Amarok itself, Beta 1 seems to be version 2.0.90. Simply grab my ebuild, which is a slightly modified version from official portage tree. I removed the iPod patch and the webkit string replacement, added 2 dependencies and had to fake the check for Qt script bindings. Of course, I needed to replace the download URI and add ~amd64 keyword:


--- /usr/portage/media-sound/amarok/amarok-2.0.1.1.ebuild       2009-03-16 11:36:10.000000000 +0100
+++ amarok-2.0.90.ebuild        2009-04-12 17:53:18.000000000 +0200
@@ -14,10 +14,11 @@
HOMEPAGE="http://amarok.kde.org/"
LICENSE="GPL-2"
-KEYWORDS="~x86"
+KEYWORDS="~x86 ~amd64"
SLOT="2"
IUSE="daap debug ifp ipod mp3tunes mp4 mtp njb +semantic-desktop"
-SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.bz2"
+#SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.bz2"
+SRC_URI="ftp://ftp.kde.org/pub/kde/unstable/${PN}/${PV}/src/${P}.tar.bz2"

DEPEND=">=app-misc/strigi-0.5.7
|| (
@@ -25,6 +26,8 @@
>=dev-db/mysql-community-5.0[embedded,-minimal]
)
>=media-libs/taglib-1.5
+       >=media-libs/taglib-extras-0.1
+       >=x11-libs/qt-script-4.4.2
|| ( media-sound/phonon x11-libs/qt-phonon:4 )
>=kde-base/kdelibs-${KDE_MINIMAL}[opengl?,semantic-desktop?]
>=kde-base/plasma-workspace-${KDE_MINIMAL}
@@ -46,7 +49,8 @@
app-arch/unzip
daap? ( www-servers/mongrel )"

-PATCHES=( "${FILESDIR}/${PV}-ipod.patch" )
+# PATCHES=( "${FILESDIR}/${PV}-ipod.patch" )
+PATCHES=( )

pkg_setup() {
if use amd64 ; then
@@ -77,9 +81,10 @@
fi

# Remove superfluous QT_WEBKIT
-       sed -e 's/ -DQT_WEBKIT//g' \
-               -i "${S}"/src/scriptengine/generator/generator/CMakeLists.txt \
-               || die "Removing unnecessary -DQT_WEBKIT failed."
+#      sed -e 's/ -DQT_WEBKIT//g' \
+#              -i "${S}"/src/scriptengine/generator/generator/CMakeLists.txt \
+#              || die "Removing unnecessary -DQT_WEBKIT failed."
+       sed -e 's/CHECK_CXX_SOURCE_RUNS/set( BINDINGS_RUN_RESULT 1 )\n#/g' -i "${S}"/cmake/modules/FindQtScriptQtBindings.cmake

mycmakeargs="${mycmakeargs}
$(cmake-utils_use_with ipod Ipod)

You may need to uninstall Amarok 1 before emerging 2 or you will get file collisions.

Some problems
I have 2 soundcards and Amarok was playing everything on the wrong one on first start-up although I reordered my cards in the configuration dialog. I seem to have gotten rid of that problem by simply restarting Amarok after changing the order. GStreamer backend currently crashes, so you may prefer xine (which I do nevertheless).

I couldn’t get Ampache working yet, but I assume the fault is on Ampache’s side. We were able to track the problem down, likely being the hash being used on authorization which seems to be an issue between 32 bit servers and 64 bit clients (seems to be a different timestamp; I really don’t know why that’s still a problem, I guess it’s very bad programming or at least testing…).

Amarok doesn’t index all files correctly. Some files are not shown with metadata but only with their filenames instead. You may be able to work around it by rescanning your collection multiple times. There also seem to be some index issues on the collection when updating the collection while browsing through it. However, I still got some MP3s not showing up in my collection although they seem to be counted.

Oh, and you scrobble streams to Last.fm which I consider a bug since that’s not the intended behaviour (or at least has not been until now).

I will try to confirm these bugs and report them if they are not already listed in KDE’s bugtracker.

Some scripts currently don’t work. That’s because we faked around the script bindings dependency in order to be able to compile. You may get some ebuild to compile qtscriptgenerator, but it depends on Qt 4.5 which I haven’t yet installed (yes, I know I blogged about the recommendation to use it one post earlier, but I haven’t had time to recompile it yet – I should do that next). Do not report errors about scripts not running to Amarok devs; it’s entirely our own fault. However, if you need those scripts, you are free to get into compiling that dependency as well. ;)

Make it prettier
Amarok’s default theme doesn’t look appealing, at least not when using KDE’s Oxygen theme with default colors. You may have a look at alternative Amarok themes on kde-look.org. Most themes inherit their colors from your color theme, so don’t be surprised if it looks different than on the screenshots. I went for “Amarok Highlights” for the time being.

Unfortunately, Amarok 2 is still lacking a theme manager, so you have to install the themes manually by copying them to ~/.kde4/share/apps/amarok/images/ (one at a time; stylesheet.css goes one level above). You should quit Amarok before changing themes and clean caches before restarting it:

rm ~/.kde4/cache-YourHostname/kpc/Amarok-pixmaps.index
rm ~/.kde4/cache-YourHostname/kpc/Amarok-pixmaps.data

April 10th, 2009

Google Container-Rechenzentrum

Im GoogleWatchBlog sind die seit 7.4. öffentlichen Videos über die Google-Rechenzentren verlinkt (siehe auch Blick hinter die Kulissen von Google auf Heise, dort noch ohne Video).

Direkter Link zum Video mit den Containern: http://www.youtube.com/watch?v=zRwPSFpLX8I

March 15th, 2009

Gentoo and KDE4

Everyone wanting to upgrade to KDE4 with Gentoo should be adviced not to trust the official guide completely. It’s a good start but incomplete and misleading. You should have a look at it nevertheless:

http://www.gentoo.org/proj/en/desktop/kde/kde4-guide.xml

You should know the following facts before getting yourself into trouble:

  • You need KDE 3.5.10 (unstable) prior to KDE 4 if you plan to use both along each other. Some applications of KDE 3.5.10 will break nevertheless, at least if you install without kdeprefix (see below). You will be blocked otherwise.
  • You don’t need an unstable portage 2.2 for EABI 2. Well, you kind of need it nevertheless. portage 2.1.6.* IS portage 2.2 but with all new features (except EABI 2) disabled. If you have enough time, know Python and want to help the portage developers please do it, you know where you find them. If you run a more experimental system (you are unmasking KDE 4, right?), you could unmask 2.2 nevertheless and help Gentoo by testing and submitting bug reports.
  • You need to unmask lots and lots of packages. You can use this file and NOT the file you get there (both are linked in the KDE4 guide but the last one is for kde-testing overlay only). Unfortunately you will need to unmask even more. You can use unmasker, a nice tiny tool that does all that nasty unmasking stuff for you while you can do better things. Following the comments you will end up with a directory /etc/portage.keywords/ and some files in it. Emerge will use all of them. Have a look at the generated file(s) and modify/comment/delete any lines you don’t like. There will be some (e.g. SVN versions).
  • Before starting that huge 250 ebuild session (twice that size if you need KDE 3.5.10), make sure you have kdeprefix in your USE flags! The guide says it would not be necessary to use it but trust me: it is if you want to save yourself some headaches.
  • Having compiled all ebuilds and noticing random crashes and disfunctionality? Start dbus and hald first – you need them in KDE4 or you get weird problems. (that’s not in the guide either :( )
  • Using unstable xorg 1.5 and have no keyboard anymore? Or are you just wondering why you should use 1.5? See this short thread.
  • You use NVidia drivers and see flickering red or black checkerboards covering your videos? Well, guess you are using Amarok. It took almost a year to find that out. Just exit Amarok or open and close the playlist and control window a few times, the flickering will disappear. BTW that also happened with Compiz Fusion and KDE 3.5.
  • Having stability problems? Make sure you use nvidia-drivers 180.27 or 180.29 for the time being, do NOT use 180.37 for now.
  • Your icons disappeared? Check for the Inherits=hicolor setting to be correct (find the icon set configs and possible options for Inherits using locate index.theme), also check for deprecated icons (folder icons etc.) and switch them. Maybe it also helps to upgrade to QT 4.5 and of course x.org 1.5 if you didn’t do that already; this could also fix some weird stuff going nuts in your system tray. Still missing icons? Bad luck I guess. The Oxygen icon set still seems incomplete and Inherits doesn’t seem to work in all cases, so you may try switching to some other icons instead. (Although this is 4.2, isn’t it? But what did other distributions do to fix it if it’s really incomplete/broken?)

These won’t be the only problems you come across, and I wrote some of them from memory because I upgraded about a month ago. Maybe it’s not sufficient what I wrote but it should save you at least 5 hours of work (or even more) figuring everything out yourself.

Good luck!

March 14th, 2009

Wechsel zur Xbox 360

Seit letzter Woche steht eine Xbox 360 Elite neben meinem Rechner. Ich hatte schon seit mitte letzten Jahres vor, mir eine Konsole anzuschaffen, habe aber bisher zwischen PS3 und 360 geschwankt. Die Entscheidung für die deutlich ältere Xbox fiel nach einiger Überzeugungsarbeit durch einen Kumpel recht schnell, obwohl ich monatelang eher auf Seiten der PS3 stand. Meine Gründe, die Umsetzung und Besonderheiten werde ich im Weiteren erläutern. Da dieser Artikel länger ist, geht es in einer Langfassung weiter. Read the rest of this entry »

March 14th, 2009

Stack Overflow

Stack Overflow is a community-driven website where you can ask any programming related questions and answer other people’s questions. Based on a good reputation system you start being restricted to only post questions and answers. By getting “up” votes on your posts you will gain reputation points and more permissions like voting other people’s posts and commenting them. With a rather large amount of reputation points you will even get moderator permissions for the platform.

Registration is quite easy. If you have any account supporting OpenID (such as Yahoo/Flickr) you will be able to login right away. Avatars are being loaded from Gravatar. Before asking questions you should try searching for earlier posts on that topic; one idea behind Stack Overflow is to build a large FAQ of programming questions. I’ve recently got Stack Overflow threads in Google search results as well (and in most cases they immediately solved my problem).

The speed of questions and answers is rather high paced. Many people are monitoring the list of newest questions and respond in about 3-30 minutes. It’s not uncommon to be overtaken while still writing on an answer – in these cases you will get a notification on top of the site which you can click to see the latest answers while still retaining your unsent answer. Voting is quick, too. But in almost any case quality matters and since there will be some extra points for accepted answers you are never wrong to submit your own one if it adds some new aspects, even to highly frequented threads.

It’s best to try it yourself but be warned: That site is addictive! :)

March 14th, 2009

And the winner is…

Mit Peacekeeper gibt es nun einen weiteren Browsertest, diesmal von Futuremark (bekannt durch 3DMark und PCMark). Gebenchmarkt werden wieder JavaScript und das Zusammenspiel mit der Rendering-Engine, der Benchmark ist sofort lauffähig. Unter Linux komme ich auf meinem Hauptrechner zu folgenden Ergebnissen:

Nachtrag: 1853 Punkte für Opera 10 Beta

679 Punkte Konqueror 4.2.00
581 Punkte Opera 9.64 (Binary)
438 Punkte Iceweasel 3.0.6 (selbstkompilierter Firefox)

Im Vergleich zu den Referenzergebnissen meiner CPU sind das aber noch lächerliche Werte. Die “Next Generation”-Engines der Browser (deren Entwicklerversionen oder Betas ich noch nicht installiert habe) sollen locker auf der 3-4fache kommen.

February 19th, 2009

Browser warning for IE6 users

Since the will to do all that annoying extra bugfixes for IE6 is pretty low 7 1/2 years after its release, I finally decided to display a little nag notice on top of my page after having been encouraged to do so by others (see below). The script is multi-language and customizable and you are free to use, distribute and modify it for your websites (even commercial ones) without any further agreement (consider this a license; needed in Germany). It’s multi-language and offers some small options for quick setup.

Please note this does not mean this site (and others I create in my freetime or at work) will completely stop working in IE6 in near future but some functionality or design might be incomplete/broken because I will no longer optimize my personal web sites for IE6. (At work we and our customers cannot afford stopping to optimize for IE6 yet since some companies still won’t upgrade in near future for – in most cases – comprehensable reasons, so either our customers or theirs would not be able to use the websites we build.) Nevertheless it won’t hurt to display a relatively unobtrusive message.

The icon I used for it is from famfamfam’s free mini icon set: http://www.famfamfam.com/lab/icons/mini/

Other sites that encourage their users to upgrade: (not using my script)

Get a preview here: (Note: this may not display correctly in browsers other than IE 6 – no sense to support it elsewhere ;) )

English
German

JavaScript and CSS (quick setup options on top; language and download arrays inside warn-function)

You will also need jQuery in case you don’t have it already. (include jQuery and CSS before including the nag-script)

December 2nd, 2008

GTA IV moralisch unkaufbar

Seit gestern steht GTA IV in den Läden. Bedauerlicherweise ist auch dort schonwieder SecuROM mit Online-Aktivierung dabei. Obwohl ich wahnsinnige Probleme mit Drakensang unter Vista hatte, die scheinbar durch SecuROM verursacht wurden, läuft Fallout 3 hervorragend und mein System ist immernoch (oder besser gesagt: wieder) stabil. Drakensang und Fallout 3 mag man noch nachsehen, auf SecuROM gesetzt zu haben, denn immerhin wird dort nur die traditionelle Offline-Prüfung der Original-Datenträger durchgeführt. Somit stehen denn auch beide in meinem Regal, Drakensang sogar als Collectors Edition.

Zurück zu GTA. Rockstar ließ es sich leider nicht nehmen, zusätzlich zur Prüfung der Datenträger auch noch eine Online-Aktivierung nach der Installation bzw. tiefergehenden Hardwareupgrades durchzuführen; wenn auch “unbegrenzt”. Wenigstens geschieht dies mit Servern bei SecuROM, sodaß man sicher einige Jahre lang neu aktivieren könnte – auch wenn ich mir wünsche, daß SecuROM möglichst bald von der Bildfläche verschwindet. “Unbegrenzt” setze ich genau deshalb in Anführungszeichen, da ich daran nicht ganz glauben kann. Wozu wird eine Online-Aktivierung benötigt, wenn man das Spiel doch angeblich so oft installieren darf wie man will? Meine Vermutung ist, daß Käufer mit zu vielen Aktivierungsversuchen trotzdem über kurz oder lang gesperrt werden, sonst hätte man schließlich genauso gut darauf verzichten können.

Doch es kommt noch schlimmer: Laut einigen Quellen wird zum Spielen im Einzelspielermodus Windows Live benötigt. Andere wiederum nennen dies (wie übrigens auch bei Fallout 3) nur für die Achievements als unbedingt erforderlich. Für Multiplayer ist Live dann jedoch Pflicht, ebenso scheinbar ein Account bei der Rockstar-eigenen Seite “Rockstar Social Club”.

Wer jetzt glaubt, er könne diesem ganzen Wahnsinn durch Kauf von Downloadversionen umgehen, wird bitter enttäuscht: Auch die accountgebundenen, z.B. per Steam gekauften Lizenzen sollen zusätzlich SecuROM enthalten und setzen auf die übrigen Online-Accounts für den Mehrspielermodus.

Was mir absolut nicht in den Kopf will: Wozu wird ein bereits per Accountbindung ausreichend und deutlich effektiver als bei jeder anderen Kopierschutzmaßnahme geschütztes Spiel zusätzlich mit den Retail-Kopierschutzmechanismen ausgestattet? Und wozu erfolgt bei Installation/Hardwareupgrade eine Aktivierung, wenn doch angeblich “unbegrenzt” viele Installationen möglich sein sollen? Wieso versauen sich so viele Publisher ihre Verkaufszahlen und verursachen durch den Einsatz unausgereifter Kopierschutzsoftware schwerwiegende Probleme beim Kunden, sowohl in Zusammenhang mit dem Spiel als auch nach Beendigung in Windows selbst? Warum rühmt sich ein Publisher damit, “freundliches” DRM zu verbundlen wenn nach der Beschreibung desselbigen dieses genausogut entfallen könnte?

Wieso wird selbst bei Download-Versionen unnötig Geld in einen so miserablen Kopierschutz gesteckt?

Ich werde es nie begreifen und kann nur hoffen, daß die Spieleindustrie irgendwann mal zur Vernunft kommt. Vielleicht will man die Kunden auch einfach nur vom PC vergraulen und zu den vollverschlüsselten Konsolen drängen (wo die Spiele dann gleich mal 20€ teurer sind). Ein Kauf von GTA IV ist damit für mich nicht vertretbar.

Siehe auch:

Update: Die GameStar berichtet online von gravierenden Problemen mit ATI-Grafikkarten. Darüberhinaus noch weiteres zur Installation:

Auch wenn Sie von Hardware-Problemen verschont bleiben, kostet GTA 4 Nerven, weil Rockstar die Hürden der Online-Aktivierung auf ein neues Level bringt: Sie müssen zusätzlich zur gut halbstündigen Installation des Hauptspiels ein Programm namens »Rockstar Social Club« sowie Microsofts »Games for Windows Live« installieren, für beide Systeme Konten einrichten, Games for Windows Live aktualisieren und GTA 4 auch noch online aktivieren. Um das Spiel zu starten, muss zwingend die Social-Club-Anwendung im Hintergrund laufen. Falls Sie auf die Installation der Zusatzkomponenten verzichten, können Sie so oder so nicht spielen.
Scheinbar ist das doch nichtmal nur für Multiplayer sondern auch Singleplayer erforderlich.

November 25th, 2008

Videoserien

Ich hab schon seit gut einem Monat vor, die folgenden Seiten hier zu verlinken und jetzt tu ich das einfach mal. :)

Zur Zeit klappere ich 3 bestimmte Webseiten jede Woche aufs neue nach Updates ab.

Der Angry Video Game Nerd (AVGN) regt sich fast wöchentlich über “all the shitty games that suck ass” auf, wobei er sich inzwischen nicht mehr nur auf Nintendo beschränkt sondern momentan z.B. auch beim Phillips CD-I angelangt ist. Es werden ausschließlich vergessen geglaubte Konsolen- und Heimcomputerspiele getestet.

That Guy With The Glasses hat eine ganze Reihe verschiedener Serien. Darunter als Highlights den wöchentlichen “Nostalgia Critic” (Kritiken zu unglaublich schrottigen Filmen, Serien etc. aus unserer Kindheit aber zum Teil auch etwas neuer) und “Ask ThatGuy” (”There’s no such thing as a stupid question until you ask it.”).

Zu guter letzt updated dann noch jeden Mittwoch abend Zero Punctuation seine (ziemlich harten) Reviews zu aktuellen PC- und Konsolenspielen. Viel Übung im Hörverstehen empfohlen, denn der Name ist Programm. Es gibt übrigens nur sehr wenig Spiele, die bei ihm gut wegkommen.

Ach und fast hätte ich es vergessen: AVGN und ThatGuy hatten vor kurzem ein besonderes Special zu bieten.

November 25th, 2008

Broken

In case anyone should be wondering why I didn’t continue my project to install Gentoo: Well… Unfortunately that slug is broken.

USB seems to be damaged in some way as it reports nothing but rubbish to the kernel and something causes bad noises to come from the beeper. Some forum threads pointed out that might be caused by a bad power supply. However, after changing the AC adapter it doesn’t run any better in my case. Since I wasn’t able to flash the original firmware correctly (it was just too obvious that I manipulated that box) I decided to open it up and take a look at its PCB.

Unfortunately I can’t see any physical damages on that board so I must assume there’s some hidden defect somewhere. I doubt I can fix it, so I must consider that box to be broken after just 4 months. After all I read I must advice everyone NOT to buy a NSLU2 – except you are out for some soldering on the board. The hardware fails much too often from what I could find, be it for overheating, manufacturing or just design errors (like the fancy “feature” that you can power the box solely by an external USB hub). Sadly, if I cannot find the error or a workaround for it, I may not continue on this project since I am not willing to buy another box for full price that’s broken by design.

Either I buy one very very cheap at eBay or I will just let it die. Maybe someday I might be able to fix it – could be my studies might be of some help at some later point.

Anyway; this project was no complete loss of time. Much of the knowledge I gained can be helpful in getting Gentoo onto the Pandora when it finally arrives (which unfortunately may take another 3-4 months depending on LCD production since I assume I’m somewhere in the last third of the preorder queue).