Solaris에서 OpenLDAP Compile시 발생하는 Error에 대해서 정리해 보았습니다.
1. Configure 과정 중 BekeleyDB not available
| configure: error: BDB/HDB: BerkeleyDB not available |
위의 에러는 문구에서도 확인 가능하겠지만 Berkeley DB의 경로를 찾지 못하여 발생하는 에러입니다.
조치방법: env CPPFLAGS=”-I/BerkeleyDB_PATH/include” LDFLAGS=”-L/BerkeleyDB_PATH/lib” ./configure
./configure 앞에 CPPFLAGS 와 LDFLAGS를 함께 입력하면 다음 error 를 해결하실수 있습니다.
2. make 과정 중 sigwait 에러
libraries/liblmdb/mdb.c:9057: error: too many arguments to function sigwait'
*** Error code 1 make: Fatal error: Command failed for target dtest’ Current working directory /export/home/jwlee/review/openldap-2.4.45/libraries/liblber *** Error code 1 |
위의 error가 발생하는 이유는 lmdb 소스코드 중 mdb.c 의 9057라인에 있습니다.
에러의 내용을 확인해보면 too many aguments to function 매개변수가 정의된 변수보다 더 많은 양을 받고 있다는 뜻입니다.

mdb.c 의 9057번째 라인의 sigwait를 살펴보면 두가지 매개변수를 받고 있습니다.
sigwait는 OS마다 1개의 매개변수만 받는 OS도 있고 위와 같이 두개를 사용하는 OS(ex Linux계열)도 존재하기 때문에 확인이 필요합니다.
조치 방법: 현재 too many agumnets to fucntion Error가 발생하였다면 &tmp 를 제거하고 매개변수를 &set 만 사용하면 정상 작동하게됩니다.
아래는 solaris 의 sigwait함수 man을 살펴보면 다음과 같습니다.
| #include <signal.h>
/* the Solaris 2.5 version*/ int sigwait(sigset_t *set); |
3. OpenLDAP 의 slapd 기동 중 Killed

OpenLDAP을 기동 시 다음과 같은 에러가 발생이 가능합니다.
|
ld.so.1: slapd: fatal: libdb-5.0.so: open failed: No such file or directory Killed |
libdb-5.0.so (버전마다 뒤의 숫자가 다름) 의 위치를 찾지 못하여 발생하는 에러로 다음과 같이 LD_LIBRARY_PATH를 지정하여 해결할 수 있습니다.
기동 전에 항상 입력해야함으로 /etc/profile에 입력하여 사용 또는 쉘로 작성하여 사용하도록합니다.
(db-5.0.32.NC는 버클리디비 설치파일의 경로입니다.)
조치방법: export LD_LIBRARY_PATH=”/my-path/db-5.0.32.NC/build_unix/.libs”
위와 같이 터미널에 입력 후 다시 OpenLDAP을 기동하면 에러가 해결됩니다.
4. Configure 시 발생하는 Error
OpenLDAP은 설치 전 Configure를 통해 원하는 옵션/모듈을 추가/삭제를 선행 해야합니다.
이 과정에서 필요한 module을 추가 시 그에 맞는 library를 요청 할 수도 있습니다.
그 예로 ./configure –enable-modules 를 보겠습니다.
| ./configure –enable-modules
…… checking ltdl.h usability… yes |
–enable-modules enable dynamic module support
해당 기능을 enable 하고자 위와 같이 configure를 실행시 발생하는 configure: error 입니다.
libtool-ltdl의 위치를 찾지못하는 에러인데, 해당 에러는 libtool-ltdl-devel 라이브러리가
필요한지만 solaris 용 라이브러리는 찾지못한 상태입니다.
(리눅스에서 동일한 에러 발생시 yum 으로 libtool-ltdl-devel 설치 후 패스 가능.)
해당 모듈은 동적모듈을 사용하는 옵션으로 AdminGuid에서는 다음과 같이 사용합니다.
| If your installation uses dynamic modules, you may need to add the relevant moduleload directives to the examples that follow. The name of the module for a backend is usually of the form:
back_<backend name>.la So for example, if you need to load the hdb backend, you would configure moduleload back_hdb.la |

