SourceForge logo
SourceForge logo
Menu

matplotlib-devel

From: Davide D. V. <dd...@uc...> - 2011年12月28日 20:35:29
Hi,
the more recent information on installing matplotlib on AIX with XLC 
compiler are pretty dated (5 years ago), so I'd like to let you know 
what I did to have it on my machine. This is matplotlib-v1.1.0 on 
AIX-v5.3 and xlc-v10.1
Some code is worth 1000 words, so here it is, just a couple of comments:
- Note that similar problems occurred when installing scipy: 
http://projects.scipy.org/scipy/ticket/1299
- if I understand C++ Standard (ISO/IEC 14882), section 14.6.4.2, you 
should apply my patch1 below to the mainline (trunk).
#!/bin/bash
 
 
 
cat >xlC <<-"xlC-script-fooling"
 #!/bin/bash
 echo "Davide's xlC - parameters:" $*
 tbr=""
 
 
 
 # getting rid of wrong cc_r first argument
 # note that 1ドル becomes $params[0]
 [ "1ドル" = "cc_r" ] && tbr=0
 
 
 
 # getting rid of other unwanted arguments
 params=( "$@" );
 
 
 
 for i in ${!params[*]}; do
 # you don't link to stdc++ with XL compilers
 [ "${params[$i]}" == "-lstdc++" ] && tbr="$tbr $i"
 done
 
 
 
 for i in $tbr; do
 unset params[$i]
 done
 # -qmkshrobj is to create shared objects with XLC
 set -- "-qmkshrobj ${params[@]}"
 /bin/xlC $*
xlC-script-fooling
cat xlC
chmod +x xlC
cp setup.cfg.template setup.cfg
patch setup.cfg <<-"patch0"
60c
#macosx = False
.
17c
#verbose = True
.
9c
#basedirlist = /usr
.
patch0
patch agg24/include/agg_rasterizer_cells_aa.h <<-"patch1"
499c
 template <class T> AGG_INLINE void swap_cells(T* a, T* b)
