ソラマメブログ

  
Posted by at

2009年01月30日

ジェスチャー音が出ない(1.23.0 on PS3)

Secondlife.logを見ると

2009-01-30T07:50:41Z WARNING: loadWAV: LLAudioBufferOpenAL::loadWAV() Error loading /home/takeshich/.secondlife/cache/5e191c7b-8996-9ced-a177-b2ac32bfea06.dsf There was already an AL error on entry to an ALUT function

とのエラー

http://svn.secondlife.com/trac/linden/browser/trunk/indra/llaudio/audioengine_openal.cpp#L334

をみても、なにやら怪しいところはない。

なんだろう。

http://jira.secondlife.com/browse/VWR-2662?focusedCommentId=80427&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_80427

においても、すでにバグはfixされているというし…

んー。謎だ。  

Posted by Takeshich Nakamura at 18:53Comments(0)PS3

2009年01月29日

音を出す(1.23.0 on PS3)

1.23.0からOpenALがサポートされPS3でも音が出せるようになりました。
現状、UI音とストリーミング音を出すことに成功しています。
あとは、ジェスチャーなどの音を残すばかりです。

さて、そのUI音とストリーミング音を出す方法ですが、
とりあえず、gstreamer関連を入れてみる。

sudo apt-get install gstreamer0.10-fluendo-mp3 gstreamer0.10-ffmpeg ubuntu-restricted-extras oggconvert gstreamer0.10-schroedinger jackd*

音を二重に出せるようにする。
$ vi ~/.asound
rcpcm.dsp0 {
type plug
slave.pcm "dmix"
}

ctl.mixer0 {
type hw
card 0
}

pcm.!default {
type plug
slave.pcm "dmix"
}

なんか怒られるので、追加してみた。
vi .alsoftrc

[alsa]
mmap = false

これで、UIとストリーミングの音は出せます。
  

Posted by Takeshich Nakamura at 17:41Comments(2)PS3

2009年01月28日

1.23.0 on PS3

リポジトリからソースをダウンロードしてコンパイルした。



OpenALのポーティングが行われ、FMODがなくても音が出るようになった。
現状確認できているのは、ポップアップで出るメッセージのときに「ポン」となることと
終了時、確認メッセージが出るときの「チン」って音だ。

ストリーミングに関しては、いろいろ試し中。追って報告したいと思う。
メモリが少ないからぷつぷつ切れるんだろうなぁ…。たぶん。

  

Posted by Takeshich Nakamura at 00:55Comments(0)PS3

2009年01月26日

SLviewer on PS3 向上委員会3


フレームバッファの容量拡大を試みます。
まず、ubuntu7.10のデフォルトのカーネルから、比較的新しいカーネルにバージョンアップします。そして、フレームバッファの容量を拡大し、カーネルを再構築します。
ちょっと、Secondlifeからは、離れてしまいますが、大切な作業です。

カーネルのバージョンアップと再構築

カーネルのバージョンアップ
CELL-Linux-CL_20080609-ADDON.iso のダウンロード
isoファイルをダウンロードし中から、3つのファイルを取り出します。
wget http://ftp.uk.linux.org/pub/linux/Sony-PS3/distro-kit/CELL-Linux-CL_20080609-ADDON.iso
sudo mount -o loop CELL-Linux-CL_20080609-ADDON.iso /mnt
cd /mnt/target/
cp initrd.img-2.6.25.4 ./
cp kernel-2.6.25.4-20080609.ppc64.rpm ./

rpm2cpio をダウンロードし、実行します。
wget ftp://ftp.nsu.ru/mirrors/ftp.freebsd.org/pub/FreeBSD/releases/alpha/5.4-RELEASE/packages/All/rpm2cpio-1.2_2.tbz

tar xvf rpm2cpio-1.2_2.tbz
perl ./bin/rpm2cpio.pl kernel-2.6.25.4-20080609.ppc64.rpm | cpio -idmv

するとカーネルが展開されます。
カーネルをブートする準備をします。

cd boot
sudo cp vmlinux-2.6.25.4 /boot
sudo cp config-2.6.25.4 /boot
cd ..
sudo cp initrd.img-2.6.25.4 /boot

cd lib/modules
sudo cp -r 2.6.25.4 /lib/modules

kboot.confを編集します。
バックアップします。
sudo cp /etc/kboot.conf /etc/kboot.conf.bak
sudo vi /etc/kboot.conf

/vmlinux initrd=/initrd.img

/vmlinux-2.6.25.4 initrd=/initrd.img-2.6.25.4
に変更します。

イニシャライズします

sudo update-initramfs -k 2.6.25.4 -u
このときfirmwareのエラーが出ますが、無視します。

sudo depmod -a

ブートローダのダウンロード
パソコンでリムーバルメディアにダウンロードします。
\ps3\otheros以下に次のファイルを設置します。
http://ozlabs.org/~jk/projects/petitboot/downloads/bin-0.2/otheros.bld

ゲームOSに戻ります。
sudo boot-game-os

設定から他のOSのインストールを選びます。

ブートローダが新しくなり、終了です。

カーネルの再構築

ソースの取得
sudo mount -o loop CELL-Linux-CL_20080609-ADDON.iso /mnt
cd /mnt/src
cp linux-2.6.25.4-20080609.tar.bz2 ./
tar xvf linux-2.6.25.4-20080609.tar.bz2
cd linux-2.6.25.4-20080609
mkdir -p ~/build/2625

CONFIG_FB_PS3_DEFAULT_SIZE_M=9->48に変更する
vi ./arch/powerpc/configs/ps3_defconfig

makeする
make -j2 O=~/build/2625 ps3_defconfig
make -j2 O=~/build/2625

