matplotlib / basemap

Plot on map projections (with coastlines and political boundaries) using matplotlib
MIT License
774 stars 392 forks source link

compile breaks on mac lion: Undefined symbols for architecture x86_64: #38

Closed dev66 closed 11 years ago

dev66 commented 12 years ago

matplotlib-basemap-68a32f1/geos-3.3.3 $ make [...] mv -f .deps/Assert.Tpo .deps/Assert.Plo mv -f .deps/Profiler.Tpo .deps/Profiler.Plo mv -f .deps/GeometricShapeFactory.Tpo .deps/GeometricShapeFactory.Plo /bin/sh ../../libtool --tag=CXX --mode=link g++ -DGEOS_INLINE -pedantic -Wall -ansi -Wno-long-long -ffloat-store -g -O2 -o libutil.la Assert.lo GeometricShapeFactory.lo math.lo Profiler.lo
libtool: link: ar cru .libs/libutil.a .libs/Assert.o .libs/GeometricShapeFactory.o .libs/math.o .libs/Profiler.o libtool: link: ranlib .libs/libutil.a libtool: link: ( cd ".libs" && rm -f "libutil.la" && ln -s "../libutil.la" "libutil.la" ) /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../include -I../include/geos -I../include -DGEOS_INLINE -pedantic -Wall -ansi -Wno-long-long -ffloat-store -g -O2 -MT inlines.lo -MD -MP -MF .deps/inlines.Tpo -c -o inlines.lo inlines.cpp libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../include -I../include/geos -I../include -DGEOS_INLINE -pedantic -Wall -ansi -Wno-long-long -ffloat-store -g -O2 -MT inlines.lo -MD -MP -MF .deps/inlines.Tpo -c inlines.cpp -fno-common -DPIC -o .libs/inlines.o libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../include -I../include/geos -I../include -DGEOS_INLINE -pedantic -Wall -ansi -Wno-long-long -ffloat-store -g -O2 -MT inlines.lo -MD -MP -MF .deps/inlines.Tpo -c inlines.cpp -o inlines.o >/dev/null 2>&1 mv -f .deps/inlines.Tpo .deps/inlines.Plo /bin/sh ../libtool --tag=CXX --mode=link g++ -DGEOS_INLINE -pedantic -Wall -ansi -Wno-long-long -ffloat-store -g -O2 -release 3.3.3 -no-undefined -o libgeos.la -rpath /tools/geos/lib inlines.lo algorithm/libalgorithm.la geom/libgeom.la geomgraph/libgeomgraph.la index/libindex.la io/libio.la linearref/liblinearref.la noding/libnoding.la operation/liboperation.la planargraph/libplanargraph.la precision/libprecision.la simplify/libsimplify.la util/libutil.la
libtool: link: g++ -dynamiclib -o .libs/libgeos-3.3.3.dylib .libs/inlines.o -Wl,-force_load,algorithm/.libs/libalgorithm.a -Wl,-force_load,geom/.libs/libgeom.a -Wl,-force_load,geomgraph/.libs/libgeomgraph.a -Wl,-force_load,index/.libs/libindex.a -Wl,-force_load,io/.libs/libio.a -Wl,-force_load,linearref/.libs/liblinearref.a -Wl,-force_load,noding/.libs/libnoding.a -Wl,-force_load,operation/.libs/liboperation.a -Wl,-force_load,planargraph/.libs/libplanargraph.a -Wl,-force_load,precision/.libs/libprecision.a -Wl,-force_load,simplify/.libs/libsimplify.a -Wl,-force_load,util/.libs/libutil.a -O2 -install_name /tools/geos/lib/libgeos-3.3.3.dylib -Wl,-single_module Undefined symbols for architecture x86_64: "__ZNSt8auto_ptrIN4geos4geom8EnvelopeEEcvSt12auto_ptr_refIT_EIS2_EEv", referenced from: virtual thunk to geos::geom::GeometryCollection::computeEnvelopeInternal() constin libgeom.a(GeometryCollection.o) "std::auto_ptrgeos::geom::Envelope::auto_ptr(std::auto_ptr_refgeos::geom::Envelope)", referenced from: virtual thunk to geos::geom::GeometryCollection::computeEnvelopeInternal() constin libgeom.a(GeometryCollection.o) ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make[2]: * [libgeos.la] Error 1 make[1]: * [all-recursive] Error 1 make: *\ [all-recursive] Error 1

any idea?

TIA dave

jswhit commented 12 years ago

You can use macports to install basemap and/or the geos library.

dev66 commented 12 years ago

yes, you are right. however, certain circumastances require that i compile the package myself.

besides, using macports does not help improving the basemap package, which IMO eventually should be able to compile on lion w/o such issues...

thanks

jswhit commented 12 years ago

the problem is with the geos lib dependency, not basemap. You could take a look at the macports package to see how they work around those compiler errors. Perhaps using clang instead of gcc (or vice versa)?