Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 239402 - sci-geosciences/mapnik-0.5.1 does not render correctly
Summary: sci-geosciences/mapnik-0.5.1 does not render correctly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Steve Arnold
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-03 08:16 UTC by kavol
Modified: 2008-11-08 03:17 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
gentoo.png (gentoo.png,167.10 KB, image/png)
2008-10-03 08:17 UTC, kavol
Details
fedora.png (fedora.png,334.79 KB, image/png)
2008-10-03 08:17 UTC, kavol
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kavol 2008-10-03 08:16:33 UTC
Hi.

I was trying to render some tiles from OpenStreetMap, but mapnik gets it wrong - see the attachment, one picture for thousand words. In the first place it is obvious that it does not get the fonts correctly, as there are empty rectangles in the place of some names.

Using the same dataset and the same database setup etc., I was able to get the map rendered correctly on a Fedora system. So that there is something rotten within Gentoo ... I'm no Python expert to debug :-/

Reproducible: Always

Steps to Reproduce:
1. Follow the instructions at http://wiki.openstreetmap.org/index.php/Mapnik to get a working setup. Get the dataset from http://kubajz.kbx.cz/junk/osm/czechia-latest.osm.bz2

2. Within the script generate_image.py, set the bounding box to:
ll = (15.7, 49.16, 16, 49.25)

3. Run generate_image.py

4. Use some GIMP magic to crop the image :-)

Actual Results:  
see the attachment gentoo.png

Expected Results:  
see the attachment fedora.png

# emerge --info
WARNING: repository at /root/portage is missing a repo_name entry
 * Overlay eclasses override eclasses from PORTDIR:
 *
 *   '/usr/portage/local/layman/kde-testing/eclass/kde4-base.eclass'
 *   '/usr/portage/local/layman/kde-testing/eclass/kde4-functions.eclass'
 *   '/usr/portage/local/layman/kde-testing/eclass/kde4-meta.eclass'
 *
 * It is best to avoid overriding eclasses from PORTDIR because it will
 * trigger invalidation of cached ebuild metadata that is distributed with
 * the portage tree. If you must override eclasses from PORTDIR then you
 * are advised to add FEATURES="metadata-transfer" to /etc/make.conf and to
 * run `emerge --regen` after each time that you run `emerge --sync`. Set
 * PORTAGE_ECLASS_WARNING_ENABLE="0" in /etc/make.conf if you would like to
 * disable this warning.
Portage 2.2_rc11 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r7 x86_64)
=================================================================
System uname: Linux-2.6.25-gentoo-r7-x86_64-AMD_Athlon-tm-_64_Processor_3000+-with-glibc2.2.5
Timestamp of tree: Fri, 03 Oct 2008 01:36:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r7
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/env /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.0/env /usr/kde/4.0/share/config /usr/kde/4.0/shutdown /usr/share/config /usr/shutdown /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=k8 -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache collision-protect distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="cs_CZ.UTF-8"
LC_ALL="cs_CZ.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="cs"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/kde-testing /root/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext PP1300W X a52 aac accessibility acpi aiglx alsa amd64 amr amrnb amrwb aotuv apache2 asf audiofile avi berkdb bluetooth branding bzip2 cairo calendar cddb cdparanoia cdr cli cracklib crypt css cups dbus dga divx4linux doc dri dv dvd dvdr dvdread emboss encode evo exif fam ffmpeg flac font-server fortran ftp gdbm geoip geos gif gimp gphoto2 gpm gs hal hdri iconv ieee1394 imdb imlib ipv6 irmc isdnlog java javascript jingle jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility kdexdeltas lame lcms ldap libnotify libsamplerate logrotate mad midi mikmod mjpeg mmx mmxext modplug mp3 mp4 mpeg mplayer mudflap multilib ncurses nls nodrm nptl nptlonly nsplugin nvidia ogg opengl openmp pam pcre pda pdf perl png ppds pppd proj python qt3 qt3support qt4 quicktime readline reflection reiserfs rtc scanner scenarios sdl session slang sndfile sound sox spell spl sse sse2 ssl startup-notification subversion svg symlink sysfs tcpd tetex theora threads tiff timidity truetype unicode usb v4l v4l2 vcd vorbis wma x264 xcomposite xface xine xml xorg xv xvid xvmc yaz zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="cs" USERLAND="GNU" VIDEO_CARDS="nouveau nvidia nv vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


note that I have set USE postgres for mapnik and a few related tools via package.use
Comment 1 kavol 2008-10-03 08:17:26 UTC
Created attachment 167061 [details]
gentoo.png

the wrong rendering
Comment 2 kavol 2008-10-03 08:17:59 UTC
Created attachment 167063 [details]
fedora.png

the correct rendering
Comment 3 Steve Arnold archtester gentoo-dev 2008-11-02 02:37:00 UTC
Okay, if you wait a bit and sync again, there's an updated version you can try.  I had to switch the postgresql dep to get the plugin to build, so give this one a try and see what it does for you...
Comment 4 kavol 2008-11-02 21:57:01 UTC
(In reply to comment #3)
> Okay, if you wait a bit and sync again, there's an updated version you can try.
>  I had to switch the postgresql dep to get the plugin to build, so give this
> one a try and see what it does for you...

unfortunately, I've got some troubles resolving postgresql package conflicts, but as for mapnik itself, there is one problem:

$ ./generate_image.py
Traceback (most recent call last):
  File "./generate_image.py", line 16, in <module>
    from mapnik import *
  File "/usr/lib64/python2.5/site-packages/mapnik/__init__.py", line 32, in <module>
    from paths import inputpluginspath, fontscollectionpath
  File "/usr/lib64/python2.5/site-packages/mapnik/paths.py", line 4
    fontscollectionpath = /usr/share/fonts/dejavu/
                          ^
SyntaxError: invalid syntax


... simply adding quotation marks around the path helps

I'll report back as I get that damn database installed correctly again (hints appreciated ...)
Comment 5 kavol 2008-11-03 14:03:02 UTC
so after unmasking the right postgresql packages, deleting --force-silent form the initscript to find out I have to modify the shm limit etc., finally I managed to render something with mapnik, and it works as expected

=> this appears to be fixed, thanks a lot!

(not closing the bugreport for now, as the problem mentioned in comment #4 does not seem to be fixed yet)
Comment 6 Steve Arnold archtester gentoo-dev 2008-11-08 03:17:47 UTC
Sorry about that...  The sed invocation that modifies the font path inadvertently omitted the single quotes.  Should work fine now...