インストールする
sudo su -
cd /home/takeshich/build/2625
make modules_install
make install

git clone git://git.kernel.org/pub/scm/linux/kernel/git/geoff/ps3-linux.git
cd ps3-linux
mkdir -p ~/build/ps3
make -j2 O=~/build/ps3 ps3_defconfig
make -j2 O=~/build/ps3 menuconfig
make -j2 O=~/build/ps3
sudo su -
cd /home/hiruta/build/ps3
make modules_install
make install  

Posted by Takeshich Nakamura at 10:37Comments(0)PS3

2009年01月26日

SLviewer on PS3 向上委員会2

SLviewer on PS3をよりよくするために、
現状の課題とクリアした課題についてまとめる。

■現状の課題
 □音
  対応
  ・OpenALで音が出るようになったが、メモリ不足のためジェスチャー音がならない
   音を出す(1.23.0 on PS3)
   ジェスチャー音が出ない(1.23.0 on PS3)
   ジェスチャー音が出ないわけ。
 □LLMOZILIB
  ・コンパイルが通らない!!!
 □FPS問題
  対応
  ・mesa cellドライバでは動かない
   PS3でSLを動かす-mesa cell編-1
   PS3でSLを動かす-mesa cell編-2
   PS3でSLを動かす-mesa cell編-3
   https://lists.secondlife.com/pipermail/sldev/2009-January/012658.html
  ・フレームバッファの容量拡大でも向上が見られない
  未対応
  ・スワップを増やしてみる。(ps3vram)
 □デバッグ
  ・mesa cellドライバでは動かないのは、なぜかの検証。
   https://lists.secondlife.com/pipermail/sldev/2009-January/012768.html
 □その他(viewerに関係ないが…)
  ・無線LAN対応
   wicd
nm-applet

■クリアした課題
 □日本語入力
  ・SDLのコンパイル
  ・環境変数の設定
   export GTK_IM_MODULE='xim'
   export XMODIFIERS='@im=SCIM'


SS
  

Posted by Takeshich Nakamura at 09:41Comments(0)PS3

2009年01月26日

1.21.6 on PS3



1.21.6をコンパイルしてみた。
コンパイルの仕方を確認するためです。

前の記事にコンパイルの仕方が書いてあるので、試してみたい方はどうぞ。  

Posted by Takeshich Nakamura at 05:12Comments(0)PS3

2009年01月25日

SLviewer on PS3 向上委員会

カーネルを再構築して、フレームバッファを変えてみた。
すると、実メモリの量にも変化が・・・。え・・・
フレームバッファ9MB


フレームバッファ48MB


実メモリの量が変化しています。なんで?

  

Posted by Takeshich Nakamura at 22:36Comments(0)PS3

2009年01月25日

How to compile SLviewer on PS3

※目次
■はじめに
■環境作り
 □ISOのダウンロード
 □ubuntu7.10のダウンロード
 □ブートローダの入れなおし
 □ubuntuのインストール
 □ネットワークの設定
 □sshdのインストール
 □システムを最新の状態にする
■コンパイル環境を整える
□開発関係のインストール
 □要件(一般ツール)の確認
 □ソース・ライブラリなどのダウンロードと展開
 □要件(ライブラリなど)の確認
 □その他
■おまじないコーナー
 □GCCのコンパイル
 □boostのバグのパッチあて
■プロジェクトファイルの自動生成
■ソースの編集
■make
■うごかす


■はじめに
 PS3Linuxでsecondlifeのviewerを使っているという人にあったので
 対抗して、なぜかFedora9でやってみることにした。
 しかし、ubuntuでRSXのドライバがあるようなので、はじめてubuntuをインストールする。しかし、ファームウエアのバージョンの関係でドライバは有効にはならない。が
 そのまま進める。
 
■環境作り
 □ISOのダウンロード
  アドオンCD
  http://ftp.uk.linux.org/pub/linux/Sony-PS3/distro-kit/CELL-Linux-CL_20080609-ADDON.iso
 □ubuntu7.10のダウンロード
  http://cdimage.ubuntu.com/ports/releases/gutsy/release/ubuntu-7.10-alternate-powerpc+ps3.iso

 □ブートローダの入れなおし
  ・アドオンCDをPS3に挿入する。
・XMBのトップメニューから「設定」を選ぶ。
  ・XMBの「設定」メニューから「本体の設定」を選ぶ。
  ・XMBの「本体の設定」メニューから「他のシステムのインストール」を選ぶ。
  ・以下のインストールデータが見つかりました。が表示される、開始をする。
  ・インストールが完了しました。というメッセージが出る。XMBのトップに戻る。
  ・アドオンCDを取り出す。
  ・XMBのトップメニューから「設定」を選ぶ。
  ・XMBの「設定」メニューから「本体の設定」を選ぶ。
  ・XMBの「本体の設定」メニューから「優先起動システム」を選ぶ。
  ・他のシステムを選ぶ。
  ・再起動する。
 □ubuntuのインストール
  ・ubuntuのネットワークインストールCDをPS3に挿入する。
  ・kboot: install を入力する。
  ・メニューに従いインストールする。

 □ネットワークの設定

/etc/network/interfaces を設定する。
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.11.30
network 192.168.11.0
netmask 255.255.255.0
broadcast 192.168.11.255
gateway 192.168.11.1
dns-nameservers 192.168.11.1

/etc/resolv.confに書く。
nameserver 192.168.11.1

 □sshdのインストール
  sudo apt-get install openssh-server

 □システムを最新の状態にする
sudo apt-get update
sudo apt-get dist-upgrade

■コンパイル環境を整える
 http://wiki.secondlife.com/wiki/Compiling_the_viewer_%28Linux%29
 より、必要なものを整える。

