Prochaine révision | Révision précédente Prochaine révisionLes deux révisions suivantes |
compil_pyml [2008/03/07 17:14] – créée gerard | compil_pyml [2008/03/22 08:10] – gerard |
---|
PyML -0.6.15 ne compile pas sous Solaris 10 avec la comande classique: | PyML -0.6.15 ne compile pas sous Solaris 10 avec la commande classique: |
<code> | <code> |
python setup build | python setup build |
</code> | </code> |
peut etre lié à ce [[http://opensolaris.org/jive/thread.jspa?threadID=8179&tstart=135|probleme]] | peut etre lié à ce [[http://opensolaris.org/jive/thread.jspa?threadID=8179&tstart=135|probleme]] |
| |
| |
| ====== hack dans le script setup.py ====== |
| trouvé par N. Ollinger, permet d'avancer dans la compilation, mais maintenant, c'est un flag à l'édition de liens qui manque. De plus, il a fallu modifier un fichier à cause de hash_map |
| <code> |
| > python setup.py build --debug |
| running build |
| running build_py |
| running build_ext |
| building 'PyML/ext/_mylibsvm' extension |
| C compiler: /usr/lib/python2.4/pyCC |
| |
| compile options: '-g -I/usr/include/python2.4 -c' |
| pyCC: PyML/ext/mylibsvm_wrap.cpp |
| "PyML/ext/SparseDataSet.h", line 14: Error: Could not open include file<hash_map>. |
| "PyML/ext/SparseDataSet.h", line 27: Error: hash_map is not a member of std. |
| "PyML/ext/SparseDataSet.h", line 44: Error: A class template name was expected instead of hash_map. |
| 3 Error(s) detected. |
| "PyML/ext/SparseDataSet.h", line 14: Error: Could not open include file<hash_map>. |
| "PyML/ext/SparseDataSet.h", line 27: Error: hash_map is not a member of std. |
| "PyML/ext/SparseDataSet.h", line 44: Error: A class template name was expected instead of hash_map. |
| 3 Error(s) detected. |
| error: Command "/usr/lib/python2.4/pyCC -g -I/usr/include/python2.4 -c PyML/ext/mylibsvm_wrap.cpp -o build/temp.solaris-2.10-i86pc-2.4/PyML/ext/mylibsvm_wrap.o" failed with exit status 3 |
| </code> |
| Pour hash_map, il faut linker avec "-library=stlport4", mais impossible de lui faire rajouter cet argument!? |
| |
| Si on le fait manuellement, on arrive a compiler et installer pyml: |
| <code> |
| > cp -rp PyML-0.6.15/setup.py PyML-0.6.15/setup.py.ori |
| > cd PyML-0.6.15/PyML/ext/ |
| > cp -rp SMO.h SMO.h.ori |
| > cp -rp Gist.h Gist.h.ori |
| > cp -rp KernelCache.h KernelCache.h.ori |
| > cp -rp SparseDataSet.h SparseDataSet.h.ori |
| > cp -rp PyML/ext/FeatureVector.cpp PyML/ext/FeatureVector.cpp.ori |
| |
| > cp PyML-0.6.15.old/setup.py PyML-0.6.15/ |
| > cp PyML-0.6.15.old/PyML/ext/SMO.h PyML-0.6.15/PyML/ext/ |
| > cp PyML-0.6.15.old/PyML/ext/Gist.h PyML-0.6.15/PyML/ext/ |
| > cp PyML-0.6.15.old/PyML/ext/KernelCache.h PyML-0.6.15/PyML/ext/ |
| > cp PyML-0.6.15.old/PyML/ext/SparseDataSet.h PyML-0.6.15/PyML/ext/ |
| |
| </code> |
| pour tester: |
| <code> |
| > cd data/ |
| > pwd |
| /local/apps/src/PyML-0.6.15 |
| > python |
| Python 2.4.4 (#1, Jan 9 2007, 23:31:33) [C] on sunos5 |
| Type "help", "copyright", "credits" or "license" for more information. |
| >>> from PyML import * |
| Traceback (most recent call last): |
| File "<stdin>", line 1, in ? |
| File "/local/apps/lib/lib/python2.4/site-packages/PyML/datafunc.py", line 2, in ? |
| import arrayWrap |
| File "/local/apps/lib/lib/python2.4/site-packages/PyML/arrayWrap.py", line 2, in ? |
| from ext import csparsedataset |
| File "/local/apps/lib/lib/python2.4/site-packages/PyML/ext/csparsedataset.py", line 7, in ? |
| import _csparsedataset |
| ImportError: ld.so.1: python2.4: fatal: relocation error: file /local/apps/lib/lib/python2.4/site-packages/PyML/ext/_csparsedataset.so: symbol __1cDstd2l6Frn0ANbasic_ostream4Ccn0ALchar_traits4Cc____pkc_2_: referenced symbol not found |
| |
| </code> |
| |
| ====== références ====== |
| * http://forum.java.sun.com/thread.jspa?threadID=5097023&messageID=9382032 |
| * http://www.python.org/doc/2.4.4/inst/tweak-flags.html |
| * |
| |