FreeBSD 4.11-RELEASE への Java インストール
参考:
http://www.jp.freebsd.org/QandA/HTML/2611.html
(Java2 SDK 1.3 の話だけど)
<はじめに>
なんと、JDK 1.4 を ports からインストールするには 1.5GB のディスクの空容量が必要なんだそうな!!
今回インストールを行った FLORA 270SX の空容量は 1.7GB。ぎりぎりだなあと思いつつも「ま、1.5GB あれば良いと言うし・・・」と make を始めたところ、まさに地獄。ええ、地獄を見たのでありますよ。
何せ、JDK 1.4 もでかいが、依存関係にあり同時にインストールされるプログラムたちも皆でかい。あっという間にディスクを使いきってしまったのでした。
それからは手作業で「必要ないんじゃないかな・・・?」と思われるファイルを消しつつのインストール。
疲れました・・・。(ま、どうにかこうにか成功したからいいけどね)
つーことで、しょぼいマシンに JDK を入れようと思っているチャレンジャーは、心してかかるように。
まず、最新の ports を展開。
JDK は、SUN のサイトでユーザー登録をしてソースファイルなどを取ってこないといけないので、package 化はされていないわけだ。で、こういう時、FreeBSD なら ports が便利。
akebi# ls -la
total 26896
drwxr-xr-x 17 root wheel 512 Apr 18 13:38 .
drwxr-xr-x 16 root wheel 512 Apr 16 18:16 ..
drwxr-xr-x 11 root wheel 512 Apr 16 18:04 X11R6
drwxr-xr-x 2 root wheel 7168 Apr 16 18:02 bin
drwxr-xr-x 3 root wheel 512 Apr 16 18:12 compat
drwxr-xr-x 3 root wheel 512 Apr 16 18:09 games
drwxr-xr-x 3 root wheel 512 Apr 16 18:16 home
drwxr-xr-x 41 root wheel 3584 Jan 22 02:22 include
drwxr-xr-x 4 root wheel 5120 Jan 22 02:22 lib
drwxr-xr-x 9 root wheel 512 Apr 16 17:57 libdata
drwxr-xr-x 8 root wheel 1536 Apr 16 18:03 libexec
drwxr-xr-x 15 root wheel 512 Apr 18 12:52 local
drwxr-xr-x 2 root wheel 512 Apr 16 18:09 obj
drwxr-xr-x 64 100 100 1536 Apr 16 10:10 ports
-rw-r--r-- 1 root wheel 27472829 Apr 18 13:37 ports.tar.gz
drwxr-xr-x 2 root wheel 4096 Apr 16 18:03 sbin
drwxr-xr-x 27 root wheel 512 Apr 16 18:09 share
drwxr-xr-x 3 root wheel 512 Apr 16 18:01 src
jdk14 の make install を行う。
akebi# cd /usr/ports/java/jdk14
akebi# ls -la
total 72
drwxr-xr-x 3 100 100 512 Mar 31 10:13 .
drwxr-xr-x 141 100 100 3072 Mar 15 10:26 ..
-rw-r--r-- 1 100 100 11638 Mar 31 10:13 Makefile
-rw-r--r-- 1 100 100 329 Dec 18 10:40 distinfo
drwxr-xr-x 2 100 100 512 Dec 18 10:40 files
-rw-r--r-- 1 100 100 537 Nov 12 2003 pkg-descr
-rw-r--r-- 1 100 100 48771 Jan 29 2004 pkg-message
akebi# make install
===> jdk-1.4.2p7 :
The source distribution exists on your system, but due to
licensing restrictions you still need to download the
patchset, bsd-jdk14-patches-7.tar.gz, from
http://www.eyesbeyond.com/freebsddom/java/jdk14.html.
Please place the patchset in /usr/ports/distfiles.
.akebi#
いきなり終わった。
先に、http://www.eyesbeyond.com/freebsddom/java/jdk14.html から bsd-jdk14-patches-7.tar.gz を取ってきて、/usr/ports/distfiles にセットしとかんかい・・・と怒られてます。
akebi# cd /usr/ports/distfiles
/usr/ports/distfiles: No such file or directory.
akebi# mkdir /usr/ports/distfiles
akebi# cd /usr/ports/distfiles
akebi# lynx http://www.eyesbeyond.com/freebsddom/java/jdk14.html
「download the latest BSD JDK 1.4.2 patchset.」のリンクをクリック
↓
http://www.eyesbeyond.com/freebsddom/java/JDK14SCSLConfirm.html
↓
「ACCEPT」ボタンを押すなり
↓
これで、bsd-jdk14-patches-7.tar.gz がダウンロードされる。
akebi# ls -la
total 1140
drwxr-xr-x 2 root 100 512 Apr 18 13:53 .
drwxr-xr-x 65 100 100 1536 Apr 18 13:50 ..
-rw-r--r-- 1 root 100 1137785 Apr 18 13:53 bsd-jdk14-patches-7.tar.gz
よし、ダウンロードできた。
akebi# cd /usr/ports/java/jdk14
akebi# make install
===> jdk-1.4.2p7 :
Because of licensing restrictions, you must fetch the source distribution
manually. Please access http://www.sun.com/software/java2/download.html
with a web browser and follow the "Download" link for the
"Java(TM) SDK 1.4.2". You will be required to log in and register,
but you can create an account on this page. After registration and
accepting the Sun Community Source License, select "J2SESDK" and
download the source file, j2sdk-1_4_2-bin-scsl.zip. Please place this file in
/usr/ports/distfiles.
う〜む・・・またかよ。
今度は、「SUN のサイトに行って、レジストしてこんかい!!」ってこと?
Lynx じゃ無理かも。
仕方ないので、Windows 機から InternetExplorer でアクセスしてみる。
以前、shinoda@naf というユーザーで登録していたので、こいつでログイン。
無事、j2sdk-1_4_2-bin-scsl.zip をダウンロードできたので、FTP で FreeBSD 機に put。
/usr/ports/distfiles 上に移動して、再度 make install。
akebi# ls -la ~shinoda/j2sdk*
-rw-r--r-- 1 shinoda admin 2513462 Apr 18 14:21 /home/shinoda/j2sdk-1_4_2-bin-scsl.zip
akebi# mv /home/shinoda/j2sdk-1_4_2-bin-scsl.zip /usr/ports/distfiles
akebi# ls -la /usr/ports/distfiles
total 3620
drwxr-xr-x 2 root 100 512 Apr 18 14:22 .
drwxr-xr-x 65 100 100 1536 Apr 18 13:50 ..
-rw-r--r-- 1 root 100 1137785 Apr 18 13:53 bsd-jdk14-patches-7.tar.gz
-rw-r--r-- 1 shinoda admin 2513462 Apr 18 14:21 j2sdk-1_4_2-bin-scsl.zip
akebi# make install
===> jdk-1.4.2p7 :
Because of licensing restrictions, you must fetch the source distribution
manually. Please access http://www.sun.com/software/java2/download.html
with a web browser and follow the "Download" link for the
"Java(TM) SDK 1.4.2". You will be required to log in and register,
but you can create an account on this page. After registration and
accepting the Sun Community Source License, select "J2SESDK" and
download the source file, j2sdk-1_4_2-src-scsl.zip. Please place this file in
/usr/ports/distfiles.
いやん!!今度は src を取ってこいってか!?
よっしゃ、やってやる。やってやるよ、てめぇ。
akebi# ls -la ~shinoda/j2sdk*
-rw-r--r-- 1 shinoda admin 49269919 Apr 18 14:34 /home/shinoda/j2sdk-1_4_2-src-scsl.zip
akebi# mv /home/shinoda/j2sdk-1_4_2-src-scsl.zip /usr/ports/distfiles
akebi#
これでどうや!!
akebi# make install
===> Vulnerability check disabled, database not found
LIBC_R TEST PASSED: All Ok
IMPORTANT: To build JDK 1.4.2 port, you should have at least
1.7Gb of free disk space in build area!
Following port compile time options are available:
WITH_DEBUG - install JDK binaries and libraries
with debuging support
MINIMAL - don't build/install mozilla java
plugin, javaws and JDK demos
WITH_IPV6 - enable JDK IPv6 support
===> Extracting for jdk-1.4.2p7
=> Checksum OK for j2sdk-1_4_2-src-scsl.zip.
=> Checksum OK for j2sdk-1_4_2-bin-scsl.zip.
=> Checksum OK for bsd-jdk14-patches-7.tar.gz.
===> jdk-1.4.2p7 depends on executable: zip - found
===> jdk-1.4.2p7 depends on executable: unzip - found
<略>
===> Registering installation for open-motif-2.2.3_1
===> Returning to build of jdk-1.4.2p7
===> jdk-1.4.2p7 depends on file: /usr/local/linux-sun-jdk1.4.2/bin/javac - not found
===> Verifying install for /usr/local/linux-sun-jdk1.4.2/bin/javac in /usr/ports/java/linux-sun-jdk14
===> linux-sun-jdk-1.4.2.08_1 You must manually fetch the J2SE SDK self-extracting file for the Linux platform (j2sdk-1_4_2_08-linux-
i586.bin) from http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=j2sdk-1.4.2_08-oth-JPR&SiteId=JSC&TransactionId
=noreg, place it in /usr/ports/distfiles and then run make again.
*** Error code 1
Stop in /usr/ports/java/linux-sun-jdk14.
*** Error code 1
Stop in /usr/ports/java/jdk14.
うぎゃぁ、約 50分も make が走ったあげく失敗した。
2sdk-1_4_2_08-linux-i586.bin がいるってこと?手動で取ってこいとか書いてあるのお。
ということで、Windows 機でまたこのファイルを get して FreeBSD 機へ put。
akebi# ls -la ~shinoda/j2sdk*
-rw-r--r-- 1 shinoda admin 36418360 Apr 18 15:41 /home/shinoda/j2sdk-1_4_2_08-linux-i586.bin
akebi# mv /home/shinoda/j2sdk-1_4_2_08-linux-i586.bin /usr/ports/distfiles
どや?
akebi# make install
===> jdk-1.4.2p7 depends on executable: gm4 - found
===> jdk-1.4.2p7 depends on executable: zip - found
===> jdk-1.4.2p7 depends on file: /usr/local/include/nspr/prtypes.h - found
===> jdk-1.4.2p7 depends on file: /usr/X11R6/lib/libXm.so - found
===> jdk-1.4.2p7 depends on file: /usr/local/linux-sun-jdk1.4.2/bin/javac - not found
===> Verifying install for /usr/local/linux-sun-jdk1.4.2/bin/javac in /usr/ports/java/linux-sun-jdk14
======================================================================
Warning: This JDK may be unstable. You are advised to use the native
FreeBSD JDK, in ports/java/jdk14.
This Java VM will attempt to obtain some system information by
accessing files in linux's procfs. You must install the Linux
emulation procfs filesystem for this to work correctly. The JVM
will exhibit various problems otherwise. This can be accomplished
by adding the following line to your /etc/fstab file:
linprocfs /compat/linux/proc linprocfs rw 0 0
and then, as root, executing the commands:
kldload linprocfs
mount /compat/linux/proc
======================================================================
===> Vulnerability check disabled, database not found
===> Extracting for linux-sun-jdk-1.4.2.08_1
<略>
/usr/bin/sed -e 's|%%PREFIX%%|/usr/local|;' -e 's|%%LOCALBASE%%|/usr/local|;' -e 's|%%PORTSDIR%%|/usr/ports|;' /usr/ports/java/java
vmwrapper/src/javavms.5 > /usr/ports/java/javavmwrapper/work/javavms.5
===> Installing for javavmwrapper-2.0_4
===> javavmwrapper-2.0_4 conflicts with installed package(s):
kaffe-1.0.7
They install files into the same place.
Please remove them first with pkg_delete(1).
*** Error code 1
Stop in /usr/ports/java/javavmwrapper.
*** Error code 1
Stop in /usr/ports/java/linux-sun-jdk14.
*** Error code 1
Stop in /usr/ports/java/jdk14.
今度はなんやぁ?
もしかして、pkg_add で kaffe-1.0.7 を先に入れていたことを起こってる?
pkg_delete しろと言うてるなあ。
akebi# pkg_info | grep kaffe
kaffe-1.0.7 Multi-platform Java virtual machine with JIT compiler and A
akebi# pkg_delete kaffe-1.0.7
akebi# make install
===> jdk-1.4.2p7 depends on executable: gm4 - found
===> jdk-1.4.2p7 depends on executable: zip - found
===> jdk-1.4.2p7 depends on file: /usr/local/include/nspr/prtypes.h - found
===> jdk-1.4.2p7 depends on file: /usr/X11R6/lib/libXm.so - found
===> jdk-1.4.2p7 depends on file: /usr/local/linux-sun-jdk1.4.2/bin/javac - not found
===> Verifying install for /usr/local/linux-sun-jdk1.4.2/bin/javac in /usr/ports/java/linux-sun-jdk14
===> Installing for linux-sun-jdk-1.4.2.08_1
===> linux-sun-jdk-1.4.2.08_1 depends on executable: javavm - not found
===> Verifying install for javavm in /usr/ports/java/javavmwrapper
===> Installing for javavmwrapper-2.0_4
===> Generating temporary packing list
===> Checking if java/javavmwrapper already installed
<略>
fi
Segmentation fault (core dumped)
gmake[4]: *** [.compile.classlist] Error 139
gmake[4]: Leaving directory `/usr/ports/java/jdk14/work/deploy/make/plugin/converter'
gmake[3]: *** [optimized] Error 2
gmake[3]: Leaving directory `/usr/ports/java/jdk14/work/deploy/make/plugin/converter'
gmake[2]: *** [converter] Error 2
gmake[2]: Leaving directory `/usr/ports/java/jdk14/work/deploy/make/plugin'
gmake[1]: *** [plugin-all] Error 2
gmake[1]: Leaving directory `/usr/ports/java/jdk14/work/deploy/make'
gmake: *** [deploy-build] Error 2
*** Error code 2
Stop in /usr/ports/java/jdk14.
うぎゃあ。9時間くらい走った挙げ句に落ちやがった。
原因はディスクの空き容量がなくなったから?
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad0s1a 516062 36660 438118 8% /
/dev/ad0s1e 257998 1300 236060 1% /tmp
/dev/ad0s1g 3134392 2899334 -15692 101% /usr ← うぎゃあ
/dev/ad0s1f 516062 233050 241728 49% /var
procfs 4 4 0 100% /proc
/usr/ports の下を整理して、容量をあけて再チャレンジ。
akebi# df -k
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad0s1a 516062 36660 438118 8% /
/dev/ad0s1e 257998 1482 235878 1% /tmp
/dev/ad0s1g 3134392 2627762 255880 91% /usr
/dev/ad0s1f 516062 309212 165566 65% /var
procfs 4 4 0 100% /proc
akebi# make install
===> jdk-1.4.2p7 :
Because of licensing restrictions, you must fetch the source distribution
manually. Please access http://www.sun.com/software/java2/download.html
with a web browser and follow the "Download" link for the
"Java(TM) SDK 1.4.2". You will be required to log in and register,
but you can create an account on this page. After registration and
accepting the Sun Community Source License, select "J2SESDK" and
download the source file, j2sdk-1_4_2-src-scsl.zip. Please place this file in
/usr/ports/distfiles.
ああ、/var 以下に移動したので、シンボリックリンクをはっとかなきゃ。
akebi# ls -la /usr/ports/distfiles
total 9098
drwxr-xr-x 5 root 100 512 Apr 18 22:25 .
drwxr-xr-x 59 100 100 1536 Apr 19 08:37 ..
-rw-r--r-- 1 root 100 259210 Oct 14 2003 autoconf-000227.tar.bz2
-rw-r--r-- 1 root 100 375060 Jul 28 2002 automake-1.4-p6.tar.gz
-rw-r--r-- 1 root 100 1137785 Apr 18 13:53 bsd-jdk14-patches-7.tar.gz
-rw-r--r-- 1 shinoda admin 2513462 Apr 18 14:21 j2sdk-1_4_2-bin-scsl.zip
-rw-r--r-- 1 root 100 538884 May 28 2000 libtool-1.3.5.tar.gz
-rw-r--r-- 1 root 100 383347 Mar 31 21:06 m4-1.4.3.tar.gz
-rw-r--r-- 1 root 100 920645 Oct 4 2002 make-3.80.tar.bz2
-rw-r--r-- 1 root 100 1324075 Dec 24 2003 nspr-4.4.1.tar.gz
drwxr-xr-x 2 root 100 512 Apr 18 14:43 openmotif
drwxr-xr-x 3 root 100 512 Apr 18 15:54 rpm
-rw-r--r-- 1 root 100 1646191 Sep 14 2000 rpm-3.0.6.tar.gz
drwxr-xr-x 2 root 100 512 Apr 18 15:20 xc
akebi# ls -la /var/ports
total 83732
drwxr-xr-x 2 root wheel 512 Apr 18 22:25 .
drwxr-xr-x 26 root wheel 512 Apr 19 00:31 ..
-rw-r--r-- 1 shinoda admin 49269919 Apr 18 14:34 j2sdk-1_4_2-src-scsl.zip
-rw-r--r-- 1 shinoda admin 36418360 Apr 18 15:41 j2sdk-1_4_2_08-linux-i586.bin
akebi# ln -s /var/ports/j2sdk-1_4_2-src-scsl.zip /usr/ports/distfiles
akebi# ln -s /var/ports/j2sdk-1_4_2_08-linux-i586.bin /usr/ports/distfiles
akebi# ls -la /usr/ports/distfiles
total 9098
drwxr-xr-x 5 root 100 512 Apr 19 08:39 .
drwxr-xr-x 59 100 100 1536 Apr 19 08:37 ..
-rw-r--r-- 1 root 100 259210 Oct 14 2003 autoconf-000227.tar.bz2
-rw-r--r-- 1 root 100 375060 Jul 28 2002 automake-1.4-p6.tar.gz
-rw-r--r-- 1 root 100 1137785 Apr 18 13:53 bsd-jdk14-patches-7.tar.gz
-rw-r--r-- 1 shinoda admin 2513462 Apr 18 14:21 j2sdk-1_4_2-bin-scsl.zip
lrwxr-xr-x 1 root 100 35 Apr 19 08:38 j2sdk-1_4_2-src-scsl.zip -> /var/ports/j2sdk-1_4_2-src-scsl.zip
lrwxr-xr-x 1 root 100 40 Apr 19 08:39 j2sdk-1_4_2_08-linux-i586.bin -> /var/ports/j2sdk-1_4_2_08-linux-i586.bin
-rw-r--r-- 1 root 100 538884 May 28 2000 libtool-1.3.5.tar.gz
-rw-r--r-- 1 root 100 383347 Mar 31 21:06 m4-1.4.3.tar.gz
-rw-r--r-- 1 root 100 920645 Oct 4 2002 make-3.80.tar.bz2
-rw-r--r-- 1 root 100 1324075 Dec 24 2003 nspr-4.4.1.tar.gz
drwxr-xr-x 2 root 100 512 Apr 18 14:43 openmotif
drwxr-xr-x 3 root 100 512 Apr 18 15:54 rpm
-rw-r--r-- 1 root 100 1646191 Sep 14 2000 rpm-3.0.6.tar.gz
drwxr-xr-x 2 root 100 512 Apr 18 15:20 xc
akebi# make install
===> Building for jdk-1.4.2p7
ERROR: You have to have LINPROCFS mounted before
starting to build of native JDK 1.4.2.
You may do it by following set of commands:
# kldload linprocfs
and
# mount -t linprocfs linprocfs /compat/linux/proc
*** Error code 1
Stop in /usr/ports/java/jdk14.
akebi# ls -la /compat
lrwxr-xr-x 1 root wheel 10 Apr 16 18:09 /compat -> usr/compat
akebi# ls -la /usr/compat/linux
total 16
drwxr-xr-x 8 root wheel 512 Apr 16 18:15 .
drwxr-xr-x 3 root wheel 512 Apr 16 18:12 ..
drwxr-xr-x 2 root wheel 1024 Apr 16 18:13 bin
drwxr-xr-x 8 root wheel 1024 Apr 18 15:54 etc
drwxr-xr-x 2 root wheel 2048 Apr 16 18:13 lib
drwxr-xr-x 2 root wheel 512 Apr 16 18:13 sbin
drwxr-xr-x 9 root wheel 512 Apr 18 15:54 usr
drwxr-xr-x 4 root wheel 512 Apr 16 18:15 var
linprocfs を /compat/linux/proc にマウントしろと出ているが proc というディレクトリは無い。
akebi# pkg_info | grep linux
linux-XFree86-libs-4.3.99.902_2 XFree86 libraries, Linux binary
linux-expat-1.95.5_2 Linux/i386 binary port of Expat XML-parsing library
linux-fontconfig-2.1_2 Linux/i386 binary of Fontconfig
linux-sun-jdk-1.4.2.08_1 Sun Java Development Kit 1.4 for Linux
linux_base-8-8.0_4 Base set of packages needed in Linux mode (only for i386)
もう一度 ports で linux_base-8-8.0_4 のインストールをしてみる。
(pkg_info で見るとちゃんと入ってるんだけどなあ)
akebi# cd /usr/ports/emulators/linux_base-8/
akebi# ls -la
total 26
drwxr-xr-x 3 100 100 512 Mar 16 10:18 .
drwxr-xr-x 128 100 100 2560 Mar 16 10:18 ..
-rw-r--r-- 1 100 100 5048 Mar 16 10:18 Makefile
-rw-r--r-- 1 100 100 4470 Jan 1 10:22 distinfo.i386
drwxr-xr-x 2 100 100 512 Jul 30 2003 files
-rw-r--r-- 1 100 100 415 Nov 21 2003 pkg-descr
-rw-r--r-- 1 100 100 1039 Jan 1 10:22 pkg-install
-rw-r--r-- 1 100 100 393 Sep 30 2003 pkg-message
akebi# make install clean
===> Vulnerability check disabled, database not found
=> redhat-release-8.0-8.noarch.rpm doesn't seem to exist in /usr/ports/distfiles/rpm/i386/8.0.
=> Attempting to fetch from http://mirrors.usc.edu/pub/linux/distributions/redhat/redhat/linux/8.0/en/os/i386/RedHat/RPMS/.
redhat-release-8.0-8.noarch.rpm 100% of 382 kB 121 kBps
<略>
libgcc-3.2-7.i386.rpm
freetype-2.1.5-0.ximian.5.1.i386.rpm
zlib-1.1.4-8.8x.i386.rpm
kern.fallback_elf_brand: 3 -> -1
install -c -m 644 /usr/ports/emulators/linux_base-8/files/yp.conf /usr/ports/emulators/linux_base-8/work/linux_base-8-8.0/etc
/usr/bin/touch /usr/ports/emulators/linux_base-8/work/linux_base-8-8.0/etc/mtab
echo -e '/lib\n/usr/lib\n/usr/X11R6/lib' > /usr/ports/emulators/linux_base-8/work/linux_base-8-8.0/etc/ld.so.conf
/bin/rm -f /usr/ports/emulators/linux_base-8/work/pkg-plist
cd /usr/ports/emulators/linux_base-8/work/linux_base-8-8.0 && /usr/bin/find -s . -type f -o -type l | /usr/bin/cut -c3-999 >> /usr/po
rts/emulators/linux_base-8/work/pkg-plist && /usr/bin/find -d * -type d | /usr/bin/sed -e 's:^:@dirrm :' >> /usr/ports/emulators/linu
x_base-8/work/pkg-plist
===> Generating temporary packing list
===> Checking if emulators/linux_base-8 already installed
===> An older version of emulators/linux_base-8 is already installed (linux_base-8-8.0_4)
You may wish to ``make deinstall'' and install this port again
by ``make reinstall'' to upgrade it properly.
If you really wish to overwrite the old port of emulators/linux_base-8
without deleting it first, set the variable "FORCE_PKG_REGISTER"
in your environment or the "make install" command line.
*** Error code 1
Stop in /usr/ports/emulators/linux_base-8.
一旦、make deinstall して、今入ってる linux_base を消してからやりなおせ・・・と言うてはるのかなぁ?
akebi# make deinstall
===> Deinstalling for emulators/linux_base-8
===> Deinstalling linux_base-8-8.0_4
pkg_delete: package 'linux_base-8-8.0_4' is required by these other packages
and may not be deinstalled (but I'll delete it anyway):
linux-expat-1.95.5_2
linux-fontconfig-2.1_2
linux-XFree86-libs-4.3.99.902_2
linux-sun-jdk-1.4.2.08_1
pkg_delete: '/compat/linux/etc/ld.so.cache' fails original MD5 checksum - deleted anyway.
<略>
pkg_delete: unable to completely remove directory '/compat/linux/var/spool/repackage'
pkg_delete: file '/compat/linux/var/spool' doesn't really exist
pkg_delete: unable to completely remove directory '/compat/linux/var/spool'
pkg_delete: file '/compat/linux/var/yp' doesn't really exist
pkg_delete: unable to completely remove directory '/compat/linux/var/yp'
pkg_delete: couldn't entirely delete package (perhaps the packing list is
incorrectly specified?)
akebi# make install clean
===> Installing for linux_base-8-8.0_6
kern.fallback_elf_brand: -1 -> 3
redhat-release-8.0-8.noarch.rpm
glibc-common-2.3.2-4.80.8.i386.rpm
<略>
rpm-3.0.6_9: "/usr/ports/devel/gmake" non-existent -- dependency list incomplete
rpm-3.0.6_9: "/usr/ports/devel/automake14" non-existent -- dependency list incomplete
rpm-3.0.6_9: "/usr/ports/devel/autoconf213" non-existent -- dependency list incomplete
rpm-3.0.6_9: "/usr/ports/devel/libtool13" non-existent -- dependency list incomplete
rpm-3.0.6_9: "/usr/ports/devel/popt" non-existent -- dependency list incomplete
rpm-3.0.6_9: "/usr/ports/devel/gettext" non-existent -- dependency list incomplete
===> Cleaning for rpm-3.0.6_9
===> Cleaning for linux_base-8-8.0_6
何か、ディスク容量を稼ぐために /usr/ports/devel 以下を全て消したためか、non-existent がやたら出てるけどええんかいのお?
akebi# ls -la /compat/linux/
total 22
drwxr-xr-x 11 root wheel 512 Apr 19 09:07 .
drwxr-xr-x 3 root wheel 512 Apr 16 18:12 ..
drwxr-xr-x 2 root wheel 1024 Apr 19 09:04 bin
drwxr-xr-x 13 root wheel 1024 Apr 19 09:07 etc
drwxr-xr-x 3 root wheel 2048 Apr 19 09:04 lib
drwxr-xr-x 2 root wheel 512 Jun 24 2002 mnt
drwxr-xr-x 2 root wheel 512 Aug 24 1999 opt
drwxr-xr-x 2 root wheel 512 Feb 7 1996 proc
drwxr-xr-x 2 root wheel 512 Apr 19 09:04 sbin
drwxr-xr-x 13 root wheel 512 Apr 19 09:07 usr
drwxr-xr-x 14 root wheel 512 Apr 19 09:07 var
一応、/compat/linux/proc もできているが・・・
akebi# pwd
/usr/ports/emulators/linux_base-8
akebi# cd /usr/ports/java/jdk14
akebi# make install
===> Building for jdk-1.4.2p7
ERROR: You have to have LINPROCFS mounted before
starting to build of native JDK 1.4.2.
You may do it by following set of commands:
# kldload linprocfs
and
# mount -t linprocfs linprocfs /compat/linux/proc
*** Error code 1
Stop in /usr/ports/java/jdk14.
ありゃりゃ?
手動で mount しろってこと?
akebi# kldload linprocfs
akebi# mount -t linprocfs linprocfs /compat/linux/proc
akebi# df -k
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad0s1a 516062 36660 438118 8% /
/dev/ad0s1e 257998 1496 235864 1% /tmp
/dev/ad0s1g 3134392 2595302 288340 90% /usr
/dev/ad0s1f 516062 309224 165554 65% /var
procfs 4 4 0 100% /proc
linprocfs 4 4 0 100% /usr/compat/linux/proc
akebi# make install
===> Building for jdk-1.4.2p7
# Start of jdk build
bsd i586 1.4.2-p7 build started: 05-04-19 10:55
if [ -r ./../../deploy/make/Makefile ]; then \
( cd ./../../deploy/make; gmake sanity EXTERNALSANITYCONTROL=true CONTROL_TOPDIR=/usr/ports/java/jdk14/work/control CONTROL_TOPDIR_
NAME=control ALT_OUTPUTDIR=/usr/ports/java/jdk14/work/control/build/bsd-i586 ARCH_DATA_MODEL=32 MILESTONE=p7 BUILD_NUMBER=shinoda_19_
apr_2005_10_55 ; ); \
<略>
gmake[3]: Leaving directory `/usr/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/tmp/bsd_i486_compiler2/product'
All done.
gmake[2]: Leaving directory `/usr/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/tmp/bsd_i486_compiler2/product'
gmake[1]: Leaving directory `/usr/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/tmp'
/bin/mkdir -p /usr/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/server
mkdir: /usr/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/server: File exists
gmake: *** [/usr/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/server] Error 1
*** Error code 2
Stop in /usr/ports/java/jdk14.
ありゃりゃ。今度は /usr/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/server が File exists じゃっつって落ちたで。rm -r してからやり直してみる。
akebi# ls -la /usr/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/server
lrwxr-xr-x 1 root wheel 11 Apr 18 23:28 /usr/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/server -> /var/server
akebi# rm /usr/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/server
akebi# rm -r /var/server
rm: /var/server: No such file or directory
akebi# make install
===> Building for jdk-1.4.2p7
# Start of jdk build
bsd i586 1.4.2-p7 build started: 05-04-19 10:59
if [ -r ./../../deploy/make/Makefile ]; then \
<略>
/bin/ln -s ../libjsig.so /usr/ports/java/jdk14/work/control/build/bsd-i586/lib/i386/client/libjsig.so
ln: /usr/ports/java/jdk14/work/control/build/bsd-i586/lib/i386/client/libjsig.so: File exists
gmake[4]: *** [/usr/ports/java/jdk14/work/control/build/bsd-i586/lib/i386/client/libjsig.so] Error 1
gmake[4]: Leaving directory `/usr/ports/java/jdk14/work/j2se/make/java/redist'
gmake[3]: *** [optimized] Error 2
gmake[3]: Leaving directory `/usr/ports/java/jdk14/work/j2se/make/java/redist'
gmake[2]: *** [all] Error 1
gmake[2]: Leaving directory `/usr/ports/java/jdk14/work/j2se/make/java'
gmake[1]: *** [all] Error 1
gmake[1]: Leaving directory `/usr/ports/java/jdk14/work/j2se/make'
gmake: *** [j2se-build] Error 2
*** Error code 2
ありゃりゃ、client も一旦消さんと駄目か。
akebi# rm /usr/ports/java/jdk14/work/control/build/bsd-i586/lib/i386/client
akebi# rm -r /var/client
akebi# make install
===> Building for jdk-1.4.2p7
# Start of jdk build
bsd i586 1.4.2-p7 build started: 05-04-19 11:04
if [ -r ./../../deploy/make/Makefile ]; then \
<略>
gmake[2]: Entering directory `/var/deploy/make/plugin'
../../make/plugin/common/Defs.gmk:33: ../../../j2se/make/common/Defs.gmk: No such file or directory
../../../j2se/make: not found
/var/deploy/make/plugin: permission denied
Syntax error: ";" unexpected
/usr/lib: permission denied
/var/deploy/make/plugin: permission denied
Syntax error: ";" unexpected
Syntax error: ";" unexpected
gmake[2]: *** No rule to make target `../../../j2se/make/common/Defs.gmk'. Stop.
gmake[2]: Leaving directory `/var/deploy/make/plugin'
gmake[1]: *** [plugin-all] Error 2
gmake[1]: Leaving directory `/var/deploy/make'
gmake: *** [deploy-build] Error 2
*** Error code 2
Stop in /usr/ports/java/jdk14.
work/deploy を /var に移したのがまずかったんかいのお?
akebi# pwd
/usr/ports/java/jdk14
akebi# ls -la work
total 3824
drwxr-xr-x 7 root wheel 1024 Apr 19 00:07 .
drwxr-xr-x 4 100 100 512 Apr 19 08:40 ..
-rw-r--r-- 1 root wheel 0 Apr 18 15:57 .configure_done.jdk-1.4.2p7._usr_local
-rw-r--r-- 1 root wheel 0 Apr 18 14:38 .extract_done.jdk-1.4.2p7._usr_local
-rw-r--r-- 1 root wheel 0 Apr 18 14:38 .patch_done.jdk-1.4.2p7._usr_local
-rw------- 1 1000 staff 4323 Dec 10 06:49 BUILD
-rw-r--r-- 1 root wheel 4450 Sep 11 2003 BinaryLicense.txt
-rw-r--r-- 1 1000 wheel 392744 Dec 10 01:07 ChangeLog.gz
-rw------- 1 1000 staff 590 Dec 10 01:17 README
-rw-rw-r-- 1 root wheel 4024 Sep 11 2003 README.html
-rw-r--r-- 1 root wheel 48771 Sep 11 2003 SourceLicense.txt
-rw------- 1 1000 staff 4801 Dec 10 14:49 THANKS
-rw-rw-r-- 1 root wheel 15098 Sep 11 2003 build-linux.html
-rw-rw-r-- 1 root wheel 26144 Sep 11 2003 build-solaris.html
-rw-rw-r-- 1 root wheel 14379 Sep 11 2003 build-windows-i586.html
-rw-rw-r-- 1 root wheel 15923 Sep 11 2003 build-windows-ia64.html
-rw-rw-r-- 1 root wheel 7379 Sep 11 2003 build.html
drwxr-xr-x 4 root wheel 512 Apr 18 15:57 control
lrwxr-xr-x 1 root wheel 11 Apr 19 00:07 deploy -> /var/deploy
drwxr-xr-x 4 root wheel 512 Apr 18 14:36 hotspot
drwxr-xr-x 4 root wheel 512 Apr 18 14:36 install
drwxr-xr-x 4 root wheel 512 Apr 18 14:36 j2se
-rw-r--r-- 1 root wheel 2841 Sep 11 2003 javalogo52x88.gif
-rw------- 1 1000 staff 39584 Dec 10 06:48 jdk14-bootstrap-src.tar.gz
-rw-r--r-- 1 1000 staff 3210576 Dec 14 14:18 jdk14.patches
drwxr-xr-x 3 root wheel 512 Apr 18 14:38 motif
-rw-r--r-- 1 1000 staff 56832 Dec 10 01:10 patch-java-dnd-fix
-rw------- 1 1000 staff 678 Dec 10 01:10 patch-pthread_attr_get_np.c
-rw-r--r-- 1 root wheel 980 Sep 11 2003 sunlogo64x30.gif
akebi# rm work/deploy
akebi# cp -rp /var/deploy work
akebi# rm -r /var/deploy
akebi# make install
===> Building for jdk-1.4.2p7
# Start of jdk build
bsd i586 1.4.2-p7 build started: 05-04-19 11:34
<略>
===> Registering installation for jdk-1.4.2p7
realpath: /usr/ports/devel/pkgconfig: No such file or directory
===> SECURITY REPORT:
This port has installed the following files which may act as network
servers and may therefore pose a remote security risk to the system.
/usr/local/jdk1.4.2/jre/javaws/javawsbin
/usr/local/jdk1.4.2/jre/lib/i386/server/libjvm.so
/usr/local/jdk1.4.2/jre/lib/i386/libdt_socket.so
/usr/local/jdk1.4.2/jre/lib/i386/libnio.so
/usr/local/jdk1.4.2/jre/lib/i386/native_threads/libhpi.so
/usr/local/jdk1.4.2/jre/lib/i386/client/libjvm.so
If there are vulnerabilities in these programs there may be a security
risk to the system. FreeBSD makes no guarantee about the security of
ports included in the Ports Collection. Please type 'make deinstall'
to deinstall the port if this is a concern.
For more information, and contact details about the security
status of this software, see the following webpage:
http://www.freebsd.org/java/
ディスク容量を稼ぐために /usr/ports/devel/ とか消してしまってたんで、
===> Registering installation for jdk-1.4.2p7
realpath: /usr/ports/devel/pkgconfig: No such file or directory
とかエラーでてるけどええんかいな?
一応、これでインストールは終了したようだが・・・
akebi# cat > hello.java
class hello {
public static void main (String args[]) {
System.out.println("Hello World!");
}
}
akebi# javac hello.java
akebi# java hello
Hello World!
ああ、問題なく動いているようだが・・・
ま、これでよしとしよう。
ちなみに、/usr/ports/java/jdk14/work の下がそのまま残っているようじゃのお。
もう必要無いので消しちゃう。あと、/var の下に待避してたファイルもね。
akebi# df -k
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad0s1a 516062 36660 438118 8% /
/dev/ad0s1e 257998 1480 235880 1% /tmp
/dev/ad0s1g 3134392 2897576 -13934 100% /usr
/dev/ad0s1f 516062 232104 242674 49% /var
procfs 4 4 0 100% /proc
linprocfs 4 4 0 100% /usr/compat/linux/proc
akebi# rm -r /usr/ports/java/jdk14/work
akebi# rm -r /var/classes
akebi# rm -r /var/sun
akebi# df -k
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad0s1a 516062 36660 438118 8% /
/dev/ad0s1e 257998 1480 235880 1% /tmp
/dev/ad0s1g 3134392 1471024 1412618 51% /usr
/dev/ad0s1f 516062 90250 384528 19% /var
procfs 4 4 0 100% /proc
linprocfs 4 4 0 100% /usr/compat/linux/proc
つーか、一旦 ports 関連を全部消す。
akebi# rm -r /var/ports
akebi# rm -r /usr/ports
akebi# df -k
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad0s1a 516062 36660 438118 8% /
/dev/ad0s1e 257998 1480 235880 1% /tmp
/dev/ad0s1g 3134392 1074418 1809224 37% /usr
/dev/ad0s1f 516062 6522 468256 1% /var
procfs 4 4 0 100% /proc
linprocfs 4 4 0 100% /usr/compat/linux/proc
再起動時に、linprocfs のマウントを自動で行うよう、/etc/fstab を編集。
akebi# vi /etc/fstab
# See the fstab(5) manual page for important information on automatic mounts
# of network filesystems before modifying this file.
#
# Device Mountpoint FStype Options Dump Pass#
/dev/ad0s1b none swap sw 0 0
/dev/ad0s1a / ufs rw 1 1
/dev/ad0s1e /tmp ufs rw 2 2
/dev/ad0s1g /usr ufs rw 2 2
/dev/ad0s1f /var ufs rw 2 2
/dev/acd0c /cdrom cd9660 ro,noauto 0 0
proc /proc procfs rw 0 0
linprocfs /usr/compat/linux/proc linprocfs rw 0 0
さあ、これで全てインストールは終了したで!!念のため再起動やぁ〜!!
・・・としてみたら、最後のトラブルが。
起動中、Linux エミュレータが有効になったところで(Additional ABI support: linux
と表示された後)、
/compat/linux/sbin/ldconfig: /usr/X11R6/lib/libxkbui.so.1 is not a symbolic link
/compat/linux/sbin/ldconfig: /usr/X11R6/lib/libxkbfile.so.1 is not a symbolic link
/compat/linux/sbin/ldconfig: /usr/X11R6/lib/libfontenc.so.1 is not a symbolic link
/compat/linux/sbin/ldconfig: /usr/X11R6/lib/libXvMC.so.1 is not a symbolic link
/compat/linux/sbin/ldconfig: /usr/X11R6/lib/libxXss.so.1 is not a symbolic link
/compat/linux/sbin/ldconfig: /usr/X11R6/lib/libXinerama.so.1 is not a symbolic link
/compat/linux/sbin/ldconfig: /usr/X11R6/lib/libXfontcache.so.1 is not a symbolic link
/compat/linux/sbin/ldconfig: /usr/X11R6/lib/libXRes.so.1 is not a symbolic link
/compat/linux/sbin/ldconfig: /usr/X11R6/lib/libGLw.so.1 is not a symbolic link
/compat/linux/sbin/ldconfig: /usr/X11R6/lib/libFS.so.6 is not a symbolic link
というエラーメッセージが・・・
で、調べてみたところ、確かに /usr/compat/linux/usr/X11R6/lib の下に上記のシンボリックリンクは存在していない。
が、実体は存在しているので、手動でリンクを張ってやる。
akebi# cd /usr/compat/linux/usr/X11R6/lib
akebi# pwd
/usr/compat/linux/usr/X11R6/lib
akebi# ls -la libxkbui.*
-rwxr-xr-x 1 root wheel 13720 Nov 10 05:44 libxkbui.so.1.0
akebi# ln -s libxkbui.so.1.0 libxkbui.so.1
akebi# ls -la libxkbfile*
-rwxr-xr-x 1 root wheel 148813 Nov 10 05:44 libxkbfile.so.1.0
akebi# ln -s libxkbfile.so.1.0 libxkbfile.so.1
akebi# ls -la libfontenc*
-rwxr-xr-x 1 root wheel 27983 Nov 10 05:44 libfontenc.so.1.0
akebi# ln -s libfontenc.so.1.0 libfontenc.so.1
akebi# ls -la libXvMC*
-rwxr-xr-x 1 root wheel 11449 Nov 10 05:44 libXvMC.so.1.0
akebi# ln -s libXvMC.so.1.0 libXvMC.so.1
akebi# ls -la libxXss*
ls: No match.
akebi# ls -la libXinerama*
-rwxr-xr-x 1 root wheel 9430 Nov 10 05:44 libXinerama.so.1.0
akebi# ln -s libXinerama.so.1.0 libXinerama.so.1
akebi# ls -la libXfontcache*
-rwxr-xr-x 1 root wheel 7614 Nov 10 05:44 libXfontcache.so.1.2
akebi# ln -s libXfontcache.so.1.2 libXfontcache.so.1
akebi# ls -la libXRes*
-rwxr-xr-x 1 root wheel 8153 Nov 10 05:44 libXRes.so.1.0
akebi# ln -s libXRes.so.1.0 libXRes.so.1
akebi# ls -la libGLw*
-rwxr-xr-x 1 root wheel 26354 Nov 10 05:44 libGLw.so.1.0
akebi# ln -s libGLw.so.1.0 libGLw.so.1
akebi# ls -la libFS*
-rwxr-xr-x 1 root wheel 52125 Nov 10 05:44 libFS.so.6.0
akebi# ln -s libFS.so.6.0 libFS.so.6
libxXss だけ無いなあ。あ、libXss なのに、libxXss ってしてる。これじゃ駄目だ。(^^;
akebi# ls -la libXss*
-rwxr-xr-x 1 root wheel 10626 Nov 10 05:44 libXss.so.1.0
akebi# ln -s libXss.so.1.0 libXss.so.1
これで、起動時のワーニングは出なくなった。
めでたし、めでたし。(ディスクの容量が十分あれば、make 一発で終わったんだろうなあ・・・(^^;)
そうそう。/etc/rc.conf に linux_enable="YES" を追加しておくのを忘れるな。
(でないと、手動でいちいち kldload linprocfs せんといけませんで)
|
|