□開発関係のインストール
sudo apt-get install build-essential
 もしCDを要求されたら、mount /dev/scd0 /mnt

 □要件(一般ツール)の確認
  ・python
   sudo apt-get install python
  ・Scons(もういらないw)
   sudo apt-get install scons
  ・GCC 3.4 (もういらないw)
   sudo apt-get install g++-3.4
  ・yacc
   sudo apt-get install bison
  ・lex
   sudo apt-get install flex
・cmake
http://www.cmake.org/cmake/resources/software.html
./configure
make
sudo make install

 □ソース・ライブラリなどのダウンロードと展開
 http://wiki.secondlife.com/wiki/Source_downloads
 より、必要なものをダウンロードする。

  ・ソース
  ・ライブラリ
  ・アートワーク

 □展開
  ・ソース
   tar -zxvf
  ・ライブラリ
   tar -zxvf
  ・アートワーク
unzip

 □要件(ライブラリなど)の確認
  ・GL
   sudo apt-get install mesa-common-dev
  ・GLU
   sudo apt-get install libglu1-mesa-dev
  ・glibc
   sudo apt-get install libc6-dev
  ・stdc++ library
   sudo apt-get install libstdc++6-dev
  ・X11
   sudo apt-get install libx11-dev
  ・zlib
   sudo apt-get install zlib1g-dev
  ・openssl
   sudo apt-get install libssl-dev
  ・FMOD(現状PCC64用のバイナリがありません、つまり音が出せない)

 □その他
もし足りない場合は、足りないよって言われているライブラリを検索し、インストールしてください。
  ・apr-1
   sudo apt-get install libapr1-dev
  ・aprutil-1
   sudo apt-get install libaprutil1-dev
  ・boost
   sudo apt-get install libboost-dev
  ・boost-regex
   sudo apt-get install libboost-regex-dev
  ・c-ares
   http://daniel.haxx.se/projects/c-ares/
   ./configure
   make -j2
   sudo make install

  ・curl
   curl 7.18.1
   http://curl.haxx.se/
   ./configure --enable-ares=/usr/local/lib --with-ssl=/usr/lib --with-zlib=/usr/linclude --without-libidn
   make -j2
   sudo make install

  ・ELFIO

   cd ELFIO && g++-3.4 -shared *.o -o libELFIO.so

  ・expat
   sudo apt-get install libcurl4-openssl-dev
  ・google-perftools
   sudo apt-get install libgoogle-perftools-dev
  ・GTK 2.x
   sudo apt-get install libgtk2.0-dev
  ・jpeglib
   sudo apt-get install libjpeg62-dev
  ・OpenJPEG
   http://www.openjpeg.org/index.php?menu=download
   ./configure
make
sudo make install

  ・OpenSSL
   sudo apt-get install libssl-dev
  ・SDL(日本語を通す必要があるので、別途コンパイル)
http://www.libsdl.org/download-1.2.php
./configure
make
sudo make install
  ・Vorbis
   sudo apt-get install libvorbis-dev
  ・xmlrpc-epi 0.51
   http://xmlrpc-epi.sourceforge.net/
   ./configure
make
sudo make install
  ・gstreamer
   sudo apt-get install libgstreamer0.10-dev
■おまじないコーナー
  とてつもなく重要なおまじないです。おまじないにはかなりの時間がかかりますのであらかじめご了承ください。
 □GCCのコンパイル
  ・GCCの最新版にしないとGCCのバグのためアプリケーションがリンクできないことになりますので、最新版にします。
   ソースからGCCコンパイル、インストールです。
   ・下準備
   sudo apt-get install libc6-dev-ppc64
   sudo apt-get install lib64mpfr1
   sudo apt-get install lib64mpfr-dev
   sudo apt-get install lib64gmp3 lib64gmp3-dev lib64gmpxx4

   とりあえず、リンカを新しくします。
   http://ftp.gnu.org/gnu/binutils/binutils-2.19.tar.gz

   ./configure
   make
   sudo make install
   ソースを取ってきて、
   http://gcc.cybermirror.org/snapshots/4.4-20090102/gcc-4.4-20090102.tar.bz2
   mkdir 4_4_0
   cd 4_4_0
   ../gcc-4.4-20090102/configure --enable-languages=c,c++,fortran,objc,obj-c++ --exec-prefix=/usr --prefix=/usr/local/n --enable-shared --with-system-zlib --libexecdir=/usr/local/n/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/local/n/include/c++/4.4.0 --program-suffix=-4.4 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --disable-softfloat --enable-secureplt --enable-targets=powerpc-linux,powerpc64-linux --with-cpu=default32 --with-long-double-128 --enable-checking=release powerpc-linux-gnu
   export LD_LIBRARY_PATH=/usr/lib64
   make
sudo make install

 □boostのバグのパッチあて
   https://svn.boost.org/trac/boost/raw-attachment/ticket/2069/boost_mpl_gcc-4_4.patch


■プロジェクトファイルの自動生成
  ./develop.py --standalone --no-distcc

■ソースの編集

  アセンブルしようとするところがあるので、そこを回避。
  return get_clock_count();

  llfasttimer.cpp
  #if LL_LINUX && defined(__ppc64__)
  U64 get_cpu_clock_count()
  {
     return get_clock_count();
  }
  #endif

■make
makeする前にも準備が必要。
  linden/indra/cmake$ vi 00-Common.cmake
  4.3を4.4に変更
  -Werrorを削除
  します。

  newview/CMakeList.txt
438行付近から数行コメントアウトします。

llmoz削除
  llmedia/llmediamanager.cpp
154行コメントアウトします。
  llmedia/CMakeFileList.txt
4.234に変更します。

  cmake/Mozlib.cmake
