Warning: mysql_connect(): Access denied for user 'mysql_feedback'@'localhost' (using password: YES) in /usr/local/psa/home/vhosts/coin-c.com/httpdocs/CCTunes/inc_rate.php on line 18
I cannot connect to the database because: Access denied for user 'mysql_feedback'@'localhost' (using password: YES)

4. Compiling the Package

In order to compile the package yourself, you will need a couple of directions, because I have just assembled together a bunch of things using command line scripting and XCode. This chapter will give some directions, but it is not complete yet. The most important things should be covered, and if you're having troubles, just ask. Updates will follow and be consecutively outdated by updates to the software, but anyway, let's hope it's valuable to some.

Compiling XML Starlet

One of the things you will need is XML Starlet. In earlier days CCTunes was based on xsltproc, which is ok but not as flexible as XML starlet I thought. So, I compiled the thing and it does all I need it to do, like xsltrpoc would but easier than xsltproc would.

You will need to download the source packages from libxml2 (libxml2-2.6.14.tar.gz), and a compatible libxslt (libxslt-1.1.9.tar.gz) and XML Starlet (xmlstarlet-0.9.5.tar.gz). Those are the versions I used. Other versions might work for you in similar ways, but chances are you run into compatibility issues which you will have to resolve yourself. Give me a reason to upgrade to another version of XML Starlet and I will.

Compiling is the usual bunch of configure and make and make install's, but because we don't want to use any system libraries we are going to give some instructions to place the installed binaries in a temporary directory. Here we go for libxml2:

Code listing 4.1

mkdir ~/docxmlstarlet
cd ~/docxmlstarlet/
mkdir tmp
mkdir tmp/prefix
mkdir tmp/eprefix
cp ~/Downloads/libxml2-2.6.14.tar.gz .
tar xvfz libxml2-2.6.14.tar.gz 
cd libxml2-2.6.14
./configure --prefix=$HOME/docxmlstarlet/tmp/prefix/ --exec-prefix=$HOME/docxmlstarlet/tmp/eprefix/
make; make install

This will take a while (and use up my laptop's battery while I'm writing this on the train ;-) ), but in the end we will have the libraries installed and setup to go to the next phase: compiling the xslt libraries. Very similarly the following instructions trigger the same process:

Code listing 4.2

cd ~/docxmlstarlet/
cp ~/Downloads/libxslt-1.1.9.tar.gz .
tar xvfz libxslt-1.1.9.tar.gz
cd libxslt-1.1.9
./configure --prefix=$HOME/docxmlstarlet/tmp/prefix --exec-prefix=$HOME/docxmlstarlet/tmp/eprefix \
    --with-libxml-prefix=$HOME/docxmlstarlet/tmp/eprefix \
    --with-libxml-include-prefix=$HOME/docxmlstarlet/tmp/prefix/include \
    --with-libxml-libs-prefix=$HOME/docxmlstarlet/tmp/eprefix/lib
make; make install

And finally, for XML Starlet. The version we are using has a few glitches that we need to tweak. Let's first do similarly:

Code listing 4.3

cd ~/docxmlstarlet/
cp ~/Downloads/xmlstarlet-0.8.1.tar.gz .
tar xvfz xmlstarlet-0.8.1.tar.gz
cd xmlstarlet-0.8.1
open .

Now, ideally we would have the same set of instructions to make the executables but it turns out there were some mistakes in the configure script, which is found in the directory that pops up. Locate the configure script and open it with your favourite text editor. First of all, since we are using libxml2 version 2.6.14, the configure script thinks we are using version 2.6.1, which is not what it expects. To fix this, change if test "$LIBXML_VERSION" -lt 262; then on line 900 to if test "$LIBXML_VERSION" -lt 260; then. That will fix that bug. Also, it doesn't consider our system as a macintosh like system. Therefore, change *mac* on line 1811 to *apple-darwin*. That's it, the usual command sequence should complete the compilation:

Code listing 4.4

./configure --prefix=$HOME/docxmlstarlet/tmp/prefix \
            --exec-prefix=$HOME/docxmlstarlet/tmp/eprefix \
            --with-libxml-prefix=$HOME/docxmlstarlet/tmp/eprefix \
            --with-libxml-include-prefix=$HOME/docxmlstarlet/tmp/prefix/include \
            --with-libxml-libs-prefix=$HOME/docxmlstarlet/tmp/eprefix/lib \
            --with-libxslt-prefix=$HOME/docxmlstarlet/tmp/eprefix \
            --with-libxslt-include-prefix=$HOME/docxmlstarlet/tmp/prefix/include \
            --with-libslt-libs-prefix=$HOME/docxmlstarlet/tmp/eprefix/lib \
            --with-libiconv-prefix=/usr \
            --with-libiconv-libs-prefix=/usr
make; make install

And, at $HOME/docxmlstarlet/tmp/eprefix/bin/ there is the xml executable that is the XML Starlet we wanted. That's the one you find, checked in in the package directory of the source package you can download.

Compiling id3 libraries

... to be completed ...

Compiling the total package

... to be completed (use XCode on Panther) ...
line
Updated $LastChangedDate: 2005-01-07 20:53:38 +0100 (Fri, 07 Jan 2005) $
line
Kristof Van Landschoot
Author

line
Summary: How you get to compile the package yourself, also how the binaries of xml starlet were compiled.
line
Single-page Version
Copyright 2003-2004 Coin-C bvba. Questions, Comments, Corrections? Email cctunes@coin-c.com.