Bug#538862: missing dependency

2009-07-27 Thread Dane Springmeyer

Andreas,

Nice job hunting this down. I'd been seeing it as well upstream (http://trac.mapnik.org/ticket/392 
) but had not taken the time to debug.


I agree that #2 is critical - that we avoid crashes if pycairo python  
module is unavailable at import time even if mapnik was compiled with  
pycairo support.


Dane


On Jul 27, 2009, at 8:13 AM, Andreas Barth wrote:


Package: python-mapnik
Version: 0.6.0-1
Severity: serious
Tags: patch

Hi,

after installation of python-mapnik I tried to generate images, but I
got segmentation faults.

After some debugging (thanks, Steve) we found that the culprit is that
Pycairo_CAPI is null. This should be set by Pycairo_IMPORT. Howver,
looking at the code of PyCObject_Import this function returns null if
the requested python library is not there.


So, there are two possibilities to resolve this issue:

1. Add an dependency to python-cairo to the package.

2. Add an error message to the initalization function in case the
function returns null.


I think best both should be done.



Cheers,
Andi








--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#538862: missing dependency

2009-07-27 Thread Dane Springmeyer

It looks like this change against Mapnik trunk solves the issue:


Index: bindings/python/python_cairo.cpp
===
--- bindings/python/python_cairo.cpp(revision 1277)
+++ bindings/python/python_cairo.cpp(working copy)
@@ -57,6 +57,8 @@
 void register_cairo()
 {
Pycairo_IMPORT;
+
+   if (Pycairo_CAPI == NULL) return;

boost::python::converter::registry::insert(&extract_surface,  
boost::python::type_id());
boost::python::converter::registry::insert(&extract_context,  
boost::python::type_id());





--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#538862: missing dependency

2009-07-27 Thread Dane Springmeyer

It looks like this change against Mapnik trunk solves the issue:


Index: bindings/python/python_cairo.cpp
===
--- bindings/python/python_cairo.cpp(revision 1277)
+++ bindings/python/python_cairo.cpp(working copy)
@@ -57,6 +57,8 @@
void register_cairo()
{
   Pycairo_IMPORT;
+
+   if (Pycairo_CAPI == NULL) return;

   boost::python::converter::registry::insert(&extract_surface,  
boost::python::type_id());
   boost::python::converter::registry::insert(&extract_context,  
boost::python::type_id());




--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#538862: missing dependency

2009-07-29 Thread Dane Springmeyer

Andreas,

Yes, I can see the value behind issuing an error but the user would  
also run into an import error when they tried to do anything further  
requiring:


>>> import cairo

which would result in an ImportError exception. So I figured Mapnik  
just shouldn't crash and pycairo availability could be left to the user.


But, fine either way really.

I've also added in trunk a mapnik.has_pycairo() function to check for  
the availability of pycairo via mapnik. I plan to add hooks to use the  
cairomm/cairo functionality via mapnik python without the need for  
pycairo soon, so that function with balance the mapnik.has_cairo()  
usage.


Anyway, let me know if you have any more thoughts.

Dane




--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#624934: mapnik: FTBFS: src/datasource_cache.cpp:146:77: error: invalid initialization of reference of type 'const string&' from expression of type 'boost::filesystem3::path'

2011-05-02 Thread Dane Springmeyer
This is due to boost filesystem changing, and can be fixed with this patch:

http://trac.mapnik.org/changeset/2506/branches/0.7.2-dev

Dane


On May 2, 2011, at 5:35 AM, Lucas Nussbaum wrote:

> Source: mapnik
> Version: 0.7.1-3
> Severity: serious
> Tags: wheezy sid
> User: debian...@lists.debian.org
> Usertags: qa-ftbfs-20110502 qa-ftbfs
> Justification: FTBFS on amd64
> 
> Hi,
> 
> During a rebuild of all packages in sid, your package failed to build on
> amd64.
> 
> Relevant part:
>> g++ -o src/datasource_cache.os -c -DHAVE_LIBXML2 -DHAVE_CAIRO -DHAVE_PYCAIRO 
>> -ansi -Wall -pthread -ftemplate-depth-100 -DLINUX -DBOOST_SPIRIT_THREADSAFE 
>> -DMAPNIK_THREADSAFE -O2 -finline-functions -Wno-inline -DNDEBUG 
>> -DSHAPE_MEMORY_MAPPED_FILE -pthread -fPIC -Iagg/include -I. -Iinclude 
>> -I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2 
>> -I/usr/include/cairomm-1.0 -I/usr/lib/cairomm-1.0/include 
>> -I/usr/include/cairo -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include 
>> -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 
>> -I/usr/include/libpng12 -I/usr/include/postgresql -I/usr/include/gdal 
>> -I/usr/include/pycairo src/datasource_cache.cpp
>> src/datasource_cache.cpp: In static member function 'static void 
>> mapnik::datasource_cache::register_datasources(const string&)':
>> src/datasource_cache.cpp:146:77: error: invalid initialization of reference 
>> of type 'const string&' from expression of type 'boost::filesystem3::path'
>> src/datasource_cache.cpp:46:9: error: in passing argument 1 of 'bool 
>> mapnik::is_input_plugin(const string&)'
>> src/datasource_cache.cpp:152:53: error: 'class 
>> boost::filesystem3::directory_entry' has no member named 'string'
>> src/datasource_cache.cpp:167:78: error: 'class 
>> boost::filesystem3::directory_entry' has no member named 'string'
>> scons: *** [src/datasource_cache.os] Error 1
>> scons: building terminated because of errors.
>> scons: Reading SConscript files ...
>> 
>> Welcome to Mapnik...
>> 
>> Configuring build environment...
>> SCons CONFIG found: 'config.py', variables will be inherited...
>> INPUT_PLUGINS=gdal,kismet,ogr,osm,postgis,raster,shape,sqlite PREFIX=/usr 
>> DESTDIR=/build/user-mapnik_0.7.1-3-amd64-J5L_xo/mapnik-0.7.1/debian/tmp 
>> BOOST_INCLUDES=/usr/include BOOST_LIBS=/usr/lib PROJ_INCLUDES=/usr/include 
>> PROJ_LIBS=/usr/lib SYSTEM_FONTS=/usr/share/fonts/truetype/ttf-dejavu 
>> LIB_DIR_NAME=/mapnik/0.7 PYTHON=/usr/bin/python2.7 BINDINGS=all 
>> Configuring on Linux in *release mode*...
>> Checking for freetype-config... yes
>> Checking for xml2-config... yes
>> Checking for pkg-config... yes
>> Checking for cairomm-1.0... yes
>> Sorting lib and inc compiler paths by priority... 
>> internal,other,frameworks,user,system(cached) yes
>> Checking for C library m... yes
>> Checking for C library ltdl... yes
>> Checking for C library png... yes
>> Checking for C library tiff... yes
>> Checking for C library z... yes
>> Checking for C library jpeg... yes
>> Checking for C library proj... yes
>> Checking for C++ library icuuc... yes
>> Searching for boost libs and headers... (cached) 
>>  *libs found: /usr/lib
>>  *headers found: /usr/include
>>  *no lib naming extension found
>> Checking for Boost version >= 1.34... yes
>> Found boost lib version... 1_46_1
>> Checking for C++ library boost_system... yes
>> Checking for C++ library boost_filesystem... yes
>> Checking for C++ library boost_regex... yes
>> Checking for C++ library boost_iostreams... yes
>> Checking for C++ library boost_program_options... yes
>> Checking for C++ library boost_thread... yes
>> Checking for requested plugins dependencies...
>> Checking for C library sqlite3... yes
>> Checking for pg_config... yes
>> Checking if gdal is ogr enabled... yes
>> Checking for name of ogr library... gdal1.7.0
>> Checking for gdal-config --libs... yes
>> Checking for gdal-config --cflags... yes
>> Checking for name of gdal library... gdal1.7.0
>> Checking for C++ header file boost/python/detail/config.hpp... yes
>> Checking for pkg-config... yes
>> Checking for pycairo... yes
>> 
>> All Required dependencies found!
>> 
>> Overwriting and re-saving file 'config.py'...
>> Will hold custom path variables from commandline and python config 
>> file(s)...
>> Problem encounted with SCons scripts, please post bug report to: 
>> http://trac.mapnik.org
>> Error was: /bin/sh: svnversion: not found
>> 
>> Bindings Python version... 2.6
>> Python 2.6 prefix... /usr
>> Python bindings will install in... 
>> /build/user-mapnik_0.7.1-3-amd64-J5L_xo/mapnik-0.7.1/debian/tmp/usr/lib/python2.6/dist-packages
>> Sorting lib and inc compiler paths by priority... 
>> internal,other,frameworks,user,system(cached) yes
>> scons: done reading SConscript files.
>> scons: Building targets ...
>> g++ -o agg/src/agg_vpgen_segmentator.o -c -O2 -fPIC 

Bug#598652: [Fwd: Re: Bug#598652: python-mapnik: Misssing shared library libicuuc.so.42]

2010-10-01 Thread Dane Springmeyer

On Oct 1, 2010, at 12:52 PM, Peter Schaefer wrote:

>  Weitergeleitete Nachricht 
>> Von: Peter Schaefer 
>> Reply-to: peter.schae...@kettwieseltandem.de
>> An: Julien Cristau 
>> Kopie: 598...@bugs.debian.org, da...@debian.org
>> Betreff: Re: Bug#598652: python-mapnik: Misssing shared library
>> libicuuc.so.42
>> Datum: Fri, 01 Oct 2010 21:35:31 +0200
>> 
>> Am Freitag, den 01.10.2010, 19:53 +0200 schrieb Julien Cristau:
>> 
>> Hallo Julien
>>> Care to try again without the grep?
>>> 
>>  
>>  libmapnik.so.0.7 => /usr/local/lib/libmapnik.so.0.7
>> (0x7f88d4ed6000)
>> 
>> This may cause the problem, an old mapnik installation from source which was 
>> not removed before 
>> using the DEBIAN-version.  
> 
> Completely removing the old installation from /usr/local solved the
> Problem. All applications using mapnik are working again.
> 
> Thanks and Sorry, it was my mistake
> 

Hi Peter,

Sorry about the trouble. In Mapnik trunk I've added 'uninstall' ability to 
Mapnik's Scons scripts so cleaning out source installed files will be easier 
and hopefully this kind of issue can be more quickly avoided in the future.

- Dane


--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org