対象行コメントアウトします。

  make

オプションとして-j2をつけたくなるが、メモリが足りなくなるのでやめておく。
  何かエラーでとまったら、ぐぐって見てください。
  わからなければ、takeshich.nakamura at gmail.comにメールをくれるか、ここにコメントください。

Traceback (most recent call last):
File "/home/takeshich/sl/1_22_5/linden/indra/newview/viewer_manifest.py", line 676, in
main()
File "/home/takeshich/sl/1_22_5/linden/indra/newview/../lib/python/indra/util/llmanifest.py", line 232, in main
wm = LLManifest.for_platform(args['platform'], args.get('arch'))(args)
File "/home/takeshich/sl/1_22_5/linden/indra/newview/../lib/python/indra/util/llmanifest.py", line 258, in for_platform
return self.manifests[platform.lower()]
KeyError: 'linux_ppc64'
make[2]: *** [newview/SecondLife-ppc64-1.22.5.0.tar.bz2] Error 1
make[1]: *** [newview/CMakeFiles/package.dir/all] Error 2
make: *** [all] Error 2

なのですが、バイナリはできていることだろう。。。


■うごかす
  /etc/X11/xorg.conf

  65:

  DefaultFbBpp 32

  indraで
  cp ../scripts/messages/message_template.msg newview/app_settings/
  cp ../etc/message.xml newview/app_settings/

  indraで
  ( cd newview && LD_LIBRARY_PATH="`pwd`"/../../libraries/powerpc_64-linux/lib_release_client:${LD_LIBRARY_PATH}:/usr/local/lib ./secondlife-bin )
  特にライブラリパスを指定しなくても動くよ。
  ./secondlife-bin
でおk  

Posted by Takeshich Nakamura at 18:36Comments(0)PS3

2009年01月20日

PS3でSLが動いたぜ!




PS3でSLが動いたのにコメントとかトラックバックが無かったので、
なんだか残念に思い、SLDEVのメーリングリストにサブスクライブして
つたない英語で報告しました。

https://lists.secondlife.com/pipermail/sldev/2009-January/012634.html

ついでにFPSの向上の質問をしておきました。

なんだか、イタリアのほうでリンクが張られたみたいです。
http://www.secondlifeitalia.com/community/viewtopic.php?t=20788

意味不明。
  

Posted by Takeshich Nakamura at 06:25Comments(0)PS3

2009年01月19日

PS3でSLを動かす-mesa cell編-3

@ps3:~/mesacell/mesa$ ppu32-embedspu
/usr/bin/ppu32-embedspu: line 2: /usr/bin/ppu-embed: No such file or directory
/usr/bin/ppu32-embedspu: line 2: exec: /usr/bin/ppu-embed: cannot execute: No such file or directory

のエラーで困り果てていたが、もしやシェル?と思い、のぞいてみると
シェルで、ppu-embedからppu-embedspuに変更することで直った。

で、mesa cellドライバのコンパイルはうまく通った。

デモとして以下のものが動いた。







で、SLが動くかだったが、試したら動かなかった。

残念。

ドライバの開発工程でものぞいて見ようかな。  

Posted by Takeshich Nakamura at 17:36Comments(0)PS3

2009年01月18日

PS3でSLを動かす-mesa cell編-2

クロスコンパイルで、バイナリはできた。
でも実機に持って行って実行してみるとlibcを参照していて、バージョンがあわないというエラーが出た。

で、実機でやることにして色々試してみるうちに
ppu32-embedspuが変なエラーを出していることに気づいた。

どうにもおかしいので、検索したがあまりにもニッチなのか引っかからない。

パッケージごと削除して、入れなおしたりしたけど実行するだけで、エラーをはくバイナリになっていた。何がおかしいのかわからない。

似たような環境で、同じパッケージを使って、mesa cellドライバができたって言う人もいた。

エラーメッセージでもさらそうかな。

メッセージはこれ↓
ppu32-embedspu -m32 g3d_spu g3d_spu g3d_spu-embed.o
/usr/bin/ppu32-embedspu: line 2: /usr/bin/ppu-embed: No such file or directory
/usr/bin/ppu32-embedspu: line 2: exec: /usr/bin/ppu-embed: cannot execute: No such file or directory

@ps3:~/mesacell/mesa$ ppu32-embedspu
/usr/bin/ppu32-embedspu: line 2: /usr/bin/ppu-embed: No such file or directory
/usr/bin/ppu32-embedspu: line 2: exec: /usr/bin/ppu-embed: cannot execute: No such file or directory

なんじゃこりゃ?

そんなわけで、mesa cellドライバ化は頓挫?なのか?

とりあえず、音が出ていないので、そちらに注力してみることにする。  

Posted by Takeshich Nakamura at 01:09Comments(0)PS3

2009年01月17日

PS3でSLを動かす-mesa cell編-1

PS3上でSLは動いたのだが、FPSが0.4と使い物にならない。

そこで、mesa cellプロジェクトがあることを発見。

http://www.yellowdog-board.com/viewtopic.php?f=19&t=4015

PS3で試してみるが、うまくいかない。
CELLSDKもFEDORAとRHEL対応みたいだ。
alienを使ってやる方法を見つけたが、うまくいかなかった。

それなので、クロスコンパイルに挑戦してみることにした。

早速試してみることにするが、CELLのSDKをインストールして
makeするとファイルが見つからないなどのエラーに見舞われる。

結局、
/opt/cell/sysroot/opt/cell/sdk/usr

/opt/cell/sdk/usrにコピーすることで解決した。

makeしているとX関係のヘッダファイルが無いと怒られたので、
/opt/cell/sdk/usr/includeにコピーする。

