Blender 2.63でWiimoteを利用するために、 Python 3.2バインディングでcwiidを構築しようとしています。私のOSはubuntu 12.04です。ビルドに正しい python バージョンを提供するようにvirtualenvをセットアップしました。これが私がこれまでに行ったことです(bash-shell記録):
# Set up virtualenv with python3.2
sudo apt-get install python-setuptools
sudo easy_install virtualenv
virtualenv -p python3.2 --no-site-packages ~/env/cwiid_for_blender
# to activate, type this:
source ~/env/cwiid_for_blender/bin/activate
python --version # returns "Python 3.2.3"
# Build cwiid
# prerequisites
sudo apt-get install bison bluez libbluetooth3 libbluetooth-dev libgtk2.0-0 libgtk2.0-dev
# download and compile sources of cwiid
mkdir -p ~/Downloads/cwiid
cd ~/Downloads/cwiid
git clone https://github.com/abstrakraft/cwiid.git
cd cwiid
source ~/env/cwiid_for_blender/bin/activate
aclocal
autoconf
./configure
make
cwiidは通常、python 2.7 に対してビルドされるため、これは失敗します。構成スクリプトには、次の行があります。
PYTHON_VERSION=`$PYTHON -c 'import sys; print sys.version[:3]'`
次のように 3.2 構文に変更した後:
PYTHON_VERSION=`$PYTHON -c 'import sys; print( sys.version[:3] )'`
make スクリプトはコンパイルを開始しますが、次の行にヒットすると失敗します。
gcc -L../libcwiid -rdynamic -o wminput main.o conf.o c_plugin.o uinput.o action_enum.o util.o py_plugin.o parser.o lexer.o -lcwiid -lbluetooth -ldl -lpthread -lpython3.2
/usr/bin/ld: cannot find -lpython3.2
mu
興味深いことに、次の行に追加すると、スクリプトは次のエラーに進むことができます。
gcc -L../libcwiid -rdynamic -o wminput main.o conf.o c_plugin.o uinput.o action_enum.o util.o py_plugin.o parser.o lexer.o -lcwiid -lbluetooth -ldl -lpthread -lpython3.2mu
gcc が 3.2 ライブラリを検索する場所と、それを指定する方法がわかりません。configure
具体的には、スクリプトを修正する必要があるかどうか、またはこの問題を修正するために環境を変更する必要があるかどうかがわかりません。これまでの他の人による提案:
- からシンボリックリンクを作成し
python3.2->python3.2mu
ます。(しかし、どこで?いくつかの場所を試しましたが、どれもうまくいきませんでした) - 検索するディレクトリを含むファイルを追加します
/etd/ld.so.conf.d/
では、gcc は libcwiid をビルドするために必要な python3.2 ライブラリをどのように見つけるのでしょうか?