homeでlf_debian.tgzを解凍します。Lightflowフォルダができます。
.profileの設定は前の記事を参照してください。
@ubuntu:~/Lightflow/PM/Examples$ python ball1.py
以下エラー出ます。
from lightflowPM import *
ImportError: libstdc++-libc6.0-1.so.2: cannot open shared object file: No such file or directory
libstdc++-libc6.1-1.so.2 : It's a "14 year old" file, older than any Ubuntu. But still available from the Debian archives.
http://archive.debian.net/woody/i386/libstdc++2.9-glibc2.1/download
@ubuntu:~$ dpkg -i libstdc++2.9-glibc2.1_2.91.66-4_i386.deb
dpkg: 要求した操作はスーパーユーザの権限が必要です
@ubuntu:~$ sudo dpkg -i libstdc++2.9-glibc2.1_2.91.66-4_i386.deb
未選択パッケージ libstdc++2.9-glibc2.1 を選択しています。
(データベースを読み込んでいます ... 現在 117128 個のファイルとディレクトリがインストールされています。)
(libstdc++2.9-glibc2.1_2.91.66-4_i386.deb から) libstdc++2.9-glibc2.1 を展開しています...
libstdc++2.9-glibc2.1 (2.91.66-4) を設定しています ...
libc-bin のトリガを処理しています ...
ldconfig deferred processing now taking place
@ubuntu:/usr/lib$ sudo ln -sf libstdc++-libc6.1-1.so.2 libstdc++-libc6.0-1.so.2
libstdc++-libc6.0-1.so.2が作成されました。
@ubuntu:~/Lightflow/PM/Examples$ python ball1.py
ball1.py:3: RuntimeWarning: Python C API version mismatch for module lightflowPM: This Python has API version 1013, module lightflowPM has version 1007.
from lightflowPM import *
Segmentation fault (コアダンプ)
残念ながらpython2.6は不意に終了しました。
Python1.5.2をダウンロード
http://www.python.org/download/releases/1.5/
@ubuntu:~$ cd Python-1.5.2/
@ubuntu:~/Python-1.5.2$ ./configure
@ubuntu:~/Python-1.5.2$ make
(cd Modules; make -f Makefile.pre Makefile)
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c -o fileobject.o fileobject.c
fileobject.c:590: error: conflicting types for ‘getline’
/usr/include/stdio.h:651: note: previous declaration of ‘getline’ was here
make[1]: *** [fileobject.o] エラー 1
make[1]: ディレクトリ `/home/ubuntu/Python-1.5.2/Objects' から出ます
make: *** [Objects] エラー 2
python1.5.2/Objects/fileobject.cをgeditで開き
検索でgetlineを探す。
getline1に4箇所書き換える。
再び
@ubuntu:~/Python-1.5.2$ make
@ubuntu:~/Python-1.5.2$ sudo make altinstall
ビルド成功
@ubuntu:~/Python-1.5.2$ python1.5
Python 1.5.2 (#1, Jan 10 2012, 22:42:45) [GCC 4.4.1] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>>
python1.5.2実行可能
ubuntu@ubuntu:~/Lightflow/PM/Examples$ python1.5 ball1.py
Segmentation fault (コアダンプ)
うまくいかないようだ。
---------------------------------------------------------------------
以下はコアダンプの出力設定確認
unlimit -a
コアダンプを出力する設定方法
* デバッグ対象プログラムを起動前にulimitコマンドを実行する(-c以降に最大出力サイズを指定する)
ulimit -c 10000000
@ubuntu:~/Lightflow/PM/Examples$ python1.5 ball1.py
Segmentation fault (コアダンプ)
coreが出力される。
@ubuntu:~/Lightflow/PM/Examples$ gdb python1.5 core
GNU gdb (GDB) 7.0-ubuntu
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
Reading symbols from /usr/local/bin/python1.5...done.
warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /lib/tls/i686/cmov/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libm.so.6
Reading symbols from /lib/tls/i686/cmov/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /home/ubuntu/Lightflow/lightflowPM.so...done.
Loaded symbols for /home/ubuntu/Lightflow/lightflowPM.so
Reading symbols from /home/ubuntu/Lightflow/libLightflow.so...(no debugging symbols found)...done.
Loaded symbols for /home/ubuntu/Lightflow/libLightflow.so
Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0
Reading symbols from /usr/lib/libstdc++-libc6.0-1.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libstdc++-libc6.0-1.so.2
Core was generated by `python1.5 ball1.py'.
Program terminated with signal 11, Segmentation fault.
#0 0x00286e05 in ?? () from /lib/tls/i686/cmov/libc.so.6
(gdb) where
#0 0x00286e05 in ?? () from /lib/tls/i686/cmov/libc.so.6
#1 0x00281d3b in vfprintf () from /lib/tls/i686/cmov/libc.so.6
#2 0x0028bf3f in fprintf () from /lib/tls/i686/cmov/libc.so.6
#3 0x0105ad3f in LfScene::LfScene(long) ()
from /home/ubuntu/Lightflow/libLightflow.so
#4 0x00f62cbf in LfLocalSceneProxy::LfLocalSceneProxy(long) ()
from /home/ubuntu/Lightflow/libLightflow.so
#5 0x00d78295 in scene_new(_object *, _object *) ()
from /home/ubuntu/Lightflow/lightflowPM.so
#6 0x0807f03c in call_builtin (func=0x9d60c08, arg=0x9d4f4f0, kw=0x0)
at ceval.c:2359
#7 PyEval_CallObjectWithKeywords (func=0x9d60c08, arg=0x9d4f4f0, kw=0x0)
at ceval.c:2324
#8 0x080817c4 in eval_code2 (co=
globals=
argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, owner=0x0)
at ceval.c:1654
#9 0x08082c5b in PyEval_EvalCode (co=0x9d79918, globals=0x9d58638,
locals=0x9d58638) at ceval.c:324
#10 0x0805fed2 in run_node (n=0x9d6e098, filename=
globals=0x9d58638, locals=0x9d58638) at pythonrun.c:887
#11 0x08060dd2 in PyRun_SimpleFile (fp=0x9d4f008,
filename=0xbf939580 "ball1.py") at pythonrun.c:570
#12 0x08051b58 in Py_Main (argc=2, argv=0xbf9387b4) at main.c:287
#13 0x0805162b in main (argc=2, argv=0xbf9387b4) at python.c:12
(gdb)
つづきに原因がわかったのでこちらへ。
- -
- -