今度は、X関係のライブラリーが無いとノタマウ。
PS3から持ってきた。

いろいろやって今日はここまで。  

Posted by Takeshich Nakamura at 00:35Comments(0)PS3

2009年01月13日

PS3でSecondlifeのviewerを動かす8

灰色の世界が続いていますが、すこしは明るくなりました。

ArareCafeです。

  

Posted by Takeshich Nakamura at 21:34Comments(0)PS3

2009年01月13日

PS3でSecondlifeのviewerを動かす7

うごいたよ。

とりあえず、スクリーンショット載せます。
いろいろやってみて、また記事書きます。





全部コンパイルは通って、リンクするところになるとなぜかハングアップするので

/var/log/syslogを見てみると
Out of memory: kill process 8178 (collect2) score 94057 or a child
Jan 13 13:17:14 ps3 kernel: [11816.417061] Killed process 8179 (ld)

メモリが足りないらしい。スワップまで食べてるよ。

ということで、スワップ領域の確保します。
何もしていない状態で以下のようにかなり、メモリを食っています。

$ free
total used free shared buffers cached
Mem: 218228 133148 85080 0 7176 59920
-/+ buffers/cache: 66052 152176
Swap: 634528 0 634528


sudo dd if=/dev/zero of=swapfile bs=1024 count=3000000
sudo mkswap -v1 swapfile
sudo swapon /swapfile

$ free
total used free shared buffers cached
Mem: 218228 215540 2688 0 3356 143884
-/+ buffers/cache: 68300 149928
Swap: 3634520 292 3634228

再びリンクします。
すると

Traceback (most recent call last):
File "/home/takeshich/sl/1_22_5/linden/indra/newview/viewer_manifest.py", line 676, in
main()
File "/home/takeshich/sl/1_22_5/linden/indra/newview/../lib/python/indra/util/llmanifest.py", line 232, in main
wm = LLManifest.for_platform(args['platform'], args.get('arch'))(args)
File "/home/takeshich/sl/1_22_5/linden/indra/newview/../lib/python/indra/util/llmanifest.py", line 258, in for_platform
return self.manifests[platform.lower()]
KeyError: 'linux_ppc64'
make[2]: *** [newview/SecondLife-ppc64-1.22.5.0.tar.bz2] Error 1
make[1]: *** [newview/CMakeFiles/package.dir/all] Error 2
make: *** [all] Error 2

なのですが、バイナリはできていることだろう。。。

indraで
cp ../scripts/messages/message_template.msg newview/app_settings/
cp ../etc/message.xml newview/app_settings/

indraで
( cd newview && LD_LIBRARY_PATH="`pwd`"/../../libraries/powerpc_64-linux/lib_release_client:${LD_LIBRARY_PATH}:/usr/lib:/usr/local/lib ./secondlife-bin )

立ち上がりました。
  

Posted by Takeshich Nakamura at 17:28Comments(0)PS3

2009年01月13日

PS3でSecondlifeのviewerを動かす6

前回、GCCのコンパイルやり直すべきか・・・。と悩んでいましたが、
GCCのコンパイルやり直すことにしました。。

デフォルトのGCCのconfigureをみて、再度コンパイルしてみました。

./configure -v --enable-languages=c,c++,fortran,objc,obj-c++ --exec-prefix=/usr --prefix=/usr/local/n --enable-shared --with-system-zlib --libexecdir=/usr/local/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/local/include/c++/4.4.0 --program-suffix=-4.4 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --disable-softfloat --enable-secureplt --enable-targets=powerpc-linux,powerpc64-linux --with-cpu=default32 --with-long-double-128 --enable-checking=release powerpc-linux-gnu

make CFLAGS="-O2 -g"

4時間ぐらいまって、成功しました。

/usr/bin/gccのシンボリックリンクを変更します。
/usr/bin/g++のシンボリックリンクを変更します。

そして、コンパイラの指定を変更します。
/usr/local/bin/gcc → /usr/bin/gcc
/usr/local/bin/g++ → /usr/bin/g++

いま、makeさせています。


/usr/local/bin/ld: skipping incompatible /usr/lib/libcairo.so when searching for -lcairo
/usr/local/bin/ld: skipping incompatible /usr/lib/libcairo.a when searching for -lcairo
/usr/local/bin/ld: cannot find -lcairo
collect2: ld はステータス 1 で終了しました
make[2]: *** [linux_crash_logger/linux-crash-logger] Error 1
make[1]: *** [linux_crash_logger/CMakeFiles/linux-crash-logger.dir/all] Error 2
make: *** [all] Error 2

のエラーは出ず、順調なようです。

つづきは、また後日!  

Posted by Takeshich Nakamura at 01:02Comments(0)PS3

2009年01月12日

PS3でSecondlifeのviewerを動かす5

気を取り直して、コンパイルです。

@ps3:~/sl/1_22_5/linden/indra$ make
[ 0%] Built target llaudio
[ 3%] Built target llcharacter
[ 11%] Built target llcommon
[ 12%] Built target llimage
[ 13%] Built target llimagej2coj
[ 14%] Built target llinventory
[ 17%] Built target llmath
[ 19%] Built target llmedia
[ 29%] Built target llmessage
[ 30%] Built target llprimitive
[ 32%] Built target llrender
[ 33%] Built target llvfs
[ 34%] Built target llwindow
[ 35%] Built target llxml
[ 36%] Built target lscript_compile
[ 37%] Built target lscript_execute
[ 37%] Built target lscript_library
[ 37%] Built target llcrashlogger
[ 44%] Built target llui
Linking CXX executable linux-crash-logger
/usr/local/bin/ld: skipping incompatible /usr/lib/libcairo.so when searching for -lcairo
/usr/local/bin/ld: skipping incompatible /usr/lib/libcairo.a when searching for -lcairo
/usr/local/bin/ld: cannot find -lcairo
collect2: ld はステータス 1 で終了しました
make[2]: *** [linux_crash_logger/linux-crash-logger] Error 1
make[1]: *** [linux_crash_logger/CMakeFiles/linux-crash-logger.dir/all] Error 2
make: *** [all] Error 2

