Opened 10 years ago

Closed 9 years ago

#22911 closed defect (fixed)

gis/gdal: ogr2ogr malfunctions without XML Parser

Reported by: katzlbt@… Owned by: seanasy@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: nox@…, jmroot (Joshua Root)
Port: gdal

Description (last modified by mf2k (Frank Schima))

ogr2ogr fails to convert XML based input files for lack of a XML parser library built in. The error message by ogr2ogr is cryptic and does not point to the problem.

I strongly suggest to build gdal by default --with-expat ! Expat seems to be used with many other ports so the impact of a default=ON should be low. xerces currently fails to build so expat is the choice.

variant kmlgpx description {Enable XML (KML and GPX) conversions via expat library.} {
	depends_lib-append		port:expat
	configure.args-delete	--without-expat
	configure.args-append	--with-expat=${prefix}
}

Change History (10)

comment:1 Changed 10 years ago by mf2k (Frank Schima)

Cc: seanasy@… removed
Description: modified (diff)
Keywords: gis gdal removed
Owner: changed from macports-tickets@… to seanasy@…

comment:2 Changed 10 years ago by nox@…

Cc: nox@… added
Version: 1.8.1

Doesn't the xerces variant enable the same thing but with Xerces C?

comment:3 Changed 10 years ago by katzlbt@…

Yes, but expat seems to be used by many other ports and does not need to be built just for gdal ...

gettext depends on expat apr-util depends on expat apache2 depends on expat neon depends on expat subversion depends on expat git-core depends on expat fontconfig depends on expat Xft2 depends on expat cairo depends on expat ghostscript depends on expat ImageMagick depends on expat dbus depends on expat dbus-glib depends on expat p5-xml-parser depends on expat intltool depends on expat gd2 depends on expat graphviz depends on expat gpsbabel depends on expat py25-xml depends on expat gdal depends on expat

So my suggestion is to build gdal by default --with-expat and not with xerces as option! Does that make sense?

comment:4 Changed 10 years ago by nox@…

Sense, it makes a lot.

comment:5 in reply to:  3 Changed 10 years ago by seanasy@…

I'm not convinced that everyone will want expat support by default. It's not strictly required for GDAL. Not everyone needs XML processing that needs GDAL. It needs its own variant for sure. But, why should it be a default variant other than expat might already be installed?

comment:6 Changed 10 years ago by nox@…

It doesn't need its own variant. Variants should be used for things that the most users do not expect, and when the required dependencies are huge. That's MacPorts' policy.

comment:7 Changed 10 years ago by katzlbt@…

I agree with nox. The impact of compiling gdal with expat is probably minimal. However, it may save many users lots of time to research why ogr2ogr does not work as expected. GPX and KML conversions are really mainstream taks today.

comment:8 Changed 9 years ago by jmroot (Joshua Root)

Cc: jmr@… added

We need a final maintainer decision on this. An expat variant was added in r74124, but it is not on by default. If your decision is that this is the way it should be, we can close this as wontfix. Otherwise, we can add "default_variants +expat" and close as fixed.

comment:9 Changed 9 years ago by Veence (Vincent)

I think that enabling expat by default makes sense. If Sean does not answer next week, I'll do that.

comment:10 Changed 9 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

Maintainer replied by email:

A default variant makes sense. That's fine with me.

Done in r75952.

Note: See TracTickets for help on using tickets.