Bug 732148

Summary: viewer looking in the wrong place for plugins
Product: [Fedora] Fedora Reporter: ajs <ajsfedora>
Component: mapnikAssignee: Alex Lancaster <alex>
Status: CLOSED DEFERRED QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: alex, cristian.balint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-28 21:01:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description ajs 2011-08-20 01:53:15 UTC
Description of problem:
the viewer application in mapnik-utils is looking in the wrong place for plugins.  It should be looking in '/usr/lib64/mapnik/input/' (on a 64-bit Fedora) but is rather looking in '/opt/mapnik/lib/mapnik/input/'

Version-Release number of selected component (if applicable):
ver 0.7.1 
rel 6.fc14

How reproducible:
always

Steps to Reproduce:
1. viewer <some mapnik XML file>.xml
2.
3.
  
Actual results:
$ viewer nm_gmu.xml
loading nm_gmu.xml
Could not create datasource. No plugin found for type 'shape' (encountered during parsing of layer 'World')

Expected results:
successful load my mapnik map

Additional info:
$ strace viewer nm_gmu.xml 2>&1 | egrep mapnik/input
stat("/opt/mapnik/lib/mapnik/input", 0x7fffdc405c20) = -1 ENOENT (No such file or directory)

A quick hack fix is as follows
1) mkdir -p /opt/mapnik/lib
2) ln -ns ln -ns /usr/lib64/mapnik /opt/mapnik/lib

Comment 1 ajs 2011-08-20 02:10:49 UTC
It looks like line #42 (http://trac.mapnik.org/browser/tags/release-0.7.1/demo/viewer/main.cpp#L42)  should be either

  std::string mapnik_dir = "/usr/lib";

or

  std::string mapnik_dir = "/usr/lib64";

depending on architecture

and line 44 (http://trac.mapnik.org/browser/tags/release-0.7.1/demo/viewer/main.cpp#L44) should be

datasource_cache::instance()->register_datasources(mapnik_dir + "/mapnik/input");

Comment 2 Alex Lancaster 2011-11-22 20:48:41 UTC
I'm about to update to 0.7.2.  It might be fixed there, if not, I'll try to roll a patch.  I'm considering updating to 2.0.0, at least for rawhide/f17.  The only issue is that gpsdrive hasn't yet been ported to the mapnik 2 API.

Comment 3 Alex Lancaster 2011-12-28 21:01:47 UTC
I have updated to 2.0.0 in rawhide, and will probably switch to that in f16, f15 later.  Now that f14 is EOL, it's not going to get fixed here, closing.  If this is still an issue in f15+, feel free to re-open.