コンパイラ変えたから、ライブラリが使えなくなってしまったようです。
m64入れたのがいけなかったのかな?

気合で、コンパイルを続けるためにソースから入れていくことにします。

libcairoをインストールします。
http://cairographics.org/releases/cairo-1.8.6.tar.gz
./configure

すると、
http://cairographics.org/releases/pixman-0.13.2.tar.gz
が必要だといってきます。
./configure
make
していると、GTK+のライブラリが必要になります。

GTK+をインストールする必要があり、以下のファイルをインストールしていきます。

http://ftp.gnome.org/pub/gnome/sources/glib/2.18/glib-2.18.4.tar.bz2
http://ftp.gnome.org/pub/gnome/sources/atk/1.25/atk-1.25.2.tar.bz2
http://downloads.sourceforge.net/freetype/freetype-2.3.7.tar.bz2?modtime=1214734118&big_mirror=0
http://archive.ubuntu.com/ubuntu/pool/main/libp/libpthread-stubs/libpthread-stubs_0.1.orig.tar.gz
http://archive.ubuntu.com/ubuntu/pool/main/libx/libxau/libxau_1.0.4.orig.tar.gz
http://xcb.freedesktop.org/dist/libxcb-1.1.tar.bz2
http://archive.ubuntu.com/ubuntu/pool/main/libx/libx11/libx11_1.1.5.orig.tar.gz
http://archive.ubuntu.com/ubuntu/pool/main/z/zlib/zlib_1.2.3.3.dfsg.orig.tar.gz
http://archive.ubuntu.com/ubuntu/pool/main/libx/libxml2/libxml2_2.6.32.dfsg.orig.tar.gz
http://archive.ubuntu.com/ubuntu/pool/main/f/fontconfig/fontconfig_2.6.0.orig.tar.gz
http://archive.ubuntu.com/ubuntu/pool/main/libx/libxrender/libxrender_0.9.4.orig.tar.gz
http://archive.ubuntu.com/ubuntu/pool/main/x/xft/xft_2.1.13.orig.tar.gz
http://www.ijg.org/files/jpegsrc.v6b.tar.gz
http://archive.ubuntu.com/ubuntu/pool/main/t/tiff/tiff_3.8.2.orig.tar.gz
http://archive.ubuntu.com/ubuntu/pool/main/libx/libxext/libxext_1.0.4.orig.tar.gz
http://ftp.gnome.org/pub/gnome/sources/pango/1.22/pango-1.22.4.tar.bz2

最後にGTKをインストールしようとすると
http://ftp.acc.umu.se/pub/gnome/sources/gtk+/2.12/gtk+-2.12.12.tar.bz2

cairoが必要だといってきます。

無限ループに陥りました。。。どう回避すべきなのでしょうか?

んー。GCCのコンパイルやり直すべきか・・・。だれか教えて!  

Posted by Takeshich Nakamura at 00:27Comments(0)PS3

2009年01月12日

PS3でSecondlifeのviewerを動かす4

GCCのバージョンアップに成功したため、SLのコンパイルに戻ります。

まず、コンパイラの指定を変更します。
/usr/bin/gcc → /usr/local/bin/gcc
/usr/bin/g++ → /usr/local/bin/g++

ためしにコンパイルしてみます。すると以下のエラーでとまってしまいます。

error: 'end' is used uninitialized in this function
make[2]: *** [llcharacter/CMakeFiles/llcharacter.dir/llcharacter.o] Error 1
make[1]: *** [llcharacter/CMakeFiles/llcharacter.dir/all] Error 2
make: *** [all] Error 2

ですので、フラグの変更をします。
vi 00-Common.cmake
4.3を4.4に変更
-Werrorを削除
します。

もう一回コンパイルします。違うエラーが出ました。

