Opened 17 years ago
Last modified 16 years ago
#136 closed defect (fixed)
compiling wrappers fails on 64bit-platforms
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | major | Milestone: | |
Component: | SWIG | Version: | 3.0.0 |
Severity: | Significant | Keywords: | imported, phpbugtracker |
Cc: |
Description (last modified by )
While compiling geos with enabled python-wrappers on an EM64T or AMD64 architecture, I get the following error:
geos_wrap.cxx: In function 'void checkCoordSeqBounds(GEOSCoordSequence*, size_t)': geos_wrap.cxx:3003: error: cannot convert 'size_t*' to 'unsigned int*' for argument '2' to 'int GEOSCoordSeq_getSize(const GEOSCoordSequence*, unsigned int*)' geos_wrap.cxx: In function 'int GeosCoordinateSequence_getSize(GeosCoordinateSequence*)': geos_wrap.cxx:3074: error: cannot convert 'size_t*' to 'unsigned int*' for argument '2' to 'int GEOSCoordSeq_getSize(const GEOSCoordSequence*, unsigned int*)' geos_wrap.cxx: In function 'int GeosCoordinateSequence_getDimensions(GeosCoordinateSequence*)': geos_wrap.cxx:3080: error: cannot convert 'size_t*' to 'unsigned int*' for argument '2' to 'int GEOSCoordSeq_getDimensions(const GEOSCoordSequence*, unsigned int*)' geos_wrap.cxx: In function 'PyObject* _wrap_geomFromWKB(PyObject*, PyObject*)': geos_wrap.cxx:8081: warning: dereferencing type-punned pointer will break strict-aliasing rules geos_wrap.cxx: In function 'PyObject* _wrap_geomFromHEX(PyObject*, PyObject*)': geos_wrap.cxx:8201: warning: dereferencing type-punned pointer will break strict-aliasing rules
Since it works perfectly on x86, I assume that the size of unsigned int and size_t is different on 64bit-platforms.
Attachments (1)
Change History (4)
by , 17 years ago
Attachment: | geos-3.0.0_rc3-amd64.patch added |
---|
comment:1 by , 17 years ago
The attached patch fixes the issue by replacing "size_t size" with "unsigned int". To avoid signed/unsigned conversion at this point, I changed the return values of the functions as well. Btw: Two of the python-regression-tests fail because of hasZ() evaluating to false instead to true. Probably unrelated to this error. Do you want to file another bug-report?
comment:2 by , 17 years ago
Resolution: | none → fixed |
---|
comment:3 by , 16 years ago
Description: | modified (diff) |
---|---|
Milestone: | imported |
Priority: | 3 → major |
Severity: | Unassigned → Significant |
Note:
See TracTickets
for help on using tickets.
This patch fixes the issue.