Friday, December 30, 2005

While I was waiting an hour for kdelibs to compile again, I googled around regarding JuK's mp3 support in ubuntu.

Apparently it's the supporting library, libtunepimp, that has no mp3 support in ubuntu.

I'd already downloaded the latest source, and compiled it manually, assumedly with mp3 support, so I wasn't sure why that didn't fix it.

I'd seen references to simply replacing libtunepimp fixing the issue for other people.

I tried installed amarok, since it supposedly has mp3 support, but that didn't work either, it would just immediately come up and tell me that it couldn't find the song.

I found this page, referencing "trm", the support binary that is used to query the songs.

I checked, and found I had 2 copies of this. One in /usr/local/bin, with mp3 support, the one I compiled, and in /usr/bin, without mp3 support, that must have come from the deb, and that JuK was calling.

I removed the /usr/bin one, and JuK still did not work. I symlinked the one with mp3 support in there, but it didn't work still.

I figured maybe the deb of libtunepimp was causing issues elsewhere, so I tried removing it, but because JuK is dependent on it, it was going to remove JuK too. Damn.

I eventually found this thread, where "metwo" has recompiled libtunepimp with mp3 support, and packaged it as a deb, to replace the dumb non mp3 ones.

You can download the files from the thread, or from here and here. I used dpkg to install them, and immediately JuK had mp3 support for lookups.

What a bloody saga.

I did a bit of googling about that Qt version error, and apparently it's being caused by qt not being able to find the kde plugins that kdelibs compiled and installed.

I'd seen a reference to running qtconfig, and adding the plugin path, but when I ran qtconfig, as root, there was no where to enter any paths or anything.

I kept googling, and found another reference to doing that (here), and I ran qtconfig as a normal user. This time, there was a "library paths" tab, and I was able to add "/usr/lib/kde3/plugins" in.

I tried to configure kdebase again, but it still failed, with the same error, perhaps because I'm running the configure as root.

I don't know why the library paths tab would only come up when running qtconfig as a non root user. I also don't know where qt holds those settings, or I would just modify the file manually.

I tried running the configure of kdebase as the normal user, but that didn't work either.

It especially doesn't make sense, because uic is being passed the plugin path as a variable.

When I investigated a bit futher, I found I had 2 versions of qtconfig installed, one in /usr/bin/qtconfig, and the proper one, which I'd compiled, in /usr/local/qt/bin.

This was causing the library paths tab to appear or not.

I tried to find what package provided qtconfig, to remove it, but there seems to be no package in ubuntu that provides it, so god knows where it came from.

I just renamed it, and tested for qtconfig again, but it couldn't find the proper one.

I fixed up the PATH in .bashrc. I tried to run qtconfig as root, but it couldn't find it, presumable since root's environment didn't include the path change.

I ran it with the full path, and got the following output in the console:
Conflict in /usr/lib/kde3/plugins/styles/
Plugin uses incompatible Qt library!
expected build key "i686 Linux g++-4 full-config", got "i686 Linux g++-4.* full-config".
Conflict in /usr/lib/kde3/plugins/styles/
Plugin uses incompatible Qt library!
expected build key "i686 Linux g++-4 full-config", got "i686 Linux g++-4.* full-config".
Conflict in /usr/lib/kde3/plugins/styles/
Plugin uses incompatible Qt library!
expected build key "i686 Linux g++-4 full-config", got "i686 Linux g++-4.* full-config".
Conflict in /usr/lib/kde3/plugins/styles/
Plugin uses incompatible Qt library!
expected build key "i686 Linux g++-4 full-config", got "i686 Linux g++-4.* full-config".
Conflict in /usr/lib/kde3/plugins/styles/
Plugin uses incompatible Qt library!
expected build key "i686 Linux g++-4 full-config", got "i686 Linux g++-4.* full-config".

So that looks like the problem, that all the plugins were compiled against the wrong library.

I did a bit more poking around, and found the wrong version of moc in the path too, pointing to a deb installed version. I found this had been provided by "qt3-dev-tools" which I'd installed at some point, so I removed it.

This resulted in moc becoming symlinked to moc-qt4, provided by libqt4-dev, another deb. I removed that too.

Then, in my user environment, the right moc was being picked up, but using sudo, it couldn't find it. Another path inheritence problem it looks like.

I tried editing root's .bashrc, and adding the path/environment variables in, but it seems that it doesn't get called, even when doing sudo sh.

I sourced it manually, and then it was finding the right binary.

I ran another configured on kdebase, as root, in a proper environment, but it made no difference.

I ran qtconfig again, and this time it didn't complain about the errors in the plugins.

