FreeBSD6.2のパッケージになっているperlはithreadsに対応していないため、ithreads対応にビルドしたperlを別ディレクトリにインストールします。(以下の手順では/opt/local以下にインストールしています。ports,packagesに影響を及ぼさないディレクトリであればどこでも良いと思います)
# wget http://www.cpan.org/src/stable.tar.bz2
# mkdir -p /opt/local # mkdir -p /opt/local/bin # bzcat stable.tar.bz2 |tar xvf - # cd perll-5.8.8 # sh Configure (以下は[ENTER]キー以外のタイプをする箇所を抜粋しています) Build a threading Perl? [n] y Installation prefix to use? (~name ok) [/usr/local] /opt/local # make # make test エラーが出ますがそのままインストールします (多分よくないことですが、gnviewの動作自体には問題がないようです) # make install # /opt/local/bin/perl -V Summary of my perl5 (revision 5 version 8 subversion 8) configuration: (中略) usethreads=define use5005threads=undef useithreads=define usemultiplicity=define ^^^^^^^^^^^^^^^^^^<-これを確認
# /opt/local/bin/cpan
Select your country (or several nearby countries) [] 5 put them on one line, separated by blanks, e.g. '1 4 5' [] 1 2 3 4 5 6 7 cpan> q #
Please enter your CPAN site: [] http://ftp.cpan.jp/ cpan> q #
# /opt/local/bin/cpan cpan> install Bundle::CPAN cpan> q
(データが取得できなかった場合の表示) Conld not fetch modules/03modlist.data.gz Going to write /root/.cpan/Metadata Warning: Cannot install Bundle::CPAN, don't know ehat it is. Try the command i /Bundle::CPAN/ to find objects with matching identifiers. cpan> (cpanを終了) cpan> q (設定ファイルを削除) # rm -rf ./.cpan # cd /opt/local/lib/perl5/5.8.8/CPAN # rm -f ./Config.pm* (初期設定をやり直し) # cd # /opt/local/bin/cpan
t/lock..........1/3
fb62# /opt/local/bin/cpan Always commit changes to config variables to disk? [no] yes cpan[1]> o conf (CPANの設定はこんな感じになっています) $CPAN::Config options from '/opt/local/lib/perl5/5.8.8/CPAN/Config.pm': commit [Commit changes to disk] defaults [Reload defaults from disk] help [Short help about 'o conf' usage] init [Interactive setting of all options] applypatch undef auto_commit [1] build_cache [10] build_dir [/root/.cpan/build] build_dir_reuse undef build_requires_install_policy undef bzip2 undef cache_metadata [1] check_sigs undef colorize_debug undef colorize_output undef colorize_print undef colorize_warn undef commandnumber_in_prompt [1] commands_quote undef cpan_home [/root/.cpan] curl undef dontload_hash dontload_list undef ftp [/usr/bin/ftp] ftp_passive [1] ftp_proxy [] getcwd [cwd] gpg [/usr/local/bin/gpg] gzip [/usr/bin/gzip] histfile [/root/.cpan/histfile] histsize [100] http_proxy [] inactivity_timeout [0] index_expire [1] inhibit_startup_message [0] keep_source_where [/root/.cpan/sources] load_module_verbosity undef lynx [] make [/usr/bin/make] make_arg [] make_install_arg [] make_install_make_command [/usr/bin/make] makepl_arg [] mbuild_arg [] mbuild_install_arg [] mbuild_install_build_command [./Build] mbuildpl_arg [] ncftp [] ncftpget [] no_proxy [] pager [more] password undef patch undef prefer_installer undef prefs_dir undef prerequisites_policy [ask] proxy_pass undef proxy_user undef randomize_urllist undef scan_cache [atstart] shell [/bin/csh] show_unparsable_versions undef show_upload_date [0] show_zero_versions undef tar [/usr/bin/tar] tar_verbosity undef term_is_latin [1] term_ornaments [1] test_report undef unzip [] urllist 0 [ftp://ftp.dti.ad.jp/pub/lang/CPAN/] 1 [ftp://ftp.kddilabs.jp/CPAN/] 2 [ftp://ftp.nara.wide.ad.jp/pub/CPAN/] 3 [ftp://ftp.ring.gr.jp/pub/lang/perl/CPAN/] 4 [ftp://ftp.u-aizu.ac.jp/pub/CPAN] 5 [ftp://ftp.yz.yamagata-u.ac.jp/pub/lang/cpan/] 6 [http://ftp.cpan.jp/] use_sqlite [0] username undef wait_list undef wget [/usr/local/bin/wget] yaml_load_code undef yaml_module undef (モジュールを順番にインストールします) cpan[2]> install ExtUtils::Depends cpan[3]> install HTML::TokeParser cpan[4]> install ExtUtils::PkgConfig cpan[5]> install Glib cpan[6]> install Cairo (以下の表示(依存性解決)が出ますので、yesをタイプして依存するモジュールをインストールします) ----- Unsatisfied dependencirs detected during ----- ----- TSCH/Cairo-1.044.tar.gz ----- Test::Number::Delta [requires] Shall I follow them and prepend them to the queue of modules we are processing right now? [yes] <-- [ENTER]もしくはyes[ENTER] cpan[7]> install Gtk2 cpan[8]> install Gtk2::GladeXML cpan[9]> install HTTP::Date (以下の表示(依存性解決)が出ますので、yesをタイプして依存するモジュールをインストールします) ----- Unsatisfied dependencirs detected during ----- ----- GAAS/libwww-perl-5.808.tar.gz ----- URI [requires] Shall I follow them and prepend them to the queue of modules we are processing right now? [yes] <-- [ENTER]もしくはyes[ENTER] cpan[10]> q #
# tar xzvf gnview-0.6.tar.gz # cd gnview-0.6 # mkdir -p /usr/share/gnview # cp -p gnview.glade 1pix* /usr/share/gnview # cp -p gnview /usr/local/bin # chmod 755 /usr/local/bin/gnview (以下は必要に応じて) # cp -p gnview.desktop /usr/local/share/applications
(変更前) #!/usr/bin/perl -w (変更後) #!/opt/local/bin/perl -w