[gdal-dev] Problems building 1.6.0 with Xerces 2.7 on Solaris
10 / Sparc (1.5.x work)
Peter J Halls
P.Halls at york.ac.uk
Fri Apr 17 04:24:44 EDT 2009
Peter et al,
I have now tracked down one of the undefined's to a change in the sources
between 1.5.0 and 1.6.0 - gmlreader.cpp:
(working in 1.6.0 ...)
diff gmlreader.cpp /usr/postel/gdal-1.5.0/ogr/ogrsf_frmts/gml/gmlreader.cpp
2c2
< * $Id: gmlreader.cpp 15773 2008-11-20 20:17:16Z rouault $
---
> * $Id: gmlreader.cpp 10645 2007-01-18 02:22:39Z warmerdam $
189,194c189,192
< m_poSAXReader->setFeature( XMLUni::fgSAX2CoreValidation, false);
<
< #if XERCES_VERSION_MAJOR >= 3
< m_poSAXReader->setFeature( XMLUni::fgXercesSchema, false);
< #else
< m_poSAXReader->setFeature( XMLUni::fgSAX2CoreNameSpaces, false);
---
> m_poSAXReader->setFeature(
> XMLString::transcode("http://xml.org/sax/features/validation"),
false);
> m_poSAXReader->setFeature(
> XMLString::transcode("http://xml.org/sax/features/namespaces"),
false);
196,197d193
<
< #endif
The linker is complaining that XMLUni::fgSAX2CoreValidation is not defined in
gmlreader. The only includes in gmlreader.cpp are
grep include gmlreader.cpp
* The above copyright notice and this permission notice shall be included
#include "gmlreader.h"
#include "cpl_error.h"
# include "ogr_geometry.h"
#include "gmlreaderp.h"
#include "cpl_conv.h"
Indeed, no include file in the ogrsf_frmts/gml directory references XMLUni.hpp.
Digging a bit deeper, I find that configure for the versions of GDAL prior to
1.6.0 that I have includes an include call to XMLUni.hpp, but that distributed
with 1.6.0 had this line removed.
I will now experiment with where the Xercesc include files need to be provided
and raise a ticket once I have got 1.6.0 working.
Thanks and best wishes,
Peter
Rushforth, Peter wrote:
> Peter,
>
> Is it possible that what's in /usr/appl/bin/solaris/sparc/include/
> is xerces 2.8 or other?
>
> Looks like a version issue to me, going by memory.
>
> Peter
>
>> -----Original Message-----
>> From: gdal-dev-bounces at lists.osgeo.org
>> [mailto:gdal-dev-bounces at lists.osgeo.org] On Behalf Of Peter J Halls
>> Sent: April 16, 2009 8:49 AM
>> To: gdal-dev at lists.osgeo.org
>> Subject: [gdal-dev] Problems building 1.6.0 with Xerces 2.7
>> on Solaris 10 / Sparc (1.5.x work)
>>
>> Dear All,
>>
>> I'm sure that I've done something wrong, but cannot see
>> it! I've pulled GDAL 1.6.0 and ran the same configure
>> command as for 1.5.x, seeking to include xerces (for GML).
>> Configure failed to find the xerces libraries with both gcc
>> 3.3 and the Sun compilers; I also had to drop Jasper, as I do
>> not currently have this. I got round the xerces problem for
>> the Sun compilers (but get a new set of errors from gcc) by
>> editing configure to add a reference to the XMLUni header
>> file, as follows:
>>
>> #include <xercesc/util/XercesDefs.hpp>
>> #include <xercesc/util/XMLUni.hpp>
>> #include <xercesc/util/PlatformUtils.hpp>
>>
>> However, GDAL then fails to build, with multiple link errors
>> of the same form as originally generated by configure:
>>
>> Undefined first referenced
>> symbol in file
>> int xercesc_2_7::XMLString::compareString(const unsigned
>> short*const,const unsigned short*const)
>> /usr/postel/gdal-1.6.0/ogr/ogrsf_frmts/o/.libs/iom_basket.o
>> unsigned short*xercesc_2_7::XMLString::replicate(const
>> unsigned short*const)
>> /usr/postel/gdal-1.6.0/ogr/ogrsf_frmts/o/.libs/iom_basket.o
>> xercesc_2_7::XMLFormatter&xercesc_2_7::XMLFormatter::operator<
> <(const unsigned
>> short*const) /usr/postel/gdal-1.6.0/ogr/ogrsf_frmts/o/.libs/writer.o
>> void xercesc_2_7::XMLString::catString(unsigned
>> short*const,const unsigned
>> short*const) /usr/postel/gdal-1.6.0/ogr/ogrsf_frmts/o/.libs/writer.o
>> xercesc_2_7::LocalFileFormatTarget::LocalFileFormatTarget(const
>> char*const,xercesc_2_7::MemoryManager*const)
>> /usr/postel/gdal-1.6.0/ogr/ogrsf_frmts/o/.libs/writer.o
>>
>> Checking the sources, the header file requests appear to be
>> in order, so it would appear that I have some other problem
>> that is masked by my edit to configure.
>>
>> My current configure statement is
>>
>> ./configure 'CC=cc' 'CCC=CC'
>> '--with-oci-include=/usr/appl/oracle/solaris/solaris32/instant
> client10_1/sdk/include'
>> '--with-oci-lib=/usr/appl/oracle/solaris/solaris32/instantclie
> nt10_1/lib'
>> '--prefix=/usr/appl/bin/solaris/sparc' '--with-pcraster=internal'
>> '--with-png=internal' '--with-libtiff=internal'
>> '--with-geotiff=internal'
>> '--with-jpeg=internal' '--with-xerces'
>> '--with-xerces-inc=/usr/appl/bin/solaris/sparc/include/'
>> '--with-xerces-lib=/usr/appl/bin/solaris/sparc/lib/libxerces-c.so.27'
>> '--without-python' '--without-jasper'
>>
>> Note that I have had to specify the libxerces-c.so.27, rather
>> than just libxerces-c.so as I did at GDAL 1.5.x - they are
>> the same version.
>>
>> I can provide compilation logs, etc., should these be needed
>> to identify where I've gone wrong.
>>
>> Thanks and best wishes,
>>
>> Peter
>>
>> --------------------------------------------------------------
>> ------------------
>> Peter J Halls, GIS Advisor, University of York
>> Telephone: 01904 433806 Fax: 01904 433740
>> Snail mail: Computing Service, University of York,
>> Heslington, York YO10 5DD This message has the status of a
>> private and personal communication
>> --------------------------------------------------------------
>> ------------------
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
--
--------------------------------------------------------------------------------
Peter J Halls, GIS Advisor, University of York
Telephone: 01904 433806 Fax: 01904 433740
Snail mail: Computing Service, University of York, Heslington, York YO10 5DD
This message has the status of a private and personal communication
--------------------------------------------------------------------------------
More information about the gdal-dev
mailing list