Solaris 10 6/06 に OpenLDAP をインストールする際の注意点を書いてみた。
| 名称 | バージョン | 備考 |
|---|---|---|
| Solaris x86 | 10 6/06 | |
| OpenLDAP | 2.3.27 | 2006.09.14時点での最新版。 |
CC=gcc CFLAGS=-D_AVL_H LDFLAGS=-L/opt/csw/bdb44/lib -L/opt/csw/lib -R/opt/csw/bdb44/lib -R/opt/csw/lib CPPFLAGS=-I/opt/csw/bdb44/include -I/opt/csw/include
LDFLAGS, CPPFLAGS は、CSWパッケージで入れた BerkeleyDB 4.4 を使用する都合でこのように設定した。
"CFLAGS=-D_AVL_H"を設定しないと、make時に以下のようなエラーが出て失敗した。
Entering subdirectory librewrite
make[2]: Entering directory `/usr/local/src/ldap/openldap-2.3.27/libraries/librewrite'
rm -f version.c
../../build/mkversion -v "2.3.27" librewrite.a > version.c
gcc -g -O2 -I../../include -I../../include -I/opt/csw/bdb44/include -I/opt/csw/include -I/opt/csw/bdb44/include -I/opt/csw/include -c -o config.o config.c
In file included from rewrite-int.h:38,
from config.c:22:
../../include/avl.h:86: error: conflicting types for `avl_insert'
/usr/include/sys/avl.h:154: error: previous declaration of `avl_insert'
../../include/avl.h:92: error: conflicting types for `avl_find'
/usr/include/sys/avl.h:146: error: previous declaration of `avl_find'
make[2]: *** [config.o] Error 1
make[2]: Leaving directory `/usr/local/src/ldap/openldap-2.3.27/libraries/librewrite'
make[1]: *** [all-common] Error 1
make[1]: Leaving directory `/usr/local/src/ldap/openldap-2.3.27/libraries'
make: *** [all-common] Error 1
詳細は以下のサイトを参照
$ ./configure $ make depend $ make $ make test