Solaris 10 x86(x86-64)

二度と Solaris は触るまいと心に誓ったはずなんだけどな。

sh

#Solaris 10 からは標準で zsh が付属している。
#場所は /usr/sfw/bin/zsh
#/etc/passwd を編集して zsh にすれば、とりあえず真っ当な shell 環境になる。

gcc

#Solaris 10 からは標準で gcc が付属している。
#場所は /usr/sfw/bin/gcc
#こいつで 64bit も可能(gcc 自体は 32bit)。
#ただし libstdc++.la が 32bit も 64bit も 0byte なので、C++ な奴はあらゆる腐る。
#仕方が無いので以下のような感じのファイルを作成する。
/usr/sfw/lib/libstdc++.la
# libstdc++.la - a libtool library file
# Generated by ltmain.sh - GNU libtool 1.4a-GCC3.0 (1.641.2.256 2001/05/28 20:09:07 with GCC-local changes)
#
# Please DO NOT delete this file!
# It is necessary for linking the library.

# The name that we can dlopen(3).
dlname='libstdc++.so.6'

# Names of this library.
library_names='libstdc++.so.6.0.3 libstdc++.so.6 libstdc++.so'

# The name of the static archive.
old_library='libstdc++.a'

# Libraries that this one depends upon.
dependency_libs='-lc -lm -L/usr/sfw/lib -lgcc_s'

# Version information for libstdc++.
current=6
age=0
revision=3

# Is this an already installed library?
installed=yes

# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''

# Directory that this library needs to be installed in:
libdir='/usr/sfw/lib'
/usr/sfw/lib/64/libstdc++.la
# libstdc++.la - a libtool library file
# Generated by ltmain.sh - GNU libtool 1.4a-GCC3.0 (1.641.2.256 2001/05/28 20:09:07 with GCC-local changes)
#
# Please DO NOT delete this file!
# It is necessary for linking the library.

# The name that we can dlopen(3).
dlname='libstdc++.so.6'

# Names of this library.
library_names='libstdc++.so.6.0.3 libstdc++.so.6 libstdc++.so'

# The name of the static archive.
old_library='libstdc++.a'

# Libraries that this one depends upon.
dependency_libs='-L/lib/64 -lc -lm -L/usr/sfw/lib/64 -lgcc_s'

# Version information for libstdc++.
current=6
age=0
revision=3

# Is this an already installed library?
installed=yes

# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''

# Directory that this library needs to be installed in:
libdir='/usr/sfw/lib/64'

make

#Solaris 10 からは標準で GNU make が付属している。
#場所は /usr/sfw/bin/gmake。
#しかしそのままだと腐った make の方が起動してしまう。
#仕方が無いので以下のような感じにする。
# cd /usr/sfw/bin
# ln -s gmake make
# export PATH=/usr/sfw/bin:/usr/ccs/bin:$PATH
あらゆるすべてを /usr/sfw/bin の奴にしてもいいとは思うだけど、
とりあえず ar とか ln とかは /usr/ccs/bin を使うようにしてみた。

libtool

#鬼門。
#/usr/sfw/bin/gcc を使ってコンパイルした奴を /usr/local に突っ込んどけ。
#その後以下のような感じで
# crle -c /var/ld/ld.config -l /usr/local/lib:/usr/sfw/lib:/usr/ccs/lib:/usr/lib:/lib

ここまでで

その辺の奴は ./configure; make; make install 出来るようになるぽ。
いつも心に太陽を。
http://solaris.sunfish.suginami.tokyo.jp/

なページをニラメッコしてた時代を考えれば、
ずいぶんとマシになったものだ。

参考文献

# Solaris 10 の libstdc++.la is not a valid libtool archive のエラーの対処法
http://cl.pocari.org/2006-05-17-4.html

#Solaris/x86-ツール&ライブラリ[1]
http://solaris.it-cafe.jp/tools/tools01.html

#Solaris 10x86に関するページ
http://www.02.246.ne.jp/~torutk/solaris/solaris10_x86.html