Hi Dane,
I finally got around to trying these out:
1) I'm pretty sure it's linking to proj. When I build, it outputs this line:
Checking for C library proj... (cached) yes
And later on,
g++ -o src/libmapnik.dylib -Wl,-install_name,libmapnik.dylib
-dynamiclib src/agg_renderer.os src/datasource_cache.os
src/envelope.os src/filter_factory.os src/font_engine_freetype.os
src/graphics.os src/image_reader.os src/image_util.os src/layer.os
src/line_pattern_symbolizer.os src/map.os src/load_map.os
src/memory.os src/params.os src/placement_finder.os src/plugin.os
src/png_reader.os src/point_symbolizer.os
src/polygon_pattern_symbolizer.os src/save_map.os
src/shield_symbolizer.os src/text_symbolizer.os src/tiff_reader.os
src/wkb.os src/projection.os src/proj_transform.os src/distance.os
src/scale_denominator.os src/memory_datasource.os src/stroke.os
src/symbolizer.os src/arrow.os src/unicode.os tinyxml/tinystr.os
tinyxml/tinyxml.os tinyxml/tinyxmlerror.os tinyxml/tinyxmlparser.os
-Lagg -Lsrc -L/opt/local/lib -lagg -lfreetype -lz -lm -lltdl -lpng
-ltiff -lz -ljpeg -lproj -liconv -lgdal -lboost_filesystem-mt
-lboost_regex-mt -lboost_iostreams-mt -lboost_program_options-mt
-lboost_thread-mt -liconv
so I think it's finding proj ok.
2) Here's what happens when I run rundemo.py
mapnik-0.5.0 > python demo/python/rundemo.py
Traceback (most recent call last):
File "demo/python/rundemo.py", line 33, in <module>
m = Map(800,600,"+proj=latlong +ellps=WGS84")
TypeError: __init__() should return None, not 'NoneType'
destroyed singleton
destroyed singleton
3) Compiling with the DEBUG flag didn't seem to reveal anything other
than these warnings:
g++ -o bindings/python/mapnik_image.os -c
-DBOOST_PROPERTY_TREE_XML_PARSER_TINYXML -DTIXML_USE_STL -ansi -Wall
-ftemplate-depth-100 -DDARWIN -DBOOST_SPIRIT_THREADSAFE
-DMAPNIK_THREADSAFE -O0 -fno-inline -g -DDEBUG -DMAPNIK_DEBUG -fPIC
-I/opt/local/include/python2.5 -Iagg/include -Itinyxml -Iinclude -I.
-I/opt/local/lib -I/opt/local/include -I/opt/local/include/freetype2
bindings/python/mapnik_image.cpp
In file included from /opt/local/include/jpeglib.h:24,
from include/mapnik/jpeg_io.hpp:27,
from bindings/python/mapnik_image.cpp:36:
/opt/local/include/jconfig.h:5:1: warning: "HAVE_PROTOTYPES" redefined
In file included from /opt/local/include/boost/python/detail/wrap_python.hpp:50,
from /opt/local/include/boost/python/detail/prefix.hpp:13,
from /opt/local/include/boost/python/args.hpp:8,
from /opt/local/include/boost/python.hpp:11,
from bindings/python/mapnik_image.cpp:30:
/opt/local/include/python2.5/pyconfig.h:389:1: warning: this is the
location of the previous definition
In file included from /opt/local/include/jpeglib.h:24,
from include/mapnik/jpeg_io.hpp:27,
from bindings/python/mapnik_image.cpp:36:
/opt/local/include/jconfig.h:12:1: warning: "HAVE_STDLIB_H" redefined
In file included from /opt/local/include/boost/python/detail/wrap_python.hpp:50,
from /opt/local/include/boost/python/detail/prefix.hpp:13,
from /opt/local/include/boost/python/args.hpp:8,
from /opt/local/include/boost/python.hpp:11,
from bindings/python/mapnik_image.cpp:30:
/opt/local/include/python2.5/pyconfig.h:519:1: warning: this is the
location of the previous definition
g++ -o bindings/python/mapnik_image_view.os -c
-DBOOST_PROPERTY_TREE_XML_PARSER_TINYXML -DTIXML_USE_STL -ansi -Wall
-ftemplate-depth-100 -DDARWIN -DBOOST_SPIRIT_THREADSAFE
-DMAPNIK_THREADSAFE -O0 -fno-inline -g -DDEBUG -DMAPNIK_DEBUG -fPIC
-I/opt/local/include/python2.5 -Iagg/include -Itinyxml -Iinclude -I.
-I/opt/local/lib -I/opt/local/include -I/opt/local/include/freetype2
bindings/python/mapnik_image_view.cpp
In file included from /opt/local/include/jpeglib.h:24,
from include/mapnik/jpeg_io.hpp:27,
from bindings/python/mapnik_image_view.cpp:32:
/opt/local/include/jconfig.h:5:1: warning: "HAVE_PROTOTYPES" redefined
In file included from /opt/local/include/boost/python/detail/wrap_python.hpp:50,
from /opt/local/include/boost/python/detail/prefix.hpp:13,
from /opt/local/include/boost/python/args.hpp:8,
from /opt/local/include/boost/python.hpp:11,
from bindings/python/mapnik_image_view.cpp:29:
/opt/local/include/python2.5/pyconfig.h:389:1: warning: this is the
location of the previous definition
In file included from /opt/local/include/jpeglib.h:24,
from include/mapnik/jpeg_io.hpp:27,
from bindings/python/mapnik_image_view.cpp:32:
/opt/local/include/jconfig.h:12:1: warning: "HAVE_STDLIB_H" redefined
In file included from /opt/local/include/boost/python/detail/wrap_python.hpp:50,
from /opt/local/include/boost/python/detail/prefix.hpp:13,
from /opt/local/include/boost/python/args.hpp:8,
from /opt/local/include/boost/python.hpp:11,
from bindings/python/mapnik_image_view.cpp:29:
Thanks again for the replies. Can anyone explain to me what this
"NoneType" error generally means? I assume that at some point in the
process, some Python script was expecting one of the C libraries to
return something like a Python None object, but instead received the
NoneType class . Any idea why that might happen?
-Ken-ichi
On Fri, Feb 29, 2008 at 4:52 PM, Dane Springmeyer <[EMAIL PROTECTED]> wrote:
> Ken,
>
> I don't know about the gmake issue.
>
> Two more ideas:
>
> 1)Confirm proj installed correctly: type proj in a terminal and make
> sure mapnik links to it in the build
>
> 2)Just try running the rendemo.py and see what the output says
>
> 3) recompile with python scons/scons.py DEBUG=y and see if that gives
> any more output..
>
>
> cheers,
>
> dane
>
>
>
>
> On Feb 29, 2008, at 12:08 PM, Ken-ichi wrote:
>
> > Yeah, I had run into the same thing initially, but I do have the
> > +python25 variant installed. However, just to be sure, I followed
> > your advice and did a clean install (adding icu). Here's what I have
> > now:
> >
> > port installed |grep boost
> > boost @1.34.1_2+icu+python25 (active)
> > boost-jam @3.1.16_0 (active)
> >
> > So I went back and cleaned my mapnik source dir, re-built and
> > reinstalled, but I still get the same errors:
> >
> >>>> from mapnik import *
> >>>> p = Projection("+init=epsg:3309")
> > Traceback (most recent call last):
> > File "<stdin>", line 1, in <module>
> > TypeError: __init__() should return None, not 'NoneType'
> >
> >
> > One minor difference between what you listed and what happens on my
> > system is that my copy of MacPorts doesn't list gmake as a dependency
> > of boost (I don't have gmake installed through MacPorts), though that
> > might be a tiger/leopard difference.
> >
> > -Ken-ichi
> >
> >
> > On Fri, Feb 29, 2008 at 10:54 AM, Dane Springmeyer
> > <[EMAIL PROTECTED]> wrote:
> >> Ken,
> >>
> >> When you installed boost from macports did you specify the python
> >> variant?
> >>
> >> I missed this at first, and I found it is needed on leopard at least.
> >> So, you may benefit from uninstalling, cleaning, and reinstalling
> >> boost with variant python25 (and if you are installing from svn then
> >> icu as well)
> >>
> >> Try typing:
> >> $port info boost
> >>
> >> and you should get:
> >> ----
> >>
> >> boost 1.34.1, Revision 2, devel/boost (Variants: universal, darwin_9,
> >> darwin, python24, python25, icu)
> >> http://www.boost.org
> >>
> >> Boost provides free portable peer-reviewed C++ libraries. The
> >> emphasis
> >> is on portable libraries which work well with the C++ Standard
> >> Library.
> >>
> >> Build Dependencies: boost-jam, gmake
> >> Platforms: darwin
> >> Maintainers: [EMAIL PROTECTED]
> >>
> >> ---
> >>
> >> then:
> >> sudo port uninstall boost-jam boost
> >> sudo port clean boost-jam boost
> >> sudo port install boost-jam
> >> sudo port install -v boost +python25 +icu
> >>
> >>
> >> Cheers,
> >>
> >> Dane
> >>
> >>
> >>
> >>
> >> On Feb 29, 2008, at 9:42 AM, Ken-ichi wrote:
> >>
> >>> Thanks for the reply, Artem. Here's what happened when I ran the
> >>> commands you recommended in the regular Python interactive
> >>> interpreter:
> >>>
> >>>>>> from mapnik import *
> >>>>>>
> >>>>>> p = Projection("+init=epsg:3309")
> >>> Traceback (most recent call last):
> >>> File "<stdin>", line 1, in <module>
> >>> TypeError: __init__() should return None, not 'NoneType'
> >>>>>> p.forward(Coord(-1.25,51.75))
> >>> Traceback (most recent call last):
> >>> File "<stdin>", line 1, in <module>
> >>> NameError: name 'p' is not defined
> >>>>>> m = Map(600,300,"+proj=latlong +datum=WGS84")
> >>> Traceback (most recent call last):
> >>> File "<stdin>", line 1, in <module>
> >>> TypeError: __init__() should return None, not 'NoneType'
> >>>
> >>>
> >>> Also, I'm not sure if it makes any difference, but I installed boost
> >>> and all the other dependencies with MacPorts. Also, here's my gcc
> >>> version info:
> >>>
> >>> Target: i686-apple-darwin8
> >>> Configured with: /private/var/tmp/gcc/gcc-5367.obj~1/src/configure
> >>> --disable-checking -enable-werror --prefix=/usr --mandir=/share/man
> >>> --enable-languages=c,objc,c++,obj-c++
> >>> --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
> >>> --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib
> >>> --build=powerpc-apple-darwin8 --with-arch=nocona --with-tune=generic
> >>> --program-prefix= --host=i686-apple-darwin8
> >>> --target=i686-apple-darwin8
> >>> Thread model: posix
> >>>
> >>> -Ken-ichi
> >>>
> >>>
> >>> On Fri, Feb 29, 2008 at 1:29 AM, Artem Pavlenko <[EMAIL PROTECTED]>
> >>> wrote:
> >>>>
> >>>>
> >>>>> Hi all,
> >>>>>
> >>>>> Just wanted to poke around with Mapnik 0.5 a bit, but I'm having
> >>>>> problems getting it set up under Max OS 10.4.11, Python 2.5.1, and
> >>>>> Boost 1.34.
> >>>>
> >>>> I'm using the same setup.
> >>>>
> >>>>
> >>>>> I run scons.py to build and again to install and
> >>>>> everything seems to run fine, all the files seem to end up in the
> >>>>> right places, but here's what happens when I try the Projection
> >>>>> examples in the installation instructions in iPython (replacing
> >>>>> the
> >>>>> EPSG code with something I actually had in my share/proj/epsg
> >>>>> file):
> >>>>>
> >>>>> In [1]: from mapnik import Projection
> >>>>>
> >>>>> In [2]: p = Projection(['init=epsg:3309'])
> >>>>
> >>>>
> >>>> The above has been deprecated.
> >>>>> ----------------------------------------------------------------------
> >>>>
> >>>>> -----
> >>>>> <class 'Boost.Python.ArgumentError'> Traceback (most recent
> >>>>> call last)
> >>>>>
> >>>>> /Users/kueda/<ipython console> in <module>()
> >>>>>
> >>>>> <class 'Boost.Python.ArgumentError'>: Python argument types in
> >>>>> Projection.__init__(Projection, list)
> >>>>> did not match C++ signature:
> >>>>> __init__(_object*)
> >>>>> __init__(_object*, std::string)
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>
> >>>>>
> >>>>> So that looked like it was expecting a string and not a list, so I
> >>>>> tried this:
> >>>>>
> >>>>> In [3]: p = Projection('init=epsg:3309')
> >>>>> ----------------------------------------------------------------------
> >>>>> -----
> >>>>> <type 'exceptions.RuntimeError'> Traceback (most recent
> >>>>> call last)
> >>>>>
> >>>>> /opt/local/src/mapnik-trunk/tests/<ipython console> in <module>()
> >>>>>
> >>>>> <type 'exceptions.RuntimeError'>: failed to initialize projection
> >>>>> with:init=epsg:3309
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>> Ok, try :
> >>>>
> >>>> from mapnik import *
> >>>>
> >>>> p = Projection("+init=epsg:3309")
> >>>> p.forward(Coord(-1.25,51.75))
> >>>>
> >>>> projections strings are in proj4_init_plus format.
> >>>>
> >>>>
> >>>>>
> >>>>> Any idea what's going on here? I also had trouble with the
> >>>>> GettingStarted tutorial:
> >>>>>
> >>>>> In [5]: from mapnik import *
> >>>>>
> >>>>> In [6]: m = Map(600,300,"+proj=latlong +datum=WGS84")
> >>>>> ----------------------------------------------------------------------
> >>>>> -----
> >>>>> <type 'exceptions.TypeError'> Traceback (most recent
> >>>>> call last)
> >>>>>
> >>>>> /Users/kueda/<ipython console> in <module>()
> >>>>>
> >>>>> <type 'exceptions.TypeError'>: __init__() should return None, not
> >>>>> 'NoneType'
> >>>>
> >>>> The above works for me. Could you try running the same not from
> >>>> iPython console ?
> >>>>
> >>>> Artem
> >>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> Any help would be appreciated, and apologies in advance if I'm
> >>>>> asking
> >>>>> a question that's already been answered a billion times (I sifted
> >>>>> through the list archives and didn't see anything).
> >>>>>
> >>>>>
> >>>>> -Ken-ichi
> >>>>> _______________________________________________
> >>>>> Mapnik-users mailing list
> >>>>> [email protected]
> >>>>> https://lists.berlios.de/mailman/listinfo/mapnik-users
> >>>>>
> >>>>
> >>>>
> >>> _______________________________________________
> >>> Mapnik-users mailing list
> >>> [email protected]
> >>> https://lists.berlios.de/mailman/listinfo/mapnik-users
> >>
> >>
>
>
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users