Basically, you've got a mixing of osm2pgsql dependencies which are causing 
problems. Macports stuff are not built FAT (aka 32 and 64 bit), and to get this 
to work you would have had to to pass +universal to all your port install 
commands.

I bet if you uninstall/remove macports you'll be all set. If that is not an 
option (understandable), then you'll need to make sure that /usr/lib and 
Library/Frameworks/${proj or geos}.framework/unix/lib come first on your linker 
lines to avoid the macports trap.

Also your PATH below looks wrong, try:

> export PATH="/usr/local/pgsql/bin/:$PATH"

Try  this (untested):

./autogen.sh
PATH=/Library/Frameworks/GEOS.framework/unix/bin/:/usr/local/pgsql/bin/$PATH \
CFLAGS="-I/usr/include -I/Library/Frameworks/PROJ.framework/unix/include" \
LDFLAGS="-L/usr/lib -L/Library/Frameworks/PROJ.framework/unix/lib/" \
./configure && make

btw, I've been using homebrew to build osm2pgsql:  
http://mxcl.github.com/homebrew/

Dane

On Aug 4, 2010, at 1:17 PM, Christopher Stevens wrote:

> Hello gurus, 
> While getting far into the installation process, I'm hung up when running the 
> make command for osm2pgsql on Mac OS X10.6. My initial guess is that I have a 
> library somewhere that's not being found or is not installed. I have no idea 
> where to start. Here are the commands I'm running in terminal. All are great 
> until make:
> 
> ==================
> svn co http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/
> 
> cd osm2pgsql
> 
> ./autogen.sh
> 
> ./configure
> 
> #(I was running into other errors before adding the following where pg_config 
> command could not be found)
> export PATH="/usr/local/pgsql/bin/pg_config:$PATH"
> 
> PATH=$PATH:/Library/Frameworks/GEOS.framework/unix/bin/     
> CFLAGS="-I/Library/Frameworks/PROJ.framework/unix/include"     
> LDFLAGS="-L/Library/Frameworks/PROJ.framework/unix/lib/"     make
> ==================
> 
> That last bit (with or without the extra flags and such) prints out a whole 
> bunch of lines, ending with:
> 
> ==================
> ...
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> make: *** [osm2pgsql] Error 1
> ==================
> 
> Other lines of interest:
> ==================
> ...
> ld: warning: in /opt/local/lib/libxml2.dylib, file is not of required 
> architecture
> ld: warning: in /opt/local/lib/libz.dylib, file is not of required 
> architecture
> ld: warning: in /opt/local/lib/libiconv.dylib, file is not of required 
> architecture
> ld: warning: in /opt/local/lib/libgeos.dylib, file is not of required 
> architecture
> ld: warning: in /opt/local/lib/libbz2.dylib, file is not of required 
> architecture
> Undefined symbols:
>   "___cxa_call_unexpected", referenced from:
>       
> std::auto_ptr<geos::geom::Geometry>::operator=(std::auto_ptr_ref<geos::geom::Geometry>)in
>  build_geometry.o
>       
> std::auto_ptr<geos::geom::CoordinateSequence>::operator=(std::auto_ptr_ref<geos::geom::CoordinateSequence>)in
>  build_geometry.o
>   "std::basic_string<char, std::char_traits<char>, std::allocator<char> 
> >::basic_string(std::basic_string<char, std::char_traits<char>, 
> std::allocator<char> > const&)", referenced from:
>       __gnu_cxx::new_allocator<std::basic_string<char, 
> std::char_traits<char>, std::allocator<char> > 
> >::construct(std::basic_string<char, std::char_traits<char>, 
> std::allocator<char> >*, std::basic_string<char, std::char_traits<char>, 
> std::allocator<char> > const&)in build_geometry.o
>       void std::_Construct<std::basic_string<char, std::char_traits<char>, 
> std::allocator<char> >, std::basic_string<char, std::char_traits<char>, 
> std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, 
> std::allocator<char> >*, std::basic_string<char, std::char_traits<char>, 
> std::allocator<char> > const&)in build_geometry.o
>       std::vector<std::basic_string<char, std::char_traits<char>, 
> std::allocator<char> >, std::allocator<std::basic_string<char, 
> std::char_traits<char>, std::allocator<char> > > 
> >::_M_insert_aux(__gnu_cxx::__normal_iterator<std::basic_string<char, 
> std::char_traits<char>, std::allocator<char> >*, 
> std::vector<std::basic_string<char, std::char_traits<char>, 
> std::allocator<char> >, std::allocator<std::basic_string<char, 
> std::char_traits<char>, std::allocator<char> > > > >, std::basic_string<char, 
> std::char_traits<char>, std::allocator<char> > const&)in build_geometry.o
>   "geos::io::WKTReader::WKTReader(geos::geom::GeometryFactory const*)", 
> referenced from:
>       _parse_wkt in build_geometry.o
>   
> "geos::geom::GeometryFactory::createLinearRing(geos::geom::CoordinateSequence*)
>  const", referenced from:
>       _build_geometry in build_geometry.o
>       _build_geometry in build_geometry.o
>       _get_wkt_split in build_geometry.o
>       _get_wkt_simple in build_geometry.o
>   "std::basic_string<char, std::char_traits<char>, std::allocator<char> 
> >::length() const", referenced from:
>       _get_wkt in build_geometry.o
>       _get_wkt in build_geometry.o
>   "operator delete(void*)", referenced from:
>       __gnu_cxx::new_allocator<double>::deallocate(double*, unsigned long)in 
> build_geometry.o
>       __gnu_cxx::new_allocator<std::basic_string<char, 
> std::char_traits<char>, std::allocator<char> > 
> >::deallocate(std::basic_string<char, std::char_traits<char>, 
> std::allocator<char> >*, unsigned long)in build_geometry.o
>       
> __gnu_cxx::new_allocator<geos::geom::Geometry*>::deallocate(geos::geom::Geometry**,
>  unsigned long)in build_geometry.o
>       
> __gnu_cxx::new_allocator<geos::geom::LineString*>::deallocate(geos::geom::LineString**,
>  unsigned long)in build_geometry.o
>       std::auto_ptr<std::vector<geos::geom::LineString*, 
> std::allocator<geos::geom::LineString*> > >::~auto_ptr()in build_geometry.o
>       std::auto_ptr<std::vector<geos::geom::Geometry*, 
> std::allocator<geos::geom::Geometry*> > >::~auto_ptr()in build_geometry.o
>   "std::allocator<char>::~allocator()", referenced from:
>       _parse_wkt in build_geometry.o
>       _parse_wkt in build_geometry.o
>   "_xmlCleanupParser", referenced from:
>       _main in osm2pgsql.o
>   "geos::geom::GeometryFactory::~GeometryFactory()", referenced from:
>       _build_geometry in build_geometry.o
>       _build_geometry in build_geometry.o
>       _parse_wkt in build_geometry.o
>       _parse_wkt in build_geometry.o
>       _get_wkt_split in build_geometry.o
>       _get_wkt_split in build_geometry.o
>       _get_wkt_simple in build_geometry.o
>       _get_wkt_simple in build_geometry.o
> ...
> ==================
> … many more like this.
> 
> Any thoughts on how to resolve this issue? Thanks much for your advise in 
> advance. 
> 
> Best regards,
> 
> Chris
> _______________________________________________
> dev mailing list
> dev@openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev


_______________________________________________
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev

Reply via email to