2011年12月24日土曜日

Solaris 11でpkgsrcを使う

poolがv33なZFSを試そうとOracle印のSolaris 11を入れてみた。 しかしパッケージが古かったり無かったりするものが多くてよろしくないので、 pkgsrcを導入した。その流れをさっとまとめておく。

pkg install git
pkg install gcc
pkg install system/header
zfs create -o mountpoint=legacy rpool/netbsd
zfs create -o mountpoint=/usr/pkg rpool/netbsd/pkg
zfs create -o mountpoint=/usr/pkgsrc rpool/netbsd/pkgsrc
git clone https://github.com/jsonn/pkgsrc /usr/pkgsrc
cd /usr/pkgsrc/bootstrap
./bootstrap.sh --prefix=/usr/pkg

bootstrapを開始して数分、以下のようなエラーが発生。

checking how to run the C preprocessor... cpp
configure: error: in `/usr/pkgsrc/bootstrap/work/wrk/devel/bmake/work/SunOS':
configure: error: C preprocessor "cpp" fails sanity check
See `config.log' for more details.
*** Error code 1

config.logを見たところ、/usr/gcc/binにPATHが通っていないので、 cppを見つけられずにコケている模様。 gcc自体には/usr/bin/gccにシンボリックリンクが張られていたので気が付かなかった。

rm -rf ./work /usr/pkg/* /var/db/pkg
PATH=$PATH:/usr/gcc/4.5/bin ./bootstrap --prefix=/usr/pkg

これでbootstrapは通った。

nbpatchがコケる

bootstrapが完了したので、早速tmuxあたりをインストールしてみることにしたのだが、 早速コケてしまった。libtoolにpatchを当てる際にnbpatchがエラー終了している様子。

miku@iroha:/usr/pkgsrc/devel/libtool$ sudo bmake 
=> Bootstrap dependency digest>=20010302: found digest-20111104
===> Checking for vulnerabilities in libtool-2.2.6b
===> Installing dependencies for libtool-2.2.6b
=> Build dependency nbpatch-[0-9]*: found nbpatch-20100124
=> Full dependency libtool-base-2.2.6b{,nb[0-9]*}: NOT found
=> Verifying package-install for ../../devel/libtool-base
=> Bootstrap dependency digest>=20010302: found digest-20111104
=> Bootstrap dependency tnftp-[0-9]*: found tnftp-20070806
===> Checking for vulnerabilities in libtool-base-2.2.6bnb5
=> Checksum SHA1 OK for libtool-2.2.6b.tar.gz
=> Checksum RMD160 OK for libtool-2.2.6b.tar.gz
===> Installing dependencies for libtool-base-2.2.6bnb5
=> Build dependency nbpatch-[0-9]*: found nbpatch-20100124
===> Overriding tools for libtool-base-2.2.6bnb5
===> Extracting for libtool-base-2.2.6bnb5
===> Patching for libtool-base-2.2.6bnb5
=> Applying pkgsrc patches for libtool-base-2.2.6bnb5
patch: **** too many file arguments
Patch /usr/pkgsrc/devel/libtool-base/../libtool/patches/patch-aa failed
patch: **** too many file arguments
Patch /usr/pkgsrc/devel/libtool-base/../libtool/patches/patch-ab failed
patch: **** too many file arguments
Patch /usr/pkgsrc/devel/libtool-base/../libtool/patches/patch-ac failed
patch: **** too many file arguments
Patch /usr/pkgsrc/devel/libtool-base/../libtool/patches/patch-ad failed
ERROR: Patching failed due to modified or broken patch file(s):
ERROR:  /usr/pkgsrc/devel/libtool-base/../libtool/patches/patch-aa
ERROR:  /usr/pkgsrc/devel/libtool-base/../libtool/patches/patch-ab
ERROR:  /usr/pkgsrc/devel/libtool-base/../libtool/patches/patch-ac
ERROR:  /usr/pkgsrc/devel/libtool-base/../libtool/patches/patch-ad
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/devel/libtool-base
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/devel/libtool-base
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/devel/libtool

sudo bmake PATCH_DEBUG=1 PKG_VERBOSE=1 PKG_DEBUG=yes PKG_DEBUG_LEVEL=2した場合のエラー部分はこんな感じ。

+ patches=/usr/pkgsrc/devel/libtool-base/../libtool/patches/patch-*
+ test -f /usr/pkgsrc/devel/libtool-base/../libtool/patches/patch-aa
+ test ! -f /usr/pkgsrc/devel/libtool-base/../libtool/distinfo
+ echo => Verifying /usr/pkgsrc/devel/libtool-base/../libtool/patches/patch-aa
=> Verifying /usr/pkgsrc/devel/libtool-base/../libtool/patches/patch-aa
+ /usr/bin/env DIGEST=/usr/pkg/bin/digest CAT=/usr/bin/cat ECHO=echo SED=/usr/gnu/bin/sed TEST=test /usr/pkg/bin/pdksh /usr/pkgsrc/mk/checksum/check
sum -p /usr/pkgsrc/devel/libtool-base/../libtool/distinfo /usr/pkgsrc/devel/libtool-base/../libtool/patches/patch-aa
+ > /dev/null 
+ 2>&1 
+ cksum_result=0
+ echo => Applying pkgsrc patch /usr/pkgsrc/devel/libtool-base/../libtool/patches/patch-aa
=> Applying pkgsrc patch /usr/pkgsrc/devel/libtool-base/../libtool/patches/patch-aa
+ fuzz_flags=
+ /usr/pkg/bin/nbpatch -v
+ > /dev/null 
+ 2>&1 
+ fuzz_flags=-F0
+ /usr/pkg/bin/nbpatch -F0 -d /usr/pkgsrc/devel/libtool-base/work/libtool-2.2.6b -E -p0 -V simple -z .orig
+ < /usr/pkgsrc/devel/libtool-base/../libtool/patches/patch-aa 
patch: **** too many file arguments
+ echo Patch /usr/pkgsrc/devel/libtool-base/../libtool/patches/patch-aa failed
Patch /usr/pkgsrc/devel/libtool-base/../libtool/patches/patch-aa failed
+ fail= /usr/pkgsrc/devel/libtool-base/../libtool/patches/patch-aa

他のパッケージでもnbpatchがエラーを吐いてコケてしまいまったくビルドが通らない。 さてどうしたらいいものか...

1 件のコメント:

  1. Interix 6.x で起きてるのと、同じ問題かもしれん。
    http://gnats.netbsd.org/42379

    返信削除