[postgis-tickets] [PostGIS] #2396: liblwgeom CUnit tests fail on big-endian architectures.
PostGIS
trac at osgeo.org
Thu Aug 1 08:03:41 PDT 2013
#2396: liblwgeom CUnit tests fail on big-endian architectures.
---------------------+------------------------------------------------------
Reporter: mnencia | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.1.0
Component: postgis | Version: 2.0.x
Keywords: |
---------------------+------------------------------------------------------
Comment(by robe):
Okay I'm guess the problem might be the default output on endian is
different and the cunit is taking the default behavior.
For example try this:
{{{
WITH outs As (SELECT 'exp'::text As type,
'0103000000010000000500000000917E9BA468294100917E9B8AEA2841C976BE1FA4682941C976BE9F8AEA2841B39ABE1FA46829415ACCC29F8AEA284137894120A4682941C976BE9F8AEA284100917E9BA468294100917E9B8AEA2841'::geometry
As geom
UNION ALL
SELECT 'obt'::text As
type,'00000000030000000100000005412968A49B7E91004128EA8A9B7E9100412968A41FBE76C94128EA8A9FBE76C9412968A41FBE9AB34128EA8A9FC2CC5A412968A4204189374128EA8A9FBE76C9412968A49B7E91004128EA8A9B7E9100'::geometry
As geom)
SELECT a.type, ST_Equals(a.geom, b.geom) As is_equal
, ST_OrderingEquals(a.geom, b.geom) As is_ord_equal , ST_Ndims(a.geom)
, ST_AsEWKB(a.geom, 'NDR') = ST_AsEWKB(a.geom, 'XDR') As xdr_geom
FROM outs As a INNER JOIN outs As b ON (a.type != b.type);
}}}
I think the only solution is to change the cunit test to be explicit about
endianess and not leave it up to the OS.
pramsey (Paul) -- what is you take on this issue?
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2396#comment:4>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list