Trouble installing basemap 1.0.6 on OSX 10.8.2

Jeff,

I’m not to experienced with these installations, so I really don’t know. If you send a link to another installation I could try it. For what it’s worth, If I run python setup.py build for basemap-1.0.5 I do not get this error.

–Scott

···

On Jan 20, 2013, at 3:44 PM, Jeff Whitaker <jeffrey.s.whitaker@…259…> wrote:

Scott Henderson wrote:

Hello,

I’ve tried installing the latest version of basemap on OSX Lion and am getting the following error:

-------------------

scotthenderson@…4266…:python setup.py build

ld: warning: ld: warning: ignoring file nad2bin.o, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 1 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): nad2bin.oignoring file src/pj_malloc.o, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 1 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): src/pj_malloc.o

Undefined symbols for architecture i386:

“_main”, referenced from:

  -u command line option

ld: symbol(s) not found for architecture i386

clang: error: linker command failed with exit code 1 (use -v to see invocation)

ld: warning: ld: warning: ignoring file nad2bin.o, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 1 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): nad2bin.oignoring file src/pj_malloc.o, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 1 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): src/pj_malloc.o

Undefined symbols for architecture i386:

“_main”, referenced from:

  -u command line option

ld: symbol(s) not found for architecture i386

clang: error: linker command failed with exit code 1 (use -v to see invocation)

Traceback (most recent call last):

File “setup.py”, line 97, in

 cc.link_executable(objects, execname)

File “/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/distutils/ccompiler.py”, line 698, in link_executable

 debug, extra_preargs, extra_postargs, None, target_lang)

File “/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/distutils/unixccompiler.py”, line 262, in link

 raise LinkError, msg

distutils.errors.LinkError: Command “cc -arch i386 nad2bin.o src/pj_malloc.o -o nad2bin” failed with exit status 1

Scott:

Don’t really know, but here’s a guess:

Looks like a problem with your python installation - distutils is trying to use the -arch i386 compiler flag and you’re probably on a 64 bit system (x86_64).

I’ve built this on several macos x Mountain Lion systems without incident. Can you build other C extensions on your system?

-Jeff