Ticket #4630 (closed defect: fixed)
LibDap test for version >= 3.10 fails due to libxml dependencies in headers
| Reported by: | Sharpie | Owned by: | rburhum |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | ConfigBuild | Version: | 1.9.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
The test on line 2277 of configure.in fails on my system because insufficient header include paths are provided to compile the test program:
grendel:gdal-1.9.0 sharpie$ c++ islibdappost310.cpp -c -I/usr/local/include -I/usr/local/include/libdap -I/usr/local/include/dap
In file included from /usr/local/include/libdap/AttrTable.h:54,
from /usr/local/include/libdap/DAS.h:46,
from /usr/local/include/libdap/Connect.h:62,
from islibdappost310.cpp:1:
/usr/local/include/libdap/XMLWriter.h:11:29: error: libxml/encoding.h: No such file or directory
/usr/local/include/libdap/XMLWriter.h:12:30: error: libxml/xmlwriter.h: No such file or directory
islibdappost310.cpp:2:47: warning: missing terminating ' character
islibdappost310.cpp:2: error: missing terminating ' character
In file included from /usr/local/include/libdap/AttrTable.h:54,
from /usr/local/include/libdap/DAS.h:46,
from /usr/local/include/libdap/Connect.h:62,
from islibdappost310.cpp:1:
/usr/local/include/libdap/XMLWriter.h:23: error: ‘xmlTextWriterPtr’ does not name a type
/usr/local/include/libdap/XMLWriter.h:24: error: ‘xmlBufferPtr’ does not name a type
/usr/local/include/libdap/XMLWriter.h:36: error: ‘xmlTextWriterPtr’ does not name a type
The test fails, so GDAL assumes the LibDAP version is < 3.10 which causes compilation to fail later on due to requirements for depreciated DAP headers that no longer exist. The test would succeed if it had the preprocessor flag -I/usr/include/libxml2, which I add to CPPFLAGS before running configure.
Possible solutions:
- Add ${CPPFLAGS} to the test on line 2277 of configure.in so that the user can give configure some direction if things are in weird places.
- On line 2269 of configure.in, initialize DODS_INC using dap-config --cflags if dap-config is available. On my system this returns everything necessary to find the headers needed by LibDAP:
grendel:gdal-1.9.0 sharpie$ dap-config --cflags -I/usr/local/Cellar/libdap/3.11.2/include/libdap -I/usr/include/libxml2
Change History
Note: See
TracTickets for help on using
tickets.
