artemp/trac2github — Issue #104: strange 64 bit problem ?
Author: artemp
Created: 2011-10-09 20:13:26+00:00
State: open
Labels: Shapefile_Input_Driver

Running any tests which implicitly calls the shape.input driver, return errors and fails, it doesn't matter I call Shapefile() in python API or i use c++ API (tryed provided rundemo.cpp / rundemo.py samples), it happen on Fedora 9, x86_64 arch:

Test on python API:
-----------------------------------------------------
# python rundemo.py
wrong file code
DEBUG 00002f00 /nTraceback (most recent call last):
File "rundemo.py", line 59, in
provpoly_lyr.datasource = Shapefile(file='../data/boundaries', encoding='latin1')
File "/usr/lib64/python2.5/site-packages/mapnik/__init__.py", line 72, in Shapefile
return CreateDatasource(keywords)
RuntimeError: wrong file code
-----------------------------------------------------------------
Test on C++ API:
# ./rundemo ../data/
running demo ...
wrong file code
DEBUG 00002f00 /n### std::exception: wrong file code
-------------------------------------------------------------------

I've used for debug the attached patch.
Obviously something else than value 9994 is returned.

I've used these packages:
http://openrisc.rdsor.ro/mapnik.spec
http://openrisc.rdsor.ro/mapnik-0.5.1-3.fc9.src.rpm

USed following, with some fedora specific compile flags, but olso tryed without fedora compile flags (simply commented out $RPM_OPT_FLAGS).

//cristian.