@ps3:~/sl/1_22_5/linden/indra$ make
Scanning dependencies of target llaudio
[ 0%] Building CXX object llaudio/CMakeFiles/llaudio.dir/audioengine.o
[ 0%] Building CXX object llaudio/CMakeFiles/llaudio.dir/listener.o
[ 0%] Building CXX object llaudio/CMakeFiles/llaudio.dir/llaudiodecodemgr.o
[ 0%] Building CXX object llaudio/CMakeFiles/llaudio.dir/vorbisdecode.o
[ 0%] Building CXX object llaudio/CMakeFiles/llaudio.dir/vorbisencode.o
Linking CXX static library libllaudio.a
[ 0%] Built target llaudio
Scanning dependencies of target llcharacter
[ 0%] Building CXX object llcharacter/CMakeFiles/llcharacter.dir/llanimationstates.o
[ 1%] Building CXX object llcharacter/CMakeFiles/llcharacter.dir/llbvhloader.o
In file included from /usr/include/boost/mpl/apply.hpp:23,
from /usr/include/boost/iterator/iterator_facade.hpp:34,
from /usr/include/boost/iterator/iterator_adaptor.hpp:15,
from /usr/include/boost/token_iterator.hpp:22,
from /usr/include/boost/tokenizer.hpp:20,
from /home/takeshich/sl/1_22_5/linden/indra/llcharacter/llbvhloader.cpp:36:
/usr/include/boost/mpl/apply_wrap.hpp:81:31: error: missing binary operator before token "("
/usr/include/boost/mpl/apply_wrap.hpp:173:31: error: missing binary operator before token "("
In file included from /usr/include/boost/mpl/bind.hpp:27,
from /usr/include/boost/mpl/lambda.hpp:18,
from /usr/include/boost/mpl/apply.hpp:25,
from /usr/include/boost/iterator/iterator_facade.hpp:34,
from /usr/include/boost/iterator/iterator_adaptor.hpp:15,
from /usr/include/boost/token_iterator.hpp:22,
from /usr/include/boost/tokenizer.hpp:20,
from /home/takeshich/sl/1_22_5/linden/indra/llcharacter/llbvhloader.cpp:36:
/usr/include/boost/mpl/apply_wrap.hpp:81:31: error: missing binary operator before token "("
/usr/include/boost/mpl/apply_wrap.hpp:173:31: error: missing binary operator before token "("
In file included from /usr/include/boost/mpl/lambda.hpp:18,
from /usr/include/boost/mpl/apply.hpp:25,
from /usr/include/boost/iterator/iterator_facade.hpp:34,
from /usr/include/boost/iterator/iterator_adaptor.hpp:15,
from /usr/include/boost/token_iterator.hpp:22,
from /usr/include/boost/tokenizer.hpp:20,
from /home/takeshich/sl/1_22_5/linden/indra/llcharacter/llbvhloader.cpp:36:
/usr/include/boost/mpl/bind.hpp:364:31: error: missing binary operator before token "("
/usr/include/boost/mpl/bind.hpp:531:31: error: missing binary operator before token "("
In file included from /usr/include/boost/mpl/lambda.hpp:22,
from /usr/include/boost/mpl/apply.hpp:25,
from /usr/include/boost/iterator/iterator_facade.hpp:34,
from /usr/include/boost/iterator/iterator_adaptor.hpp:15,
from /usr/include/boost/token_iterator.hpp:22,
from /usr/include/boost/tokenizer.hpp:20,
from /home/takeshich/sl/1_22_5/linden/indra/llcharacter/llbvhloader.cpp:36:
/usr/include/boost/mpl/aux_/full_lambda.hpp:230:31: error: missing binary operator before token "("
In file included from /usr/include/boost/iterator/iterator_facade.hpp:34,
from /usr/include/boost/iterator/iterator_adaptor.hpp:15,
from /usr/include/boost/token_iterator.hpp:22,
from /usr/include/boost/tokenizer.hpp:20,
from /home/takeshich/sl/1_22_5/linden/indra/llcharacter/llbvhloader.cpp:36:
/usr/include/boost/mpl/apply.hpp:138:31: error: missing binary operator before token "("
make[2]: *** [llcharacter/CMakeFiles/llcharacter.dir/llbvhloader.o] Error 1
make[1]: *** [llcharacter/CMakeFiles/llcharacter.dir/all] Error 2

検索してみるとboostのバグのようで、以下のパッチを適用することで直りました。

https://svn.boost.org/trac/boost/raw-attachment/ticket/2069/boost_mpl_gcc-4_4.patch  

Posted by Takeshich Nakamura at 00:12Comments(0)PS3

2009年01月11日

PS3でSecondlifeのviewerを動かす3

gccのバグにぶち当たりました。まじでー。gcc4.4.0で試してみます。

今回は、SLのソースをコンパイルすることなく、横道にそれます。

ソースからGCCコンパイル、インストールです。

とりあえず、リンカを新しくします。
http://ftp.gnu.org/gnu/binutils/binutils-2.19.tar.gz

./configure
make
sudo make install

以下二つですが、あとでapt-get installしているのでいらないかも。
ftp://ftp.gnu.org/gnu/gmp/gmp-4.2.4.tar.gz
./configure
make
sudo make install
http://www.mpfr.org/mpfr-current/mpfr-2.3.2.tar.gz
./configure
make
sudo make install

ソースを取ってきて、
http://gcc.cybermirror.org/snapshots/4.4-20090102/gcc-4.4-20090102.tar.bz2

mkdir 4_4_0
cd 4_4_0
../gcc-4.4-20090102/configure --enable-languages=c,c++
export LD_LIBRARY_PATH=/usr/lib64
sudo apt-get install libc6-dev-ppc64
sudo apt-get install lib64mpfr1
sudo apt-get install lib64mpfr-dev
sudo apt-get install lib64gmp3 lib64gmp3-dev lib64gmpxx4
make CFLAGS="-m64 -O2 -g"

4時間ぐらいずっと待つ。

sudo make install

/usr/local/bin/gcc -v
Using built-in specs.
Target: powerpc64-unknown-linux-gnu
コンフィグオプション: ../gcc-4.4-20090102/configure --enable-languages=c,c++
スレッドモデル: posix
gcc version 4.4.0 20090102 (experimental) (GCC)

install成功!  

Posted by Takeshich Nakamura at 23:55Comments(0)PS3

2009年01月11日

PS3でSecondlifeのviewerを動かす2

1.22.5でコンパイルすることにしました。

で、いろいろ試行錯誤して

@ps3:~/sl/1_22_5/linden/indra$ make
[ 0%] Built target llaudio
[ 3%] Built target llcharacter
[ 11%] Built target llcommon
[ 12%] Built target llimage
[ 13%] Built target llimagej2coj
[ 14%] Built target llinventory
[ 17%] Built target llmath
[ 19%] Built target llmedia
[ 29%] Built target llmessage
[ 30%] Built target llprimitive
[ 32%] Built target llrender
[ 33%] Built target llvfs
[ 34%] Built target llwindow
[ 35%] Built target llxml
[ 36%] Built target lscript_compile
[ 37%] Built target lscript_execute
[ 37%] Built target lscript_library
[ 37%] Built target llcrashlogger
[ 44%] Built target llui
[ 44%] Built target linux-crash-logger
[ 44%] Built target linux-crash-logger-strip-target
Linking CXX executable secondlife-bin
master: http://secondlife.com/app/message_template/master_message_template.msg
current: /home/takeshich/sl/1_22_5/linden/scripts/messages/message_template.msg
Refreshing master cache from http://secondlife.com/app/message_template/master_message_template.msg
--- PASS ---
Newer
in message TeleportFinish: is more deprecated: UDPBlackListed vs. NotDeprecated in base
in message EnableSimulator: is more deprecated: UDPBlackListed vs. NotDeprecated in base
in message CrossedRegion: is more deprecated: UDPBlackListed vs. NotDeprecated in base

