pymapnik2 issue

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

pymapnik2 issue

Eric Lemoine
Hi

I'm looking at installing mapnik2 using `easy_install mapnik2` or `pip
install mapnik2`. I've given it a try tonight, but failed. Here's what
I did:

Install some development packages for my Ubuntu distro:

$ sudo add-apt-repository ppa:mapnik/nightly-2.0
$ sudo apt-get update
$ sudo apt-get install mapnik-utils libboost-python1.42-dev libmapnik-dev

Create a virtualenv (I use virtualenvwrapper):

$ mkvirtualenv --no-site-packages --distribute mapnik2

And install mapnik2 in the virtualenv:

(mapnik2)$ easy_install mapnik2

This gives me:

Exception: Cant find boost_python lib!

This is because pymapnik2's setup.py script looks for
libboost_python.so, which does not exist for me. To fix that I've used
this:

$ sudo ln -sf /usr/lib/libboost_python-py26.so.1.42.0
/usr/lib/libboost_python.so

I don't like it, but this has allowed me to go a bit further.

The next error - the one that's actually blocking me - is a compilation error:

cpp/mapnik_text_symbolizer.cpp: In function ‘void export_text_symbolizer()’:
cpp/mapnik_text_symbolizer.cpp:171: error: ‘TOP’ was not declared in this scope
cpp/mapnik_text_symbolizer.cpp:172: error: ‘MIDDLE’ was not declared
in this scope
cpp/mapnik_text_symbolizer.cpp:173: error: ‘BOTTOM’ was not declared
in this scope
error: Setup script exited with error: command 'gcc' failed with exit status 1

Altough not sure, I think I get this error because of a mismatch
between the mapnik header files (installed by  libmapnik-dev package)
and the mapnik cpp source code included in the Python package. The
Python package is mapnik2-2.0-r2615.tar.gz from
http://pypi.python.org/packages/source/m/mapnik2/, which I'm not sure
what it is exactly.

Is there any know solution to my problem? Are there other people
installing, or trying to install, mapnik2 using
easy_install/pip/disutils? I'd appreciate any insight or
recommendation.

Thank you.

--
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : [hidden email]
http://www.camptocamp.com
_______________________________________________
Mapnik-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/mapnik-users
Reply | Threaded
Open this post in threaded view
|

Re: pymapnik2 issue

ThomasG
Hello,

You will maybe get some clues from my tests on your case (as an end user: I'm not able to debug C++ )

Following what you've done, I've done another tests with
pip install http://pypi.python.org/packages/source/m/mapnik2/mapnik2-0.7-r2615.tar.gz
and
easy_install http://pypi.python.org/packages/source/m/mapnik2/mapnik2-0.7-r2615.tar.gz
both we're run in the venv

Infortunately like you, I've encountered the same error message at the end.
My supposition that you met a problem due to difference beetween 2.2.x series and the 2.0.x series (because you're using ppa:mapnik/nightly-2.0) seems wrong.

Moreover, I've done the same 2 tests but outside the venv (not a clean practice ;) ) and I've got the same error message too.

So I supposed now that the problem is coming from the build-in difference beetween mapnik 2.0.1 and 2.0.7 (you can do same tests I've done to confirm I you want) and not from the venv.

Regards

ThomasG

_______________________________________________
Mapnik-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/mapnik-users
Reply | Threaded
Open this post in threaded view
|

Re: pymapnik2 issue

Eric Lemoine


On Sunday, April 29, 2012, Thomas Gratier wrote:
Hello,

Hi Thomas
 

You will maybe get some clues from my tests on your case (as an end user: I'm not able to debug C++ )

Following what you've done, I've done another tests with
pip install http://pypi.python.org/packages/source/m/mapnik2/mapnik2-0.7-r2615.tar.gz
and
easy_install http://pypi.python.org/packages/source/m/mapnik2/mapnik2-0.7-r2615.tar.gz
both we're run in the venv

Infortunately like you, I've encountered the same error message at the end.


Yeah, there's no reason that pip can do better here.

 
My supposition that you met a problem due to difference beetween 2.2.x series and the 2.0.x series (because you're using ppa:mapnik/nightly-2.0) seems wrong.

Indeed.

 

Moreover, I've done the same 2 tests but outside the venv (not a clean practice ;) ) and I've got the same error message too.


Yes, no surprise here.


Thank you.


--
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : [hidden email]
http://www.camptocamp.com


_______________________________________________
Mapnik-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/mapnik-users
Reply | Threaded
Open this post in threaded view
|

Re: pymapnik2 issue

kiorky
In reply to this post by Eric Lemoine
Le 28/04/2012 23:56, Eric Lemoine a écrit :

> Hi
>
> I'm looking at installing mapnik2 using `easy_install mapnik2` or `pip
> install mapnik2`. I've given it a try tonight, but failed. Here's what
> I did:
>
> Install some development packages for my Ubuntu distro:
>
> $ sudo add-apt-repository ppa:mapnik/nightly-2.0
> $ sudo apt-get update
> $ sudo apt-get install mapnik-utils libboost-python1.42-dev libmapnik-dev
>
> Create a virtualenv (I use virtualenvwrapper):
>
> $ mkvirtualenv --no-site-packages --distribute mapnik2
>
> And install mapnik2 in the virtualenv:
>
> (mapnik2)$ easy_install mapnik2
>
> This gives me:
>
> Exception: Cant find boost_python lib!
>
> This is because pymapnik2's setup.py script looks for
> libboost_python.so, which does not exist for me. To fix that I've used
> this:
>
> $ sudo ln -sf /usr/lib/libboost_python-py26.so.1.42.0
> /usr/lib/libboost_python.so
>
> I don't like it, but this has allowed me to go a bit further.
>
> The next error - the one that's actually blocking me - is a compilation error:
>
> cpp/mapnik_text_symbolizer.cpp: In function ‘void export_text_symbolizer()’:
> cpp/mapnik_text_symbolizer.cpp:171: error: ‘TOP’ was not declared in this scope
> cpp/mapnik_text_symbolizer.cpp:172: error: ‘MIDDLE’ was not declared
> in this scope
> cpp/mapnik_text_symbolizer.cpp:173: error: ‘BOTTOM’ was not declared
> in this scope
> error: Setup script exited with error: command 'gcc' failed with exit status 1
>
> Altough not sure, I think I get this error because of a mismatch
> between the mapnik header files (installed by  libmapnik-dev package)
> and the mapnik cpp source code included in the Python package. The
> Python package is mapnik2-2.0-r2615.tar.gz from
> http://pypi.python.org/packages/source/m/mapnik2/, which I'm not sure
> what it is exactly.
>
> Is there any know solution to my problem? Are there other people
> installing, or trying to install, mapnik2 using
> easy_install/pip/disutils? I'd appreciate any insight or
> recommendation.

I do using minitage + buildout (distribute under the hood).
>
> Thank you.
>
You need to build current pymapnik2 against the 2.0 release (2.0.0).

I'll try in the WE to make a release of pymapnik2 building upon 2.0.1


--
Cordialement,
kiorky

_______________________________________________
Mapnik-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/mapnik-users