libxml++2.6-dev headers installed to invalid path

Bug #320937 reported by kaervos
6
Affects Status Importance Assigned to Milestone
libxml++2.6 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Installing libxml++2.6-dev places the main header file at:

/usr/include/libxml++-2.6/libxml++/libxml++.h

Including this in a c++ source file as:

#include <libxml++-2.6/libxml++/libxml++.h>

then building, results in:

ubuntu@ubuntu:~/Programming/xml_playground/src$ make
g++ -DHAVE_CONFIG_H -I. -I.. -DPACKAGE_LOCALE_DIR=\""/usr/local/share/locale"\" -DPACKAGE_SRC_DIR=\""."\" -DPACKAGE_DATA_DIR=\""/usr/local/share"\" -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.cc
In file included from main.cc:23:
/usr/include/libxml++-2.6/libxml++/libxml++.h:10:48: error: libxml++/exceptions/internal_error.h: No such file or directory
/usr/include/libxml++-2.6/libxml++/libxml++.h:11:45: error: libxml++/exceptions/parse_error.h: No such file or directory
/usr/include/libxml++-2.6/libxml++/libxml++.h:12:40: error: libxml++/parsers/domparser.h: No such file or directory
/usr/include/libxml++-2.6/libxml++/libxml++.h:13:40: error: libxml++/parsers/saxparser.h: No such file or directory
/usr/include/libxml++-2.6/libxml++/libxml++.h:14:41: error: libxml++/parsers/textreader.h: No such file or directory
/usr/include/libxml++-2.6/libxml++/libxml++.h:15:33: error: libxml++/nodes/node.h: No such file or directory
/usr/include/libxml++-2.6/libxml++/libxml++.h:16:40: error: libxml++/nodes/commentnode.h: No such file or directory
/usr/include/libxml++-2.6/libxml++/libxml++.h:17:36: error: libxml++/nodes/element.h: No such file or directory
/usr/include/libxml++-2.6/libxml++/libxml++.h:18:44: error: libxml++/nodes/entityreference.h: No such file or directory
/usr/include/libxml++-2.6/libxml++/libxml++.h:19:37: error: libxml++/nodes/textnode.h: No such file or directory
/usr/include/libxml++-2.6/libxml++/libxml++.h:20:32: error: libxml++/attribute.h: No such file or directory
/usr/include/libxml++-2.6/libxml++/libxml++.h:21:31: error: libxml++/document.h: No such file or directory
/usr/include/libxml++-2.6/libxml++/libxml++.h:22:43: error: libxml++/validators/validator.h: No such file or directory
/usr/include/libxml++-2.6/libxml++/libxml++.h:23:46: error: libxml++/validators/dtdvalidator.h: No such file or directory
/usr/include/libxml++-2.6/libxml++/libxml++.h:24:49: error: libxml++/validators/schemavalidator.h: No such file or directory

From what I can tell the libxml++-2.6 directory shouldn't exist, and the path to the main header file should instead just be:

/usr/include/libxml++/libxml++.h

Description: Ubuntu jaunty (development branch)
Release: 9.04

Package: libxml++2.6-dev
State: installed
Automatically installed: no
Version: 2.24.0-1ubuntu1
Priority: optional
Section: libdevel
Maintainer: Ubuntu Core Developers <email address hidden>
Uncompressed Size: 586k
Depends: libxml++2.6-2 (= 2.24.0-1ubuntu1), libxml2-dev (>= 2.6.1), libglibmm-2.4-dev (>= 2.4.0), pkg-config
Suggests: libxml++2.6-doc
Description: A C++ interface to the GNOME XML library (libxml2)
 libxml++ is a C++ wrapper for the libxml2 XML parser library (otherwise known as the GNOME2 XML library). It has SAX and DOM-like APIs, but does not
 attempt to conform exactly to the DOM specification because they are not aimed at C++. Its API is much simpler than the underlying libxml C API.

 This package contains development files.
Homepage: http://libxmlplusplus.sourceforge.net/

Revision history for this message
Murray Cumming (murrayc) wrote :

> Including this in a c++ source file as:
> #include <libxml++-2.6/libxml++/libxml++.h>

But you shouldn't do that. You should use pkg-config to give you the include path, and just use
#include <libxml++/libxml++.h>

This is entirely normal for libraries which plan to have parallel-installed versions, as all libraries should.

This may help:
http://libxmlplusplus.sourceforge.net/docs/manual/html/index.html#id2504511

(I am the upstream maintainer.)

Changed in libxml++2.6:
status: New → Invalid
Changed in libxml++2.6:
status: Invalid → Confirmed
status: Confirmed → New
Revision history for this message
kaervos (eudoxus) wrote :

OOops. My n00b is showing. *blush*

I only know just enough to be dangerous. =)

I added:

`pkg-config libxml++-2.6 --cflags --libs`

to my compiler options and all is well now.

Thanks, and sorry for the false alarm.

Cheers.

Andreas Olsson (andol)
Changed in libxml++2.6:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.