|
From: Charles B. <cbo...@hi...> - 2003-03-04 02:28:12
|
On Mon, 2003-03-03 at 11:05, Tony Graham wrote:
> What version of libxslt are you using? For libxslt-1.0.17,
> 'xslt-config --cflags' includes '-I/usr/local/include/libxml2', which
> is why builing xmlroff works for me.
>
I'm using the latest CVS version. 'xslt-config --cflags' works fine. My
problem is that the include path (/usr/include/libxml2 for me) is not passed to
the compiler. For example, the area/Makefile.am has this include statement:
INCLUDES = \
-DG_LOG_DOMAIN=\"libfo\" \
$(GOBJECT_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/fo \
-I$(top_srcdir)/property \
-I$(top_srcdir)/datatype
After the automake/configure process the resulting area/Makefile has the
compile lines:
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
The LIBXML_CFLAGS and LIBXSLT_CFLAGS variables in the Makefile are correct
but they don't get to the compile commands.
Here is a partial output from compiling xmlroff-0.2.1:
make[2]: Entering directory `/home/charlie/projects/xml/roff/xmlroff-0.2.1/area'source='fo-area.c' object='fo-area.lo' libtool=yes \
depfile='.deps/fo-area.Plo' tmpdepfile='.deps/fo-area.TPlo' \
depmode=gcc3 /bin/sh ../depcomp \
/bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\"libfo\" -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I.. -I../fo -I../property -I../datatype -g -O2 -I/usr/local/include/pangopdf/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/local/include -I/usr/include/freetype2 -Wall -c -o fo-area.lo `test -f 'fo-area.c' || echo './'`fo-area.c
rm -f .libs/fo-area.lo
gcc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\"libfo\" -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I.. -I../fo -I../property -I../datatype -g -O2 -I/usr/local/include/pangopdf/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/local/include -I/usr/include/freetype2 -Wall -c fo-area.c -MT fo-area.lo -MD -MP -MF .deps/fo-area.TPlo -fPIC -DPIC -o fo-area.o
cc1: warning: changing search order for system directory "/usr/local/include"
cc1: warning: as it has already been specified as a non-system directory
In file included from fo-area.h:21,
from fo-area.c:13:
../fo/fo-fo.h:19:25: libxml/tree.h: No such file or directory
In file included from fo-area.h:21,
from fo-area.c:13:
../fo/fo-fo.h:80: parse error before "xmlNodePtr"
../fo/fo-fo.h:81: parse error before "fo_fo_get_element"
../fo/fo-fo.h:81: warning: type defaults to `int' in declaration of `fo_fo_get_element'
../fo/fo-fo.h:81: warning: data definition has no type or storage class
In file included from fo-area.c:35:
../fo/fo-fo-private.h:25: parse error before "xmlNodePtr"
../fo/fo-fo-private.h:25: warning: no semicolon at end of struct or union
../fo/fo-fo-private.h:32: parse error before '}' token
fo-area.c: In function `fo_area_update_after_clone_default':
fo-area.c:1183: dereferencing pointer to incomplete type
fo-area.c:1184: dereferencing pointer to incomplete type
fo-area.c:1186: dereferencing pointer to incomplete type
make[2]: *** [fo-area.lo] Error 1
make[2]: Leaving directory `/home/charlie/projects/xml/roff/xmlroff-0.2.1/area'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/charlie/projects/xml/roff/xmlroff-0.2.1'
make: *** [all] Error 2
As you can see from the error, the libxml2 include path does not get to the
compiler. If I add $(LIBXML_CFLAGS) to the INCLUDE makefile variable then
the compile works. From your email I see I should be using LIBXSLT_CFLAGS
but the result is the same.
Maybe I'm missing something but I don't see it.
Charlie B.
|