lmi
[Top][All Lists]
Advanced

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

[lmi] Building libxml++


From: Greg Chicares
Subject: [lmi] Building libxml++
Date: Fri, 15 Sep 2006 12:49:18 +0000
User-agent: Thunderbird 1.5.0.4 (Windows/20060516)

I'm trying to find the easiest way for us to build libxml++, but
so far I haven't come close to building it at all.

We can assume that everyone has already installed MSYS, gcc, and
libxml2. Beyond that, we strongly prefer to add as few extra
requirements as possible.

I assume that using MSYS's bash for './configure && make' is the
best general approach.

First, we want to apply Vadim's 2005-10-29T20:55Z patch described
here:
  http://bugzilla.gnome.org/show_bug.cgi?id=320197
which can be retrieved this way:
  wget --non-verbose --timestamping \
   --output-document=no-glibmm-patch \
   http://bugzilla.gnome.org/attachment.cgi?id=54059
and should have this md5sum:
  7431a183dd6b0d4c08c8bd8f75cf4401 *no-glibmm-patch

Because the patch is against cvs, apply it this way:
  /c/libxml++-2.14.0[0]$patch --strip=1 <no-glibmm-patch
Everything looks fine; I assume that this:
  patching file `docs/manual/libxml++_without_code.xml'
  Hunk #1 succeeded at 54 with fuzz 2 (offset 1 line).
is okay and is a normal result of applying the patch against a
newer version (2.14.0) of the library.

Now, following the directions in (1)(d) and (1)(e) of file
'README.auto' on the 'libxmlpp_branch' branch of 'lmi', we
need to run configure with '--without-ustring'.

To minimize dependencies, we prefer not to install 'pkg-config'.
The instructions in (1)(e) say:

| e) pkg-config (optional): If you are going to regenerate configure script
|         then you have to provide to autotools the pkg-config m4 file. If you
|         don't have pkg-config installed on your system you could add
|         "-I $pkg_m4_dir" to ACLOCAL_AMFLAGS environment variable where
|         $pkg_m4_dir is the directory containing pkg.m4 file.

I'm guessing that "If you DO have pkg-config installed" was meant,
so that no "-I $pkg_m4_dir" option is wanted in this case.

The instructions continue:

|        Further more to configure the package you will need either:
|        - to install pkg-config, as it dramatically simplifies libxml++ package
|        configuration and library dependency tracking.

I assume that it will be simpler for us not to do this. Whatever
advantages 'pkg-config' may have, we prefer to avoid installing
anything we don't absolutely need, as long as a simple-enough
workaround is available.

|        - or to supply LIBXMLPP_LIBS and LIBXMLPP_CFLAGS. Depending on whether
|        you have compiled libxml++ with glibmm or without:
|
|        LIBXMLPP_LIBS=-L<xml++_lib_dir> -lxml++-2.6 -lxml2 -lz -lm -liconv \
|            -lglibmm-2.4 -lgobject-2.0 -lsigc-2.0 -lglib-2.0 -lintl
|
|        LIBXMLPP_CFLAGS=-I<libxml++_includes_dir> -I<libxml2_includes_dir> \
|            -I<glibmm_include_dir> -I<sigc++_include_dir> -I<glib_include_dir>
|
|        The flags could be passed to configure script either in the command 
line
|        $> configure LIBXMLPP_LIBS=".." LIBXMLPP_CFLAGS=".."
|        or by exporting it to the environment
|        $> export LIBXMLPP_LIBS=".." && export LIBXMLPP_CFLAGS=".." && 
configure

Let's try the third-to-last line:
|        $> configure LIBXMLPP_LIBS=".." LIBXMLPP_CFLAGS=".."
I assume that the preceding variable definitions are to be
substituted for "..". I'm not quite sure what definitions to use.
Do we really need to add all these dependencies?

  -lz           # Do we really need zlib?
  -lm           # For MinGW, libm is part of the msvc runtime.
  -liconv       # Can't we omit this and just use US ASCII?
  -lglibmm-2.4  # I think we strongly desire to omit this.
  -lgobject-2.0 # Part of glib? Can we omit this?
  -lsigc-2.0    # Signals? In msw?
  -lglib-2.0    # Part of gtk? Don't we want to avoid this?
  -lintl        # 'lmi' is US specific--can't we omit i18n?

I'm hoping we can omit most or all of those libraries.

At any rate, I tried this command:
  /c/libxml++-2.14.0[0]$configure --without-ustring LIBXMLPP_LIBS=".." 
LIBXMLPP_CFLAGS=".."
because I guessed that meaningless definitions for those two
environment variables would be syntactically valid in 'configure',
and would merely result in 'make' errors. Apparently I guessed
wrong, though--the full output of './configure' is copied below,
and the problem is that it still wants 'pkg-config' even though
I specified both environment variables.

/c/libxml++-2.14.0[0]$configure --without-ustring LIBXMLPP_LIBS=".." LIBXMLPP_C
FLAGS=".."
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawkarsers/textreader.h'
checking whether make sets $(MAKE)... yesle.am'
checking for g++... g++/xmlstring.h'
checking for C++ compiler default output file name... a.exe
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for a BSD-compatible install... /bin/install -c
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc... c:/MinGW-20050120/mingw32/bin/ld.exe
checking if the linker (c:/MinGW-20050120/mingw32/bin/ld.exe) is GNU ld... yes
checking for c:/MinGW-20050120/mingw32/bin/ld.exe option to reload object files.
.. -r
checking for BSD-compatible nm... /c/MinGW-20050120/bin/nm
checking whether ln -s works... yes
checking how to recognise dependent libraries... file_magic file format pei*-i38
6(.*architecture: i386)?
checking for dlltool... dlltool
checking for as... as
checking for objdump... objdump
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... no
checking dlfcn.h presence... no
checking for dlfcn.h... no
checking how to run the C++ preprocessor... g++ -E
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 8192
checking command to parse /c/MinGW-20050120/bin/nm output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for correct ltmain.sh version... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT
checking if gcc PIC flag -DDLL_EXPORT works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (c:/MinGW-20050120/mingw32/bin/ld.exe) supports
shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... c:/MinGW-20050120/mingw32/bin/ld.exe
checking if the linker (c:/MinGW-20050120/mingw32/bin/ld.exe) is GNU ld... yes
checking whether the g++ linker (c:/MinGW-20050120/mingw32/bin/ld.exe) supports
shared libraries... yes
checking for g++ option to produce PIC... -DDLL_EXPORT
checking if g++ PIC flag -DDLL_EXPORT works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (c:/MinGW-20050120/mingw32/bin/ld.exe) supports
shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -DDLL_EXPORT
checking if g77 PIC flag -DDLL_EXPORT works... yes
checking if g77 static flag -static works... yes
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (c:/MinGW-20050120/mingw32/bin/ld.exe) supports
shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking for some Win32 platform... yes
checking how to get MSVC-compatible struct packing... -mms-bitfields
checking string usability... yes
checking string presence... yes
checking for string... yes
checking list usability... yes
checking list presence... yes
checking for list... yes
checking map usability... yes
checking map presence... yes
checking for map... yes
checking for pkg-config... no
checking for LIBXML... configure: error: The pkg-config script could not be foun
d or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables LIBXML_CFLAGS
and LIBXML_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
See `config.log' for more details.
/c/libxml++-2.14.0[1]$




reply via email to

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