Re: Two compilation errors
On Fri, 01 Oct 2004 14:32:13 -0700, Eric Gaumer wrote:
> On Fri, 2004-10-01 at 14:10, Tong wrote:
>> I'm trying to compile DWI (a simple system to create data driven
>> applications, http://www.linas.org/linux/dwi/), but met with 2
>> compilation errors.
>> 1) in the dwi-gtk directory, I got the "No package 'xml2' found" error:
>> make: Entering directory `/export/home/tong/try/dwi-0.6.1/dwi-gtk'
>> if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I ../app -I ../src -I ../db_drivers `pkg-config --cflags xml2 glib-2.0 gobject-2.0 gtk+-2.0 libgnomeui-2.0 libglade-2.0` -I/usr/include/glib-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libgnomeui-2.0 -I/usr/include/libxml2 -MT duifield-gtk.lo -MD -MP -MF ".deps/duifield-gtk.Tpo" -c -o duifield-gtk.lo duifield-gtk.c; \
>> then mv -f ".deps/duifield-gtk.Tpo" ".deps/duifield-gtk.Plo"; else rm -f ".deps/duifield-gtk.Tpo"; exit 1; fi
>> Package xml2 was not found in the pkg-config search path.
>> Perhaps you should add the directory containing `xml2.pc'
>> to the PKG_CONFIG_PATH environment variable
>> No package 'xml2' found
>> How can I fix this?
>> Note that I'm sure I have the libxml2 libxml2-dev packages
>> installed. Besides, I tried to search for the "xml2.pc" from the
>> "Debian Package Contents Search" but didn't find any match.
> This is the name of the file. Just create a symlink with the name it's
> looking for.
Can you be more specific?
I have the /usr/lib/pkgconfig/libxml-2.0.pc file, and
ln -s /usr/lib/pkgconfig/libxml-2.0.pc /usr/lib/pkgconfig/xml-2.0.pc
didn't seems to be help.
>> 2) I met the error "glibconfig.h no found" :
>> gcc -DHAVE_CONFIG_H -I. -I. -I.. -I ../app -I ../src -I ../db_drivers -I/usr/include/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libgnomeui-2.0 -I/usr/include/libxml2 -MT duifield-gtk.lo -MD -MP -MF .deps/duifield-gtk.Tpo -c duifield-gtk.c -fPIC -DPIC -o .libs/duifield-gtk.lo
>> In file included from /usr/include/glib-2.0/glib/galloca.h:30,
>> from /usr/include/glib-2.0/glib.h:30,
>> from duifield-gtk.c:36:
>> /usr/include/glib-2.0/glib/gtypes.h:30:24: glibconfig.h: No such file or directory
>> This is strange,
>> - the glibconfig.h file is at
>> $ dir /usr/lib/glib-2.0/include/glibconfig.h
>> -rw-r--r-- 1 root root 5039 Aug 24 12:55 /usr/lib/glib-2.0/include/glibconfig.h
>> - I've include the path "/usr/lib/glib-2.0/include" on the gcc
>> command line.
>> - shouldn't gcc find all the header files for -dev packages?
>> I kept getting .h not found error and was forced to search those
>> header files and add their paths manually. Now my configure looks
>> like this and it is still not enough:
>> configure CFLAGS='-I/usr/include/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libgnomeui-2.0 -I/usr/include/libxml2'
>> How can I fix this problem?
> Add -l /usr/lib/glib-2.0/include to the build
> Sounds like a buggy configure.ac
Isn't the "-l" suppose to be for library files instead of header files?
Note that I have -I/usr/include/glib-2.0/include for gcc.
>> BTW, anyone knows a pre-compiled debian package for DWI?