I decided to recompile kdelibs, in the right environment, I reconfigured it, and recompiled it, and a few files compiled (I didn't make clean). I reinstalled it.

I really didn't want to have to wait an hour while kdelibs compiled again, if I did it from scratch.

I configured kdebase again. It made no difference again. I got the same bloody error again:
checking if UIC has KDE plugins available... no
configure: error:
you need to install kdelibs first.

If you did install kdelibs, then the Qt version that is picked up by
this configure is not the same version you used to compile kdelibs.
The Qt Plugin installed by kdelibs is *ONLY* loadable if it is the
_same Qt version_, compiled with the _same compiler_ and the same Qt
configuration settings.


I continued searching, and it looks like it's caused by the plugins being compiled against the wrong library, as I thought. Those debs must have screwed things up.

I bit the bullet, and did a make clean on kdelibs, reconfigured it, and noticed I never fixed that lua problem.

I kicked off the compilation. As before, it ran for a while before presenting the -fpie error, so I fixed that again.

kdelibs finished compiling, however I'd already fixed the problem.. (see the next post). I installed it anyway, just to see if it had fixed the kdebase issue.

I reconfigured kdebase, and it still made no difference.

At this point, I gave up on trying to compile kde. I don't like kde anyway, and it's not going to solve my problem, since JuK does not need to be recompiled to get mp3 support.

Thursday, December 29, 2005

After gtkpod was working, I loaded most of my mp3s into my ipod.

I don't have as much music as I thought, excluding the comedy, and some crap stuff I don't want to listen to, I only ended up with just over 6000 songs in my ipod.

Anyway, after loading it (and waiting an hour for it to transfer), I found that some of my songs don't have proper tags on them.

I decided to use JuK to fix that up, so I installed it, and loaded all the music directories into it.

However, whenever I tried to use MusicBrainz server to find the track info for me, it would just immediately come back and say "error connecting to MusicBrainz server", like immediately, like it wasn't even trying.

I googled around a bit, and apparently it's because Ubuntu and Debian builds of "libtunepimp" have been built without mp3 support, and this actually does the querying of the server.

I found references to doing an "apt-build", which I've not seen before.

I googled, and apparently it allows you to pull down the source of packages, and rebuild them locally.

I apt-get installed apt-build, and configured it.

This added a new line to the apt.sources file, for where to get the source files from.

I then tried to apt-rebuild again, but had a big error, and a segfault.

I realised this was because I hadn't done an apt-get update, and I had no local cache of the source list for apt.

I did an update, and then ran it again, and got the same error.

I'd been trying to run "apt-build --reinstall install libtunepimp-bin", which I found here, however it seems the syntax was wrong.

When I looked closer, I'd retyped it, and omitted the "install" bit, oops.

I changed the command to "apt-build --reinstall install libtunepimp-bin", and then it ran, updates the cache files, and downloaded the source, however ended with:
-----> Building libtunepimp <-----
dpkg-buildpackage: source package is libtunepimp
dpkg-buildpackage: source version is 0.3.0-2ubuntu7
dpkg-buildpackage: source changed by root
dpkg-buildpackage: host architecture i386
debian/rules clean
debian/rules:12: /usr/share/cdbs/1/class/ No such file or directorydebian/rules:13: /usr/share/cdbs/1/rules/ No such file or directorymake: *** No rule to make target `/usr/share/cdbs/1/rules/'. Stop.
----> Cleaning up object files <-----
Cleaning in directory .
debian/rules:12: /usr/share/cdbs/1/class/ No such file or directorydebian/rules:13: /usr/share/cdbs/1/rules/ No such file or directorymake: *** No rule to make target `/usr/share/cdbs/1/rules/'. Stop.
debuild: fatal error at line 836:
couldn't exec debian/rules:
Error while building libtunepimp-bin!
Sorry, no package to install.
Segmentation fault


I looked, and found there was a newer version anyway, here, so I downloaded it.

I checked the INSTALL file, and it said it needed MAD MP3 installed, since it uses it for mp3 support.

I configured it, and it said that it couldn't find it. It pointed me here, but the files are here.

I grabbed libmad, configured, compiled, and installed it.

I went back to libtunepimp, reconfigured it. This time I noticed that it said:
*  The GNU readline library isn't installed.
* This means the sample tagger, tp_tagger, won't
* have readline support.

Whatever. I don't intend on using the sample tagger.

I compiled it, which took a little while, and then installed it.

I went back to JuK, which was still running, and tried to do a query, it didn't work, but I would have been really suprised if it did.

I restarted it, but it didn't make any difference. I guess I need to recompile JuK now.

A few hours later, I investigated recompiling JuK. It's not a standalone application, it's part of the kdemultimedia package.

Rebuilding this requires rebuilding kde. I started reading the instructions here.

I downloaded Qt from here, and configured and compiled it (which took a bloody long time). I tried using the Qt packages, but when I tried to compile arts, it always complained that it could not find Qt.

After about an hour of waiting for qt to compile, I tried to configure arts again, but it still couldn't find qt.

I edited my .bashrc, and added in the following lines:
export QTDIR

and then sourced the .bashrc file (. ~/.bashrc) and then the configure script for arts was able to find it.

I tried to compile arts, it ran for ages, and then errored:
cc1: error: unrecognized option `-fpie'
make[2]: *** [artswrapper-artswrapper.o] Error 1
make[2]: Leaving directory `/usr/src/arts-1.5.0/soundserver'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/arts-1.5.0'
make: *** [all] Error 2


I edited the Makefile in the soundserver directory, commented out the -fpie reference, and then kicked off the compile again. I also removed the reference from the toplevel Makefile, and then compile completed.

I installed arts. I went back and checked the instructions again, and found that I should have configured Qt in a specific way, and all I'd done was pass the "-thread" option.

I hope Qt works, because I don't want to have to wait another hour for it to recompile.

I then downloaded kdelibs, and configured it. The configure script output a few warnings:
checking lua.h usability... no
checking lua.h presence... no
checking for lua.h... no
lua.h was not found or was not usable, Lua 5.0 headers are required !
checking lualib.h usability... no
checking lualib.h presence... no
checking for lualib.h... no
lualib.h was not found or was not usable, Lua 5.0 headers are required !

Not sure what Lua is.
checking for libart2-config... not found
configure: WARNING: Could not find libart anywhere, check

I found the source to libart here, and downloaded it.
checking for cupsServer in -lcups... no
configure: WARNING: CUPS library not found. CUPS support disabled

That's for printing, so I don't really care.
checking for xslt-config... not found
configure: WARNING: Could not find libxslt anywhere, check for libxslt >= 1.0.7. (we also keep a version of it in kdesupport for CVS users' convience)

I got the latest version from the ftp server.
checking whether to enable GSSAPI support... checking for krb5-config... not found
configure: WARNING: Could not find krb5-config

krb5 is kerberos, encryption, which I'm not interested, so I left that.
checking for pcre-config... not found
configure: error: You're missing libpcre.
Download libpcre from or find a binary package for your platform.
Alternatively, you can specify --disable-pcre, but some web pages - using regular
expressions in Javascript code - will not work correctly, the regexp support being
quite limited if libpcre isn't present.

I got the latest pcre from here.

I configured, compiled, and installed libart.

I configured libxslt, it complained about not finding libcrypto, but I don't care. I compiled it, and installed it.

I configured, compiled, and installed pcre.

I went back and reconfigured kdelibs. This time, the output was:
You're missing Apple mDNSResponder 85 or later, therefore
dnssd will be compiled as stub, without any real functionality.
If you want zeroconf support (, you should install mDNSResponder first.
See dnssd/INSTALL for details.

You're missing GSSAPI/Kerberos.
KDE can use GSSAPI/Kerberos to authenticate on certain secure websites.
GSSAPI/Kerberos authentication is typically used on intranets.

Your libaspell is too old or not installed, I couldn't find aspell.h.
You must download aspell >= 0.50.2, see
Spell-checking with libaspell will not be available, only with ispell dicts.

The development package of Hspell is not installed, I couldn't find hspell.h.
Spell-checking Hebrew with libhspell will not be available.
If you need it, install hspell >= 0.9 from sources
or from packages your distribution provides.

You're missing openSSL, or your version is too old (before 0.9.5a).
KDE won't be able to access secure websites without it, so you should
consider installing or upgrading it.
Have a look at, or find a binary package for
your platform.

You're missing bzip2 development files.
KDE won't be able to provide a help ioslave (help://) without it,
so if you want helpfiles you should consider installing it.
Have a look at for sources,
or find a binary package for your platform.

You're missing CUPS (Common UNIX Printing System) support.
If you want CUPS support, please install CUPS from
or the development packages of your distribution.

No OpenEXR Libraries were found
Install the OpenEXR package (from
if you want EXR image format support

libacl was not found. Without that library, you will not be able
to manage access control lists on file systems that support them,
such as ext3 or reiserfs.
You can download it from
(you will need attr too)

I don't intend on running the kde as kde, I just want JuK, so I don't care about any of that.

I compiled it. After compiling for ages, it failed with "cc1: error: unrecognized option `-fpie'". So I was back to editing Makefiles.

I fixed that one, kicked off the compile again. It went for ages before I got the same error.

I fixed it, and continued it compiling. Eventually it finished, possibly taking as long as qt to compile. I installed it.

I went into kdebase, and configured it again. I got the following error:
checking if UIC has KDE plugins available... no
configure: error:
you need to install kdelibs first.

If you did install kdelibs, then the Qt version that is picked up by
this configure is not the same version you used to compile kdelibs.
The Qt Plugin installed by kdelibs is *ONLY* loadable if it is the
_same Qt version_, compiled with the _same compiler_ and the same Qt
configuration settings.

Hmm, strange. I don't know what it's found then.

I ran ldconfig again, and then reconfigured kdebase. This made no difference.

I checked in the config.log, and it seems that it's picking up the useless qt libraries I installed with apt.

I decided to get around to actually loading all (well, some) of my mp3s into my new ipod.

I realised I'd need gtkpod to load them.

Rather than cheat, and install the ubuntu package, which is old, and doesn't support video, I decided to build the gtkpod out CVS again.

This was abit annoying, because I'd swapped the disk in my external caddy, and so I had access to my music, and not the backup of my laptop drive.

I downloaded the necessary files again, and went about installing libid3tag first.

This had an error with the g++ binary missing, and I found I needed to install the g++ package (the c++ compiler). After that, I needed zlib.h, so I installed zlib1g-dev. This allowed libid3tag to configure successfully.

I compiled and installed libid3tag.

I'd already built and installed mpeg4v2, from when I was building mplayer, so I tried to configure gtkpod.

I found I needed autoconf, and automake, so I installed both of those.

autogen then told me I needed libglib2.0-dev, so I installed that. autogen went a fair way through, before complaining I didn't have gtk+-2.0.

The closest package I could find was libgtk2.0-dev, so I installed that. It had a whole bunch of other packages required, and some were from the non supported repository.

I tried to configure gtkpod again, and found that I needed libglade-2.0.pc. I installed "libglade2-dev", and configured again.

This time it failed on requiring libgpod-1.0.pc, but I found there was no package providing that.

I pulled libgpod out of CVS:

sudo cvs -z3 co -P libgpod

I went about configuring libgpod, but got the following errors:
Checking for required M4 macros...
libtool.m4 not found
glib-gettext.m4 not found
intltool.m4 not found
pkg.m4 not found
Checking for forbidden M4 macros...
***Error***: some autoconf macros required to build libgpod
were not found in your aclocal path, or some forbidden
macros were found. Perhaps you need to adjust your

The first was fixed by installing libtool1.4.

The second I thought would be fixed by installing libglib2.0-dev, but I'd already installed that.

The third was fixed by installing intltool. The fourth was like the second, I thought would be fixed by installing pkg-config, but I already had it.

I tried configuring again, but it still couldn't find any of the 4 files.

When I looked a bit closer, I saw the problems were actually:
checking for automake >= 1.7...
testing automake-1.7... not found.
testing automake-1.8... not found.
testing automake-1.9... not found.
***Error***: You must have automake >= 1.7 installed
to build libgpod. Download the appropriate package for
from your distribution or get the source tarball at

checking for libtool >= 1.5...
testing libtoolize... too old (found version 1.4.3)
***Error***: You must have libtool >= 1.5 installed
to build libgpod. Download the appropriate package for
from your distribution or get the source tarball at

When I checked, I had automake1.4 for some reason.

I downloaded automake 1.7, and libtool 1.5. I configured and installed automake, and then libtool.

I autogen'd libgpod again, and it was happy with the versions of automake and libtool it found, and the first m4 file was found, however the other 3 were still not found.

I looked through the autogen script, and saw the required versions, and figured the other files were probably too old too.

I downloaded a newer version of pkg-config, from here, configured, compiled, and installed it.

When I ran autogen on the libgpod source again, this time pkg-config was found.

I tried to work out what would provide glib-gettext.m4, and I figured it must be part of glib.

I downloaded the lastest version of glib from here, and configured, compiled and installed it.

I autogen'd libgpod again, and this time it found glib-gettext.m4.

I just had to fix intltool.m4. I found intltool here, and I downloaded the latest source from here. I configured, compiled and installed it.

When I configured libgpod again, it actually completed configuring. I compiled it, and installed it.

I went back to gtkpod again. I tried to autogen gtkpod, but it failed,
"checking for PACKAGE... configure: error: *** No package 'gtk+-2.0' found
No package 'libglade-2.0' found"

I figured that both the gtk version, and the glade versions were probably too old.

I grabbed the latest gtk+ source from here, bloody huge download.

I looked around for libglade, and I found it here, but the latest version is from 2002.

I tried to configure the newer version of gtk, but it requires glib (which I'd done), Pango, and Atk. I tried to configure it anyway, but it failed.

I downloaded the source of Atk and Pango, from where I got the gtk+ source.

I tried to configure Atk, but it complained that while it had found glib2.9.1, it also found glib2.8.3. I assume glib2.8.3 was installed by ubuntu.

I did some googling, and apparently ubuntu comes with a version of atk not too much older than the latest.

I went on to try pango, and found that it wouldn't configure because I was missing fontconfig and cairo.

I downloaded the latest version of fontconfig from here. I configured, compiled, and installed it.

I went back to pango, and it configured properly. I compiled it, and installed it.

I went back to gtk+ again, and tried to configure it, but it failed again. I was missing cairo.

I downloaded the latest cairo from here. I configured, compiled, and installed it.

I tried configuring gtk+ again, but yet again, it failed. When I checked the config.log, I found that it was failing because atk was missing.

I went back to configure atk again, and just got the same errors as before, about the mutiple versions. I googled, and read through stacks of pages about it.

In the end, what I found fixed the problem, was just running ldconfig (as root). Then atk configured.

I compiled it, and installed it.

I went back to gtk+ again, and this time the configure script got further. It still didn't complete though, with the error:
configure: WARNING: *** TIFF loader will not be built (TIFF library not found) ***
configure: error:
*** Checks for TIFF loader failed. You can build without it by passing
*** --without-libtiff to configure but some programs using GTK+ may
*** not work properly

So I guess there's a tiff package I need.

I downloaded libtiff from here, I configured it, compiled it, and installed it.

I went back to gtk+ again, reconfigured it, and this time it errored with:
configure: WARNING: *** JPEG loader will not be built (JPEG library not found) ***
configure: error:
*** Checks for JPEG loader failed. You can build without it by passing
*** --without-libjpeg to configure but some programs using GTK+ may
*** not work properly


This time I was able to use apt-get, just having to install libjpeg62-dev (since the libjpeg stuff hasn't been updated since 2001 it seems).

I reconfigured gtk+ again. This time:
checking for X... no
configure: error: X development libraries not found
Argh! (again).

I checked the config log, and it seems that gtk+ was looking for X11/Intrinsic.h

I checked in the ubuntu packages, and this was provided by both "libxt-dev" and "tendra".

I installed libxt-dev, and then reconfigured gtk+ again. The configure completed, but it told me that it couldn't find pango. I knew I'd just built it, but then I looked closer, and saw that it needed pango built with cairo support, which I hadn't done.

I went back to Pango, and reconfigured it, it picked up Cairo support, I tried to compile it, but it failed with:
cairosimple.o: In function `main':
/usr/src/pango-1.10.2/examples/cairosimple.c:82: undefined reference to `cairo_surface_write_to_png'
collect2: ld returned 1 exit status
make[2]: *** [cairosimple] Error 1
make[2]: Leaving directory `/usr/src/pango-1.10.2/examples'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/pango-1.10.2'
make: *** [all] Error 2


I did a "make clean", reconfigured it, attempted to recompile it again, but got the same error.

I seem to recall cairo saying something about no png support when I built it.

I went back to Cairo (not literally :-), and checked the config.log, and found that it had not been able to find libpng.

I tried to use apt to install the libpng-dev package, but I already had it.

I downloaded the latest libpng from here. I configured, compiled, and installed it.

I went back to Cairo, reconfigured it, and this time it said it had png support.

I recompiled it, and then installed it again.

I reconfigured pango again, and attempted to recompile it. It compiled. I installed it.

I went back to gtk+ for the god knows how manyth time, and configured it again. It configured. I kicked off the compilation.

It took ages to compile, but it compiled, and I installed it.

I went back to gtkpod, and autogen'd it again, and it complained that libglade-2.0 was missing.

I checked I already had the libglade packages installed, I did, so I started installing the file I downloaded.

I configure it, but it failed:
checking for GTK+ - version >= 2.0.0...
*** 'pkg-config --modversion gtk+-2.0' returned 2.8.9, but GTK+ (2.8.6)
*** was found! If pkg-config was correct, then it is best
*** to remove the old version of GTK+. You may also be able to fix the error
*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
*** /etc/ Make sure you have run ldconfig if that is
*** required on your system.
*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH
*** to point to the correct configuration files
checking for gtk_plug_get_type... no
checking for pkg-config... (cached) /usr/local/bin/pkg-config
checking for libxml-2.0 >= 2.4.10 atk >= 1.0.0 gtk+-2.0 >= 2.0.0... Package libxml-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `libxml-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'libxml-2.0' found
configure: error: Library requirements (libxml-2.0 >= 2.4.10 atk >= 1.0.0 gtk+-2.0 >= 2.0.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.

So I guessed that I had to run ldconfig to start with, which I did.

That got rid of the first error, about it finding the other version.

I was missing libxml-2.0. I found the installer here. I went to get it from the Australian mirror, on planetmirror, but as usual, it hadn't been updated for like a year and a half.

At this point, I'd been working on getting gtkpod for 4 hours.

I unpacked libxml, configured it, compiled it, and installed it.

I went back to libglade, reconfigured it, compiled it, and installed it.

I went back to gtkpod, and autogen'd it again. It errored with:
checking for PACKAGE... configure: error: *** Requested 'libglade-2.0 >= 2.4.0' but version of Libglade is 2.0.1


I thought I downloaded the latest version of libglade. I googled, and turned up the same stuff as before. I googled for "libglade 2.4", and I found it, here.

I downloaded the latest version, configured it, compiled it, and installed it.

I once again autogen'd gtkpod, and this time it configured, however it didn't find mp4v2.

I realised at this point, that I'd not actually installed the mpeg4ip stuff, I'd only unpacked it.

I tried to build it, starting with the bootstrap, but it failed:
SDL does not appear to be installed - install the SDL development package
You must have sdl-config in your path to continue


I installed libsdl1.2-dev and all the dependent packages (using apt).

I was then able to bootstrap mpeg4ip. It went through and configured, but it couldn't find any of the encoders.

I couldn't remember if I'd compiled ffmpeg or not.

I compiled mpeg4ip anyway, but it failed with "cc1: error: unrecognized option `-Wmissing-field-initializers'", whatever that means.

I checked the config log, and it was testing if the compiler supported that, which is doesn't, but was failing, and thinking it did. It was then writing the Makefiles with that switch to the compiler in it.

I edited the root Makefile, and removed that switch, but it still wouldn't compile. I found that it was going into a deeper directory, and when I went in and edited the Makefile in there, there were 2 references.

I removed them, and was able to compile the files in there.

I went up a directory, and ran a make, it went for a while before I got the same error. I edited the Makefile in there, compiled those files, and repeated until it broke again.

This happened about 11 times, it was very tedious having to fix all the Makefiles.

Eventually it finished, and I installed it.

I was now 5 hours in to this. I think it might have been easier to just put the other hard drive in the caddy, and get the binaries out of my backup.

I went back to gtkpod again. I autogen'd it again. I saw what I wanted, it would compile with acc/mp4v2 support.

I kicked off the compilation. I got an error, "../ylwrap: line 78: flex: command not found".

I used apt to install flex. I kicked off the compilation again. It finished. I installed it.

I ran it, and it started.

After fixing the config, to find the ipod in /media/ipod, insted of /mnt/ipod, it all worked.

I couldn't test loading a video though, because they were all on the other hard disk.

It took me just over 5 hours to get gtkpod running. gees.

Wednesday, December 28, 2005

I mucked around with the xbox for the first time in ages.

I found a copy of Garden State I downloaded a few months ago, and never got around to watching, I watched it.

I really like Zach Braff's stuff, from Scrubs, to this movie.

After that, I wanted to try streaming video from the tivo to it again, but then I realised that I didn't have ccxstream on the tivo, it was on my old tivo. (I recently replaced the disks).

I googled around for ccxstream, and I found it, along with "TiVoX Control Station" here.

I installed ccxstream on the tivo, and tested it, worked fine. This version seemed more reliable than the one I used to use, which crashed fairly often.

I also installed the xbox script, and mucked around with it a bit, but I couldn't get it to work properly, it would show me the show details, but I couldn't watch them, and then it got stuck.

Oh well, I don't really need it anyway, since I can just use the tivo, and the better remote control.

Tuesday, December 27, 2005

I backed up my laptop, and installed Ubuntu.

I was quite impressed at the amount of stuff that just worked.

Straight away, I had proper video support, including direct rendering, and audio, wireless, and the keyboard volume controls working.

This was all stuff that took me hours over a couple of weeks to get working when I installed Debian when I first got my laptop.

Anyway, I went through and installed the "non free" stuff, like an mp3 encoder, and mplayer, and ffmpeg.

I also put on java, and a couple of other things.

Getting all my apps working, like Gaim, and Thunderbird was no great task, I just copied the . directories from my backup, and didn't have to reconfigure them.

I found that mplayer wouldn't render any WMV files for some reason, I'd installed the codec pack, from the mplayer site, but it didn't make much difference, instead of refusing to play the videos, it crashes.

I decided to build it. I downloaded the latest source from here.

I unpacked it, and configured it, but found that I was missing a compiler.

It doesn't support gcc4.0, so I only installed 3.3, but then it complained I had no optimised compiler.

I'd installed a new kernel as part of an apt upgrade, so I rebooted to get that running.

After that, it made no difference. Also, I lost my volume control, and I still didn't have cpu frequency scaling. I think I might have to build a custom kernel.

I had to install gcc, to get the optimised compiler, which also included gcc4.0, but mplayer was able to use gcc3.3.

I found that it configured with a few supported file types missing.

First it was vstream, for watching tivo files, I needed to install the vstream-client, which I got from here, and then I didn't have dvdread support.

I'd previously installed the css library, according to the instructions on the ubuntu site here, and I thought I needed the "libdvdread3-dev" package installed, but it still didn't add DVD support.

I then realised it had been disabled, because I had a different type of dvd support enabled.

I noticed that ALSA support was disabled, so I installed alsa-source, but that didn't make any difference, I found I needed "libasound2-dev", this gave me alsa support.

I was missing x264 support, I got the latest CVS snapshot from here, I configured it, and got a warning with it wanting to check my svn version.

I installed "subversion", reconfigured x264, tried to compile it, but found I was missing nasm.

I installed nasm, and then was able to compile and install x264.

I reconfigured mplayer again, which still didn't pickup x264 support. When I checked the configure.log, I found there was an error:
/usr/local/lib/libx264.a(encoder.o): In function `x264_encoder_encode':
encoder.c:(.text+0x5ade): undefined reference to `pthread_create'
encoder.c:(.text+0x5b14): undefined reference to `pthread_join'

I'm not sure what the solution to that is. I tried rebuilding x264, but it didn't fix it.

I went on to deal with no Xvid support. I built it as I did yesterday when building ffmpeg, including having to fix the gcc symlink.

I compiled and installed that, and mplayer's configure picked it up.

I went to find out why I had no DivX4/5 support, because I was missing decore.h, but I couldn't find a package or source download that included this.

I started compiling mplayer. And waited a long time. It finished compiling, and I installed it.

It ran, and attempted to play the video files I'd not been able to before, but still didn't work properly.

The audio worked, but the video wouldn't render. It was complaining that "The selected video_out device is incompatible with this codec."

I tried forcing it to gl2, like I used to do, to get proper scaling, but found that I didn't have gl2 support.

I installed the libx11-dev package, and the x11proto-gl-dev package. That gave me the x11 headers, and libs, but not x11 somehow, and still not the OpenGL support.

I then installed freeglut3-dev, and libgl-mesa-dev and libglu1-mesa-dev. But I still didn't have opengl support. I don't know what I need to install to get that.

I managed to get DivX support, I had to download the installer from here, which is a binary distribution, so there was nothing to configure or compile.

Sunday, December 25, 2005

I loaded a few more videos into my ipod this morning, and they all ran fine.

I then used the camcorder connection cable I bought a few days ago to connect my ipod to the tv, with the plugs swapped around, as per the details here, being:

* Plug the red RCA plug into your TV's yellow RCA jack.
* Plug the yellow RCA plug into your TV's white RCA jack.
* Plug the white RCA plug into your TV's red RCA jack.

This worked fine, and the videos ran fine on the tv.

The quality wasn't terrific, but it was quite watchable. I've yet to try it with something out of the tivo for a true test of the quality.

After that, I noticed that the screen on the ipod, when the backlight goes off, is all discoloured. While I'm whinging, the new ipod always looks greasy, and picks up fingerprints, smears, and tiny scratches like nothing else.

My old ipod mini only every looked a tiny bit grubby around the thumbwheel, and on the apple logo on the back, the anodized aluminium kept it fine otherwise.

I did a bit of googling, and I found that apparently the "rainbow" look on the screen is caused my polarisation, to do with the sun. I might pop into the apple shop and ask them about it at some point, but I'll probably get fobbed off anyway.

I'm really not all that worried, if I could get an ipod with a large capacity, and no screen, I'd be happy, since I never look at the screen anyway, while it's in my pocket, and I'm riding along.

I found Mike Rowehl's blog here, and he has a few good posts about using linux with the video ipod.

He mentioned that he needed to use a version of ffmpeg from CVS, and the command to convert videos. He also talked about using gtkpod to load the videos.

I built and installed mp4v2 first, downloading it from here. It didn't make any difference to gtkpod though, not that I was expecting it to, because gtkpod needs to be recompiled.

So anyway, I decided to build a newer version of ffmpeg, so I could do video conversion on my laptop. It's mainly a gimmicky thing, that I probably won't even use once I get going, but anyway.

I pulled the latest code out of cvs:
cvs -z9 co ffmpeg

I configured it:
./configure --enable-mp3lame --enable-libogg --enable-faac --enable-xvid --enable-gpl --enable-x264 --enable-shared

however had issues with the mp3lame library being missing, when I tried to compile it.

I grabbed the latest lame src from here

unbzipped it, configured it, compiled it, and installed it.

This got me a step closer, now I didn't have the ogg library.

I figured I probably didn't need it anyway, so I reconfigured ffmpeg without ogg support:
./configure --enable-mp3lame --enable-faac --enable-xvid --enable-gpl --enable-x264 --enable-shared

And then tried to compile it, but was missing the FAAC library.

This I do need, because the audio on ipod videos needs to be in AAC format, funny that.

I grabbed the FAAC source from here.

It used the external mp4v2 library that I'd already installed.

I compiled and installed it, and went back to ffmpeg again.

I got another step closer, now the xvid library was causing errors.

I downloaded the latest source of xvid, from here, and configured it.

It complained about not being able to find a correct assembler ("configure: WARNING: no correct assembler was found - Compiling generic sources only"), and then I couldn't compile it, getting the error, "cc1: error: unrecognized command line option "-freduce-all-givs""

I figured this was related to the assembler being missing, and it seems that both yasm and nasm were being looked for my xvid, so I installed nasm, since yasm doesn't appear to be available in debian.

I then reconfigured xvid, which found the assembler, but trying to compile (even after a make clean) would result in the same error as before.

I found this forum post, and the error is caused by using GCC4, which I have on my laptop.

Apparently you can fix this with the gcc_select command, but I didn't have it, and it's not available in debian, so I just used the same fix as when I installed Oracle, replacing the gcc symlink from 4 to 3.3:

cd /usr/bin
sudo rm gcc
sudo ln -s gcc-3.3 gcc

When I compiled xvid, it compiled fine.

Installing went through without issue. I went back to ffmpeg.

I got another step forward.. now I was the missing the x264 library.

As before, I figured I probably didn't need it anyway, so I reconfigured ffmpeg without x264 support:
./configure --enable-mp3lame --enable-faac --enable-xvid --enable-gpl --enable-shared

This time it compiled and installed without issue.

I again tried to convert videos, and didn't have any luck. Also, I think there's errors in the output when I run ffmpeg with no parameters.

I'm wondering if there's a problem with the gcc version mismatch.

I stopped working on ffmpeg, and went back to gtkpod.

I'd pulled the latest version out of CVS yesterday, but the INSTALL file tells you to configure it, and there's no configure script.

I ran instead, and it went for a while, before complaining that libglade-2.0 was missing.

I installed libglade2-dev with apt, and it got a bit further, until it complained about the version of the id3tag lib I had installed.

I got the latest version from here.

I was able to configure and compile this without issue.

After this, I was able to use autogen to configure gtkpod successfully.

It also compiled and installed correctly.

I ran it up, and I was able to load videos that I converted with the windows tool into the ipod, so I'm halfway there, I just have to find the version of ffmpeg the windows tool uses, and compile it for linux.

Update: I finally managed to get ffmpeg to output a valid file for the ipod. The command I ended up with, building it a bit at a time, is as follows:
ffmpeg -i [input file] -vcodec xvid -b 1800 -acodec aac -ab 128 -maxrate 2500 -qmin 3 -qmax 5 -s 320x240 -f mp4 [output file.mp4]

I could probably use less audio bitrate, 64 or something, I'll continue testing, and checking quality. Also, the order of the switches matters, the output filename should be on the end.

Saturday, December 24, 2005

I got a new ipod for Christmas, a 30GB video compatible unit.

I attached it to my laptop, and started up gtkpod. After some initial issues, with the mount point missing etc, I eventually got it configured correctly.

I was still having errors, gtkpod couldn't read the database. I suspected this was because I didn't have one yet. I checked, and instead of the database, I found a file called "firsttime".

I figured that I needed to initialise the ipod, and a bit of googling turned up this page, including the text "James Krunk (krunkalot at hotpop dot com) points out that the first time you use GtkPod, you must select "Create Directories" from the "File" menu to set up the database on the iPod.", confirming what I thought.

I tried this, but it didn't make any difference whatsoever. I don't know what the deal was there.

I continued googling, and I found this page, with some details about video support for gtkpod.

On that page is a link to here, where you can download debian packages, and tarballs of the source with the patches for video support applied.

I downloaded and installed these, but it still wouldn't initialise the ipod.

In the end, I decided to cheat, and use itunes, on windows. This was the usual windows spec pain in the ass.

The windows machine didn't have enough space on the system drive, and with not being able to remove useless rubbish like lookOut Express, Netmeeting, Frontpage, and a number of other useless pieces of crap, clearing up disk space was more difficult than it should have been.

I ran the install 3 times in the end, and eventually got itunes installed. I rebooted the machine, and windows didn't boot properly, explorer hung, typical.

I rebooted the machine again, and eventually got itunes working. I initialised the ipod, then ejected it, and went back to my laptop.

I shouldn't really find it remarkable that something that should have taken a minute ended up taking an hour, because windows was involved.

Anyway, I loaded some music into the unit with the newer gtkpod, and it worked fine.

I then wanted to find how to convert videos to watch on the ipod. I had a quicktime video I downloaded from apple hanging around, so I figured that might work, I loaded it, but it didn't.

When I tried to watch it, the screen went blank for about 10 seconds, and then it went back to the menu.

I figured there was some special format that the video files needed to be in.

Someone posted a mail to the mailing list a few days ago, about converting tivo files to ipod format, and wrote a howto on it here, with a link to a tool for doing the conversion, here.

I had a quick look, but realised it was a windows tool.

Back to google, and I found a few pages dealing with ipod video conversion, though a lot of them were for running videos on ipods running linux, rather than converting videos on linux for an ipod.

Basically, ffmpeg seems to be the tool to use.

I found this page, with the following command:

ffmpeg -vcodec xvid -b 300 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec aac -ab 96 -i input_file.avi -s 320x240 -aspect 4:3 ipod_output.mp4

It also has a link to this page, where the command has been modified a bit..

ffmpeg -vcodec xvid -b 300 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec aac -ab 96 -i input_file.avi -s 320x240 -aspect 4:3 ipod_output.mpg

(The only difference I can see being the extension on the output video).

I tried to use ffmpeg to convert a video file, but discovered I didn't have ffmpeg on my laptop. I used apt to install it, from a third party source.

The page is at, which includes the apt source lines.

After that, I was able to convert a couple of videos, but most of them would cause ffmpeg to crash for some reason.

When it would complete properly, I couldn't play the output file with mplayer, and when I loaded it in the ipod, it wouldn't play them either.

I had another look at the windows tool, downloaded it, and tried to get it to run under wine.

This was a waste of effort, and download, as during the install, it needed to download 26MB worth of the dotnet rubbish, which then refused to install because it needs IE5.5 or something.

I tried running the tool anyway, which complained about a few missing DLLs. I found and downloaded the missing DLLs, and installed them, but it still didn't work, now with a dialog about missing registry entries, pointing to the dotnet crud.

So that was the end of that.

I went back to trying to get the files to convert with ffmpeg.

I found a script here, for doing MythTV -> ipod conversion, and tried to adapt the command, but it didn't get me any further, the video still didn't work.

I also found this page, and used the command from that page, but it didn't work either.

I'd now spent a few hours on this, and I wanted to make sure the files I was trying to convert would actually convert.

I'd left the windows machine on, so I vnc'd to it, and installed the windows conversion tool. Initially I had issues with this, because I was trying to source the video files for conversion with a UNC address, and it couldn't read them.

I only found this when I turned on the debugging though, at which point I discovered that the tool was using ffmpeg to do the conversion anyway.

I mapped a network drive, converted a file, and I was able to watch it with mplayer, confirming that the video converted correctly.

I tried to load it into the ipod, but gtkpod complained that the video is not supported, without the mp4v2 library.

I went back into the debugging output of the windows conversion tool, and I copied the command line out, and tried using it, but found that some of the options weren't supported by the version I have on my laptop.

There's a few minor revisions difference between the versions of ffmpeg on my laptop, and the one used by the windows tool, which could be something to do with it.

I gave up at this point, until a few hours later, I used itunes on the windows machine to load the video, and it ran fine.

It's a matter of updating some apps on my laptop I think, ffmpeg so I can convert videos properly, and gtkpod, with the correct library support, so I can load them into the ipod.

Here's a couple of links to converting videos to run on an ipod that runs ipod linux, here, and here.