[[diary/Kojima]]
・Google Earth
MesaLib-9.2.2に更新して、OpenGL回りもちゃんと動くようになったので、
久しぶりにGoogle Earthを試してみた。
Google EarthはバイナリをRPMやDEBのパッケージで配布しているので、
rpm2cpio | cpio -ivd で展開し、txz形式にまとめ直してインストール。
ファイル類は /opt/google/earth/free/ 以下に入るらしい。
ところが、/opt/google/earth/free/google-earthや google-earth.bin を実行しようとすると全然動かない。
$ google-earth
/usr/bin/google-earth: 行 44: ./googleearth-bin: そのようなファイルやディレクトリはありません
$ /opt/google/earth/free/googleearth-bin
bash: /opt/google/earth/free/googleearth-bin: そのようなファイルやディレクトリはありません
何かライブラリが足りないのか、と調べても見えない。
$ ldd /opt/google/earth/free/googleearth-bin
/usr/bin/ldd: 行 117: /opt/google/earth/free/googleearth-bin: そのようなファイルやディレクトリはありません
ファイルシステムの問題でファイルが見えなくなったのかな、と思ったが、
ファイルはちゃんと存在している。
$ readelf -a /opt/google/earth/free/googleearth-bin | head
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
「なぜだ?」としばし首を捻っていたが、バイナリエディタでファイルを開くと、
先頭付近に /lib64/ld-lsb-x86-64.so.3 なんて文字列が見える。
#ref("okteta.png")
ld-lsb-x86-64.so.3 なんてローダは知らないなぁ、、とググってみたら、
Arch Linux方面で ld-linux-x86-64.so.2 へリンクを貼るだけで誤魔化しているのを
見つけ、そのとおりしてみたら、何とか起動することができた。
root@corei7:/lib64# ln ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
$ google-earth
#ref("googleearth.png")
ここ長いことGlibcは更新していないのだけど、最近は動的ローダの名前のルールが変ったのだろうか?
#comment