/usr/lib/gcc/powerpc-linux-gnu/4.1.3/../../../../lib/crt1.o: In function `_start':
(.text+0x20): relocation truncated to fit: R_PPC_REL24 against symbol `__libc_start_main@@GLIBC_2.0' defined in .glink section in /usr/lib/gcc/powerpc-linux-gnu/4.1.3/../../../../lib/crt1.o
/usr/lib/gcc/powerpc-linux-gnu/4.1.3/crtbegin.o:(.fini+0x0): relocation truncated to fit: R_PPC_REL24 against `.text'
/usr/lib/gcc/powerpc-linux-gnu/4.1.3/crtend.o:(.init+0x0): relocation truncated to fit: R_PPC_REL24 against `.text'
CMakeFiles/secondlife-bin.dir/llagent.o: In function `LLAgent::getVelocity() const':
/home/hiruta/sl/1_22_5/linden/indra/newview/llagent.cpp:1014: relocation truncated to fit: R_PPC_REL24 against symbol `memmove@@GLIBC_2.0' defined in .glink section in /usr/lib/gcc/powerpc-linux-gnu/4.1.3/../../../../lib/crt1.o
CMakeFiles/secondlife-bin.dir/llagent.o: In function `__tcf_44':
/home/hiruta/sl/1_22_5/linden/indra/llcommon/lldate.h:127: relocation truncated to fit: R_PPC_REL24 against symbol `std::basic_string, std::allocator >::~basic_string()@@GLIBCXX_3.4' defined in .glink section in /usr/lib/gcc/powerpc-linux-gnu/4.1.3/../../../../lib/crt1.o
CMakeFiles/secondlife-bin.dir/llagent.o: In function `__tcf_45':
/home/hiruta/sl/1_22_5/linden/indra/llcommon/lldate.h:129: relocation truncated to fit: R_PPC_REL24 against symbol `std::basic_string, std::allocator >::~basic_string()@@GLIBCXX_3.4' defined in .glink section in /usr/lib/gcc/powerpc-linux-gnu/4.1.3/../../../../lib/crt1.o
CMakeFiles/secondlife-bin.dir/llagent.o: In function `__tcf_426':
/home/hiruta/sl/1_22_5/linden/indra/llcommon/llstring.h:288: relocation truncated to fit: R_PPC_REL24 against symbol `std::basic_string, std::allocator >::~basic_string()@@GLIBCXX_3.4' defined in .glink section in /usr/lib/gcc/powerpc-linux-gnu/4.1.3/../../../../lib/crt1.o
CMakeFiles/secondlife-bin.dir/llagent.o: In function `__tcf_427':
/home/hiruta/sl/1_22_5/linden/indra/llui/lluixmltags.h:35: relocation truncated to fit: R_PPC_REL24 against symbol `std::basic_string, std::allocator >::~basic_string()@@GLIBCXX_3.4' defined in .glink section in /usr/lib/gcc/powerpc-linux-gnu/4.1.3/../../../../lib/crt1.o
CMakeFiles/secondlife-bin.dir/llagent.o: In function `__tcf_428':
/home/hiruta/sl/1_22_5/linden/indra/llui/lluixmltags.h:36: relocation truncated to fit: R_PPC_REL24 against symbol `std::basic_string, std::allocator >::~basic_string()@@GLIBCXX_3.4' defined in .glink section in /usr/lib/gcc/powerpc-linux-gnu/4.1.3/../../../../lib/crt1.o
CMakeFiles/secondlife-bin.dir/llagent.o: In function `__tcf_429':
/home/hiruta/sl/1_22_5/linden/indra/llui/lluixmltags.h:37: relocation truncated to fit: R_PPC_REL24 against symbol `std::basic_string, std::allocator >::~basic_string()@@GLIBCXX_3.4' defined in .glink section in /usr/lib/gcc/powerpc-linux-gnu/4.1.3/../../../../lib/crt1.o
CMakeFiles/secondlife-bin.dir/llagent.o: In function `__tcf_430':
/home/takeshich/sl/1_22_5/linden/indra/llui/lluixmltags.h:38: additional relocation overflows omitted from the output
collect2: ld returned 1 exit status
make[2]: *** [newview/secondlife-bin] Error 1
make[1]: *** [newview/CMakeFiles/secondlife-bin.dir/all] Error 2
make: *** [all] Error 2


gccのバグにぶち当たりました。まじでー。
http://gcc.gnu.org/ml/gcc-bugs/2008-10/msg00361.html

gcc4.4.0で試してみます。

  

Posted by Takeshich Nakamura at 11:50Comments(0)PS3

2009年01月11日

PS3でSecondlifeのviewerを動かす大作戦1

2008年6月で、1.19.1では、ログイン画面の表示に成功しましたが、テクスチャがロードされないよう。



ログインしようとすると以下のようなエラーになって



というところで、止めていました。

なんだかやる気が出てきたので最新版で再び挑戦です。

  

Posted by Takeshich Nakamura at 11:46Comments(0)PS3