適当に翻訳する。
[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。
X11 関連のライブラリを全てソースコードから構築し、それらを「/usr/local」に入れた環境で、ソースコードからインストールした xedit を実行したら、下記のエラーが出た。
[猫@localhost ~]$ xedit
Error: Shell widget fileMenu has zero width and/or height
[猫@localhost ~]$
インストールした直後には上のエラーは出なかったので、インストール時に使用した環境変数を設定してみると、
[猫@localhost ~]$ export LD_LIBRARY_PATH="/usr/local/lib"
[猫@localhost ~]$ xedit
[猫@localhost ~]$ export LD_LIBRARY_PATH=""
[猫@localhost ~]$ xedit
Error: Shell widget fileMenu has zero width and/or height
[猫@localhost ~]$
となり、一時的に上手く行った。原因は何か。
とりあえず、xedit のウィンドウの大きさ等を指定するファイルが「/usr/local/share/X11/app-defaults/」にあるので、それを「/usr/share/X11/app-defaults」にコピーしてみると、
[猫@localhost ~]$ sudo cp \
/usr/local/share/X11/app-defaults/Xedit* \
/usr/share/X11/app-defaults/
[猫@localhost ~]$ xedit
Warning: Cannot convert string "menu12" to type Pixmap
Warning: Cannot convert string "xlogo11" to type Pixmap
[猫@localhost ~]$ sudo rm /usr/share/X11/app-defaults/Xedit*
このやり方だと、xedit は起動できるものの、今度は xbitmaps が見つからなくなってしまう。
xedit-1.2.2 の configure ファイルには、次のように書いてある。
...
...
--with-appdefaultdir=<pathname>
specify directory for app-defaults files (default is
autodetected)
...
...
xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
# Check whether --with-appdefaultdir was given.
if test "${with_appdefaultdir+set}" = set; then :
withval=$with_appdefaultdir; appdefaultdir="$withval"
else
appdefaultdir="${xt_appdefaultdir}"
fi
...
...
そして、libXt-1.1.3 の configure ファイルには次のように書いてある。
...
...
ac_default_prefix=/usr/local
...
...
--prefix=PREFIX
install architecture-independent files in PREFIX
[$ac_default_prefix]
...
...
--datarootdir=DIR
read-only arch.-independent data root [PREFIX/share]
--datadir=DIR
read-only architecture-independent data [DATAROOTDIR]
...
...
--with-appdefaultdir=<path>
Set app-default directory (default:
${datadir}/X11/app-defaults)
...
...
ソースコードから作った libXt は自動で「/usr/local/share/X11/app-defaults」を見てくれるはずなのに・・・。
もしやと思って、「ldconfig -p」を実行。
[猫@localhost ~]$ ldconfig -p | grep libXt.so libXt.so.6 (libc6,x86-64) => /usr/lib64/libXt.so.6
libXt-1.1.3 のインストール後に「ldconfig」を実行していなかった。そのため「/usr/lib64」にある方が呼び出され、結果、「/usr/local/share/X11/app-defaults」ではなく「/usr/share/X11/app-defaults」が検索されていた。
「/etc/ld.so.conf」に「/usr/local/lib」が追記してあることを確認し、もう一度「ldconfig」を実行して解決。
[猫@localhost ~]$ sudo ldconfig [猫@localhost ~]$ ldconfig -p | grep libXt.so libXt.so.6 (libc6,x86-64) => /usr/local/lib/libXt.so.6 libXt.so.6 (libc6,x86-64) => /usr/lib64/libXt.so.6 libXt.so (libc6,x86-64) => /usr/local/lib/libXt.so [猫@localhost ~]$ xedit [猫@localhost ~]$
ソースコードから作った xedit を使ったら、下記の警告が出た。
[neko@localhost ~]$ xedit
Warning: Cannot convert string "menu12" to type Pixmap
Warning: Cannot convert string "xlogo11" to type Pixmap
[neko@localhost ~]$
xbitmaps があれば上記の警告は出なくなると英語のサイトにあったので、X11のサイトから xbitmaps-1.1.1 をダウンロード&&インストールして解決。
ソースコードを使わずにRPM等で片付ける場合、xbitmaps-devel、xorg-x11-xbitmaps などをインストールするのだと思われる。
カレンダー
カテゴリー
最新記事
ブログ内検索
広告