[Gtkradiant] Compiling libxml2 for Radiant

Rudolf Polzer divVerent at alientrap.org
Thu Jan 27 02:56:35 CST 2011

On Wed, Jan 26, 2011 at 11:50:43PM -0800, Nerius Landys wrote:
> Hello all (and especially divVerent).
> I'm in the process of compiling libxml2 for Radiant, and I ran into some
> problems (I sort of managed to solve them).  I'm wondering if anyone has
> anything to say about the problems I've had and how I've solved them.
> So I'm using the libxml2-2.7.x.tar.gz files found here:  ftp://xmlsoft.org/
> libxml2/
> I'm using MinGW/MSYS and the classic configure, make, and "make install"
> procedure.  I did try the "cscript configure.js" etc. procedure described in
> win32/Readme.txt, but that did not seem to work at all, regardless of  various
> permutations of settings (like cmd.exe Command Prompt vs MSYS, and msvc vs
> mingw-gcc compiler).
> So, sticking with configure / make.  Now, first I tried libxml2-2.7.8.tar.gz. 
> Unfortunately, with this one and anything down to libxml2-2.7.4.tar.gz, I get
> an error like this one at the end of the configure step:
> ==========================
> ...
> config.status: creating python/setup.py
> config.status: creating config.h
> config.status: executing depfiles commands
> config.status: executing libtool commands
> /bin/rm: cannot lstat `libtoolT': No such file or directory
> Done configuring
> nlandys at hugo ~/libxml2-2.7.8
> $ libtool --version
> libtool (GNU libtool) 2.2.10
> Written by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
> Copyright (C) 2010 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> nlandys at hugo ~/libxml2-2.7.8
> $
> =============================

Oddly I had not run into that problem.

Possibly however, this error may not be fatal. Does the compile run despite the
error? I mean, it just failed at deleting something. Doesn't sound too serious.
So unless this means that ./libtool is missing, everything should be fine. May
be worth reporting to the libxml2 authors, anyway.

My NetRadiant builds use libxml2-2.7.8.tar.gz, but I cross-compiled it from

> So I decided to use libxml2-2.7.3.tar.gz because it is the latest version that
> does not give me that error.
> Now there were 2 things I noticed when compiling libxml2, after the configure
> succeeded.
> First, there is some compile error with the threads code in libxml2, and it
> seems to be related to pthreads.  I'm surprised that it's using the pthread
> code instead of using native Windows threads.  Instead of mucking with this (as
> I didn't see any clear solution in the configure help), I decided to disable
> threads.
> The second thing is iconv.  My new Gtk+ libraries don't include iconv, so there
> currently isn't a dependency on iconv.  By default libxml2 uses iconv.  I
> decided to disable this as well.  I want to minimize dependency hell, and try
> to keep things as modular as possible.
> So, my final configure line turned out to look like this (I'm not entirely sure
> what the "AR=/usr/bin/ar" is for, but I used that when compiling GtkGlExt):
> nlandys at hugo ~/libxml2-2.7.3
> $ env CC='gcc -march=pentium4' AR=/usr/bin/ar \
> ./configure \
> --prefix=/home/nlandys/libxml2-install \
> --build=i386-pc-mingw32 \
> --disable-static \
> --enable-ipv6=no \
> --without-iconv \
> --without-threads \
> --without-zlib \
> --without-python \
> --without-readline
> I disabled zlib, python, and readline because from reading the configure help
> it seems that these are external dependencies as well.
> Anyhow, all compiled well with the above configure line.
> Do you see any problems with lack of thread and iconv support in libxml2 for
> Radiant?  Is this something I need to worry about?

I would not expect any problems, but:

This may POSSIBLY break support for unicode characters in entities.ent files -
but not sure if this works normally.

The only other use of libxml2 is in q3map2 <-> radiant build monitoring. Best
way to try it out is to run a threaded map compile from Radiant (using the
-threads 4 option in a -light compile).

Best regards,

Rudolf Polzer

More information about the Gtkradiant mailing list