lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Building libxml++


From: Wendy Boutin
Subject: Re: [lmi] Building libxml++
Date: Tue, 03 Oct 2006 20:12:54 -0400
User-agent: Thunderbird 1.5.0.5 (Windows/20060719)

These are the exact commands I used to successfully build and install
'libxml++-2.14.0' and it's dependencies. These diverge from Evgeniy's
prescription only in these two environment variable settings [with
explanations below]:
  export PKG_CONFIG='pwd'/pkg-config
  export LIBXML_LDFLAGS="-L/usr/local/lib -lxml2"
Evgeniy--if, after reading my explanations below (searching for your name
will take you there quickly), you see reasons why these diversions are
incorrect, I'd be interested in understanding them.

I used our current production development environment instead of creating
the exact one Evgeniy suggested, which had slightly different versions of
the same tools we're using today. I don't know that that accounts for the
various warnings I observe in buildlogs, but since the libraries are built
the warnings are less interesting right now.

0. Download these files:
libxml2-2.6.26.tar.gz
 ftp://xmlsoft.org/xml/libxml2-2.6.26.tar.gz

libxslt-1.1.17.tar.gz
 ftp://xmlsoft.org/libxslt/libxslt-1.1.17.tar.gz

libxml++_2.14.0.tar.gz

http://ftp.gnome.org/pub/GNOME/sources/libxml++/2.14/libxml++-2.14.0.tar.gz

and validate them:
address@hidden /c/wendy
$ md5sum *.gz
92ccfe24e23d6942441c6a1c78509dbf *libxml++-2.14.0.tar.gz
2d8d3805041edab967368b497642f981 *libxml2-2.6.26.tar.gz
fde6a7a93c0eb14cba628692fa3a1000 *libxslt-1.1.17.tar.gz

1. Build and install 'libxml2-2.6.26':
address@hidden /c/wendy
$ gzip -d libxml2-2.6.26.tar.gz

address@hidden /c/wendy
$ tar -xf libxml2-2.6.26.tar

address@hidden /c/wendy/libxml2-2.6.26
$ ./configure --enable-shared --disable-static --with-debug --without-iconv --with-schemas --without-schematron --without-modules

address@hidden /c/wendy/libxml2-2.6.26
$ make >>../libxml2-2.6.26_buildlog00 2>&1

There are many warnings in buildlog, i.e.,
gcc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -DHAVE_WIN32_THREADS -D_REENTRANT -DWIN32 -g -O2 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -MT SAX.lo -MD -MP -MF .deps/SAX.Tpo -c SAX.c -DDLL_EXPORT -DPIC -o .libs/SAX.o ./include/libxml/parserInternals.h:270: warning: array 'xmlStringText' assumed to have one element but the libraries indeed built.

address@hidden /c/wendy/libxml2-2.6.26
$ make install >>../libxml2-2.6.26_installlog00 2>&1

2. Build and install 'libxslt-1.1.17':
address@hidden /c/wendy
$ gzip -d libxslt-1.1.17.tar.gz

address@hidden /c/wendy
$ tar -xf libxslt-1.1.17.tar

address@hidden /c/wendy/libxslt-1.1.17
$ ./configure --with-debug --enable-shared --disable-static

address@hidden /c/wendy/libxslt-1.1.17
$ make >>../libxslt_buildlog00 2>&1

address@hidden /c/wendy/libxslt-1.1.17
$ make -i install >>../libxslt_installlog 2>&1

3. Build and install 'libxml++-2.14.0':
address@hidden /c/wendy
$ gzip -d libxml++-2.14.0.tar.gz

address@hidden /c/wendy
$ tar -xf libxml++-2.14.0.tar

Apply these patches:
  https://savannah.nongnu.org/patch/?5431
files
  10864
  10865

address@hidden /c/wendy/libxml++-2.14.0
$ patch -p1 < libxml++_replace_ustring_with_std_string\[1\].updated.patch
patching file `configure.in'
patching file `docs/manual/libxml++_without_code.xml'
patching file `examples/Makefile.am_fragment'
patching file `examples/dom_parser_raw/main.cc'
patching file `examples/import_node/main.cc'
patching file `examples/sax_parser_build_dom/svgelement.h'
patching file `examples/sax_parser_build_dom/svgparser.h'
patching file `examples/sax_parser_build_dom/svgpath.h'
patching file `libxml++/Makefile.am'
patching file `libxml++/attribute.h'
patching file `libxml++/exceptions/Makefile.am'
patching file `libxml++/exceptions/exception.h'
patching file `libxml++/exceptions/internal_error.h'
patching file `libxml++/exceptions/parse_error.h'
patching file `libxml++/io/Makefile.am'
patching file `libxml++/io/outputbuffer.h'
patching file `libxml++/nodes/Makefile.am'
patching file `libxml++/nodes/node.h'
patching file `libxml++/parsers/Makefile.am'
patching file `libxml++/parsers/domparser.cc'
patching file `libxml++/parsers/saxparser.cc'
patching file `libxml++/parsers/textreader.h'
patching file `libxml++/validators/Makefile.am'
patching file `libxml++/xmlppversion.h'
patching file `libxml++/xmlppversion.h.in'
patching file `libxml++/xmlstring.h'

address@hidden /c/wendy/libxml++-2.14.0
$ patch -p1 < libxml++_exclude_examples_sax_exception.patch
patching file `examples/Makefile.am'

Put these files in the root directory of the library distribution:
  https://savannah.nongnu.org/patch/?5431
files
  10866
  10867

Run autotools:
address@hidden /c/wendy/libxml++-2.14.0
$ aclocal -I .

address@hidden /c/wendy/libxml++-2.14.0
$ autoconf

address@hidden /c/wendy/libxml++-2.14.0
$ automake --add-missing --copy
configure.in: installing `./mkinstalldirs'

Create a pkg-config file with the following content:
   #!/bin/sh
Not knowing if it's obvious to the rest of the world, I'll
mention '\n' is required for this to work successfully.

Evgeniy--I put 'pkg-config' in the root directory and
modified the environment variable to reflect that change:

Set environment variables:
address@hidden /c/wendy/libxml++-2.14.0
$ export PKG_CONFIG=pkg-config

That works for me, but I'd like to know if you specified
  export PKG_CONFIG='pwd'/pkg-config
for a reason that makes mine wrong?

address@hidden /c/wendy/libxml++-2.14.0
$ export LIBXML_CFLAGS=-I/usr/local/include/libxml2

Evgeniy suggested setting this variable:
  export LIBXML_LDFLAGS="-L/usr/local/lib -lxml2"
but I think I really needed this instead:

address@hidden /c/wendy/libxml++-2.14.0
$ export LIBXML_LIBS="-L/usr/local/lib/ -lxml2"

Without that setting the libraries wouldn't compile and there
were many undefined references, i.e.,
c:/libraries/libxml++-2.14.0/libxml++/attribute.cc:30: undefined reference to `xmlGetProp'

address@hidden /c/wendy/libxml++-2.14.0
$ ./configure --without-ustring --enable-shared --disable-static

address@hidden /c/wendy/libxml++-2.14.0
$ make >>../libxml++_buildlog00 2>&1

address@hidden /c/wendy/libxml++-2.14.0
$ make install >>../libxml++_installlog 2>&1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]