Thursday, December 29, 2005

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 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/gtkpod 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
ACLOCAL_FLAGS?

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
http://ftp.gnu.org/pub/gnu/automake/automake-1.7.tar.gz

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
http://ftp.gnu.org/pub/gnu/libtool/libtool-1.5.tar.gz

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

Argh!

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

Argh.

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/ld.so.conf. 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
no
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

Hmm.

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

Ugh.

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.

2 Comments:

Anonymous Anonymous said...

I feel your pain - I've been trying to install gtk2.8.6 on a fc3 machine, and it has been ridiculous how many times i've had to reconfigure, remake, download new dependencies ... i'm not finished yet. thanks for your post, though, it helped me figure out what was going on with the cairo/no png support issue.

3:12 pm  
Blogger ZioTempa said...

Dammit!! I'm trying to configure gtkpod too, to read my ipod classic...
I thought I was stupid not getting out of this.
Thanks for your post, it makes me hope

1:53 pm  

Post a Comment

<< Home