Solaris10x86でOpenSSL

IntelSolarisは始めて使いますが、やっぱりいろいろ出てきますね。OpenSSLがmakeできない現象。
OpenSSLの最新(0.9.8j)でこんなエラー発生。

$ ./config shared
(中略)
Configured for solaris64-x86_64-gcc.
$ /usr/local/bin/make
(中略)
gcc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -O3 -Wall -DL_ENDIAN -DMD32_REG_T=int -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM   -c -o cryptlib.o cryptlib.c
cryptlib.c:1: sorry, unimplemented: 64-bit mode not compiled in
make[1]: *** [cryptlib.o] Error 1
make[1]: Leaving directory `/export/home/hoge/openssl/openssl-0.9.8m/crypto'
make: *** [build_crypto] Error 1
$ 

なんだろう。なにかが64-bitではだめよって言ってる模様。ふむぅ。
OpenSSLのconfigはunameで得たシステム情報を同じディレクトリにあるConfigureスクリプトへ渡すラッパみたいで、ここで64bitなんだよーって判断しているみたい。651行めあたり。よって、Configureに直接引数を渡してやってみる。

$ ./Configure solaris-x86-gcc shared
(中略)
Configured for solaris-x86-gcc.
$ /usr/local/bin/make
(中略)
# /usr/local/bin/make install

ってな感じでインストールできました。

っと、でもつかえないですね。

って使ってみるとcore dumpしますね。

$ /usr/local/ssl/bin/openssl 
セグメント例外 (core dumped)
$

そりゃ、そうか。ちょっと試行錯誤しないと。