Bug 732148 - viewer looking in the wrong place for plugins
Summary: viewer looking in the wrong place for plugins
Alias: None
Product: Fedora
Classification: Fedora
Component: mapnik
Version: 14
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Alex Lancaster
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2011-08-20 01:53 UTC by ajs
Modified: 2011-12-28 21:01 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-12-28 21:01:47 UTC

Attachments (Terms of Use)

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:

Steps to Reproduce:
1. viewer <some mapnik XML file>.xml
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";


  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.

Note You need to log in before you can comment on or make changes to this bug.