.
patch1
# Note sure why they think this should be undefined on AIX
patch src/_png.cpp <<-"patch2"
34c
#endif */
.
32c
/* #ifdef _AIX
.
patch2
export PATH=$PATH:`pwd`
export PKG_CONFIG_PATH=/contrib/freetype/2.4.8/lib/pkgconfig/
export CFLAGS="-qcpluscmt -bnoquiet -I/contrib/zlib/include/ 
-I/contrib/libpng-1.2.40/include/"
source /contrib/Modules/3.2.6/init/bash
module load python zlib libpng-1.2.40
cat setup.cfg
echo
export
echo
python setup.py build
rm xlC
Regards,
Davide Del Vento,
NCAR Computational & Information Services Laboratory
Consulting Services Software Engineer
http://www.cisl.ucar.edu/hss/csg/
SEA Chair http://sea.ucar.edu/
From: Bruno L. A. C. <br...@ft...> - 2013年07月23日 16:36:09
Hi
I am trying install scipy on AIX 6.1 power7, I saw how to install here 
https://sourceforge.net/mailarchive/forum.php?thread_name=4EFB7DC6.6020805%40ucar.edu&forum_name=matplotlib-devel
But I got this error:
/
//bruno@xcat01 /home/bruno/local/sources/matplotlib-1.2.0 # xlC -ma 
-I/opt/freeware/include -DAIX_GENUINE_CPLUSCPLUS -Wl,-brtl 
-bI:/opt/freeware/lib/python2.6/config/python.exp -qcpluscmt -qmkshrobj 
build/temp.aix-6.1-2.6/src/agg_py_transforms.o 
build/temp.aix-6.1-2.6/src/_tkagg.o 
build/temp.aix-6.1-2.6/CXX/IndirectPythonInterface.o 
build/temp.aix-6.1-2.6/CXX/cxx_extensions.o 
build/temp.aix-6.1-2.6/CXX/cxxsupport.o 
build/temp.aix-6.1-2.6/CXX/cxxextensions.o -LI:/usr/lib/libtcl8.4.exp 
-LI:/usr/lib/libtk8.4.exp -L/usr/local/lib -L/usr/local/lib64 
-L/opt/freeware/lib -L/usr/local/lib -L/usr/local/lib64 -lm -lfreetype 
-lz -lm -o build/lib.aix-6.1-2.6/matplotlib/backends/_tkagg.so//
//ld: 0711-224 WARNING: Duplicate symbol: guesses//
//ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more 
information.//
//ld: 0711-317 ERROR: Undefined symbol: .Tcl_CreateCommand//
//ld: 0711-317 ERROR: Undefined symbol: .Tk_MainWindow//
//ld: 0711-317 ERROR: Undefined symbol: .Tk_FindPhoto//
//ld: 0711-317 ERROR: Undefined symbol: .Tk_PhotoBlank//
//ld: 0711-317 ERROR: Undefined symbol: .Tk_PhotoPutBlock_NoComposite//
//ld: 0711-317 ERROR: Undefined symbol: .Tcl_AppendResult//
Some informations :
bruno@xcat01 /home/bruno/local/sources/matplotlib-1.2.0 # rpm -qa | grep tcl
tcl-8.4.7-3
tcl-8.5.13-1
tcllib-1.11.1-1
bruno@xcat01 /home/bruno/local/sources/matplotlib-1.2.0 # rpm -qa | grep tk
tk-8.4.7-3
atk-1.12.3-2
tkinter-2.6.7-1
gtk2-2.10.6-4
tk-8.5.13-1
/
/Please get back to me with solution, how can I get Matplotlib in AIX 6.1?
tks
/
-- 
Bruno L. Amadio Caires
Informática - FT
Universidade Estadual de Campinas
Fone:(19)2113-3470
From: Benjamin R. <ben...@ou...> - 2013年07月23日 18:10:58
On Tue, Jul 23, 2013 at 12:18 PM, Bruno L. Amadio Caires <
br...@ft...> wrote:
> Hi
>
> I am trying install scipy on AIX 6.1 power7, I saw how to install here
> https://sourceforge.net/mailarchive/forum.php?thread_name=4EFB7DC6.6020805%40ucar.edu&forum_name=matplotlib-devel
>
> But I got this error:
> *
> **bruno@xcat01 /home/bruno/local/sources/matplotlib-1.2.0 # xlC -ma
> -I/opt/freeware/include -DAIX_GENUINE_CPLUSCPLUS -Wl,-brtl
> -bI:/opt/freeware/lib/python2.6/config/python.exp -qcpluscmt -qmkshrobj
> build/temp.aix-6.1-2.6/src/agg_py_transforms.o
> build/temp.aix-6.1-2.6/src/_tkagg.o
> build/temp.aix-6.1-2.6/CXX/IndirectPythonInterface.o
> build/temp.aix-6.1-2.6/CXX/cxx_extensions.o
> build/temp.aix-6.1-2.6/CXX/cxxsupport.o
> build/temp.aix-6.1-2.6/CXX/cxxextensions.o -LI:/usr/lib/libtcl8.4.exp
> -LI:/usr/lib/libtk8.4.exp -L/usr/local/lib -L/usr/local/lib64
> -L/opt/freeware/lib -L/usr/local/lib -L/usr/local/lib64 -lm -lfreetype -lz
> -lm -o build/lib.aix-6.1-2.6/matplotlib/backends/_tkagg.so**
> **ld: 0711-224 WARNING: Duplicate symbol: guesses**
> **ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
> information.**
> **ld: 0711-317 ERROR: Undefined symbol: .Tcl_CreateCommand**
> **ld: 0711-317 ERROR: Undefined symbol: .Tk_MainWindow**
> **ld: 0711-317 ERROR: Undefined symbol: .Tk_FindPhoto**
> **ld: 0711-317 ERROR: Undefined symbol: .Tk_PhotoBlank**
> **ld: 0711-317 ERROR: Undefined symbol: .Tk_PhotoPutBlock_NoComposite**
> **ld: 0711-317 ERROR: Undefined symbol: .Tcl_AppendResult**
>
> Some informations :
>
> bruno@xcat01 /home/bruno/local/sources/matplotlib-1.2.0 # rpm -qa | grep
> tcl
> tcl-8.4.7-3
> tcl-8.5.13-1
> tcllib-1.11.1-1
> bruno@xcat01 /home/bruno/local/sources/matplotlib-1.2.0 # rpm -qa | grep
> tk
> tk-8.4.7-3
> atk-1.12.3-2
> tkinter-2.6.7-1
> gtk2-2.10.6-4
> tk-8.5.13-1
>
> *
> *Please get back to me with solution, how can I get Matplotlib in AIX 6.1?
>
> tks
>
> *
>
So, all of the errors appear related to linking _tkagg.so to the various
tkinter and tcl libraries. I see that you have tcl-8.4.7 and tcl-8.5.13,
and it is the 8.4 version that the linker is picking up. Which version of
tcl do you have the development package for? Perhaps you have the 8.5
version of the dev packages, would would have newer symbols and the linker
then tries linking against the older library without those symbols? This is
completely a guess, though.
Cheers!
Ben Root
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /