Thanks for the pointer.

But I checked the architecture of the liblwgeom.so with 'file' and the
result is:
/usr/local/pgsql_saved_0804141532/lib/liblwgeom.so: Mach-O bundle i386

which is the correct architecture for my Intel based macbook pro.

I am lost.





On Feb 26, 1:25 pm, Graham Dumpleton <[email protected]>
wrote:
> On Feb 26, 10:07 pm, omat <[email protected]> wrote:
>
>
>
> > Hi all,
>
> > Following the instructions on inhttp://geodjango.org/docs/install.html,
> > i managed to get to "Creating a Spatial Database Template" section.
>
> > But when trying to execute the line below (as postgres user of
> > course):
> > $ psql -d template_postgis -f `pg_config --sharedir`/lwpostgis.sql
>
> > it complained that it cannot find "liblwgeom".
>
> > I found the lwpostgis.sql under directory:
> > /usr/local/pgsql_saved_0804141532/share/
> > which does not look very right. I examined the file and it has:
> > ...
> > CREATE OR REPLACE FUNCTION histogram2d_in(cstring)
> >         RETURNS histogram2d
> >         AS '$libdir/liblwgeom', 'lwhistogram2d_in'
> >         LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
> > ...
>
> > $libdir shell variable is ''. I located the liblwgeom.so which is
> > refered in the sql file here:
> > /usr/local/pgsql_saved_0804141532/lib/liblwgeom.so
>
> > When I tried to run the sql command above on the template_postgis db,
> > fixing the paths manually, I get:
>
> > ERROR:  could not load library "/usr/local/pgsql_saved_0804141532/lib/
> > liblwgeom.so": dlopen(/usr/local/pgsql_saved_0804141532/lib/
> > liblwgeom.so, 10): no suitable image found.  Did find:
> >         /usr/local/pgsql_saved_0804141532/lib/liblwgeom.so: mach-o, but 
> > wrong
> > architecture
>
> > Can it be that a conflicting version already existed and caused
> > problems? Or what?
>
> > I took the "build from source" path as instructed in the install
> > documentation. I am using PostgreSQL 8.2 / PostGIS 1.3.5 on Mac OS X
> > Leopard (10.5.6)
>
> Read:
>
>  http://code.google.com/p/modwsgi/wiki/InstallationOnMacOSX
>
> Various sections in this cover aspects of this problem which would be
> relevant, even if you aren't using mod_wsgi.
>
> It is all because MacOS X can run on different architectures. That is,
> PPC and Intel, plus 32 bit and 64 bit variants of same. Your library
> doesn't have required architecture for what application that is using
> it is running as.
>
> Use 'file' command on the library to work out what architectures it
> does provide. You then need to recompile stuff so it also includes
> other architectures that may be required.
>
> There are some pointers in that document about how to compile for all
> architectures.
>
> Graham
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to