build errors on OSX with python 2.4

I have successfully built and installed wxPython, so that I can use the WXAgg backend for matplotlib. Now, trying to build matplotlib, I get the following error:

/usr/bin/g++ -bundle -undefined dynamic_lookup build/temp.darwin-
8.2.0-Power_Macintosh-2.4/src/_na_transforms.o build/temp.darwin-8.2.0-Power_Macintosh-2.4/src/mplutils.o build/temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/cxx_extensions.o build/temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/cxxsupport.o
build/temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/IndirectPythonInterface.o build/temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/cxxextensions.o -L/usr/local/lib -L/usr/lib -lstdc++ -lm -o build/lib.darwin-8.2.0-Power_Macintosh-2.4/matplotlib/_na_transforms.so

ld: build/temp.darwin-8.2.0-Power_Macintosh-2.4/src/_na_transforms.o illegal reference for -dynamic code (section difference reference from section (__TEXT,__eh_frame) relocation entry (20) to symbol: _ZSt21_Rb_tree_rotate_rightPSt18_Rb_tree_node_baseRS0 defined in dylib: /usr/local/lib/libstdc++.dylib)

ld: build/temp.darwin-8.2.0-Power_Macintosh-2.4/src/_na_transforms.o illegal reference for -dynamic code (section difference reference from section (__TEXT,__eh_frame) relocation entry (24) to symbol: _ZSt20_Rb_tree_rotate_leftPSt18_Rb_tree_node_baseRS0 defined in dylib: /usr/local/lib/libstdc++.dylib)

error: command ‘/usr/bin/g++’ failed with exit status 1

I am using gcc 3.3, and ActivePython 2.4.1.

Any ideas as to what is going wrong?

Chris Fonnesbeck wrote:

I have successfully built and installed wxPython, so that I can use the
WXAgg backend for matplotlib. Now, trying to build matplotlib, I get the
following error:

/usr/bin/g++ -bundle -undefined dynamic_lookup build/temp.darwin-
8.2.0-Power_Macintosh-2.4/src/_na_transforms.o
build/temp.darwin-8.2.0-Power_Macintosh-2.4/src/mplutils.o
build/temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/cxx_extensions.o
build/temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/cxxsupport.o
build/temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/IndirectPythonInterface.o
build/temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/cxxextensions.o
-L/usr/local/lib -L/usr/lib -lstdc++ -lm -o
build/lib.darwin-8.2.0-Power_Macintosh-2.4/matplotlib/_na_transforms.so
ld: build/temp.darwin-8.2.0-Power_Macintosh-2.4/src/_na_transforms.o
illegal reference for -dynamic code (section difference reference from
section (__TEXT,__eh_frame) relocation entry (20) to symbol:
__ZSt21_Rb_tree_rotate_rightPSt18_Rb_tree_node_baseRS0_ defined in
dylib: /usr/local/lib/libstdc++.dylib)
ld: build/temp.darwin-8.2.0-Power_Macintosh-2.4/src/_na_transforms.o
illegal reference for -dynamic code (section difference reference from
section (__TEXT,__eh_frame) relocation entry (24) to symbol:
__ZSt20_Rb_tree_rotate_leftPSt18_Rb_tree_node_baseRS0_ defined in dylib:
/usr/local/lib/libstdc++.dylib)
error: command '/usr/bin/g++' failed with exit status 1

I am using gcc 3.3, and ActivePython 2.4.1.

Any ideas as to what is going wrong?

Try removing /usr/local/lib from your link path or get rid of
/usr/local/lib/libstdc++.* .

···

--
Robert Kern
rkern@...376...

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
  -- Richard Harter

Chris Fonnesbeck wrote:

I have successfully built and installed wxPython, so that I can use the WXAgg backend for matplotlib. Now, trying to build matplotlib, I get the following error:

/usr/bin/g++ -bundle -undefined dynamic_lookup build/temp.darwin- 8.2.0-Power_Macintosh-2.4/src/_na_transforms.o build/temp.darwin-8.2.0-Power_Macintosh-2.4/src/mplutils.o build/temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/cxx_extensions.o build/temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/cxxsupport.o build/temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/IndirectPythonInterface.o build/temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/cxxextensions.o -L/usr/local/lib -L/usr/lib -lstdc++ -lm -o build/lib.darwin-8.2.0-Power_Macintosh-2.4/matplotlib/_na_transforms.so
ld: build/temp.darwin-8.2.0-Power_Macintosh-2.4/src/_na_transforms.o illegal reference for -dynamic code (section difference reference from section (__TEXT,__eh_frame) relocation entry (20) to symbol: __ZSt21_Rb_tree_rotate_rightPSt18_Rb_tree_node_baseRS0_ defined in dylib: /usr/local/lib/libstdc++.dylib)
ld: build/temp.darwin-8.2.0-Power_Macintosh-2.4/src/_na_transforms.o illegal reference for -dynamic code (section difference reference from section (__TEXT,__eh_frame) relocation entry (24) to symbol: __ZSt20_Rb_tree_rotate_leftPSt18_Rb_tree_node_baseRS0_ defined in dylib: /usr/local/lib/libstdc++.dylib)
error: command '/usr/bin/g++' failed with exit status 1

I am using gcc 3.3, and ActivePython 2.4.1.

Any ideas as to what is going wrong?

Chris:

I got around this in the fink package by setting 'export CXX=gcc'.

-Jeff

···

--
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/CDC1 FAX : (303)497-6449
325 Broadway Web : http://www.cdc.noaa.gov/~jsw
Boulder, CO, USA 80305-3328 Office: Skaggs Research Cntr 1D-124