# Error compiling openldap on 8.1 release



## theregoesbsd (Apr 17, 2012)

OS: 8.1-RELEASE FreeBSD 8.1-RELEASE #0
Berkeley DB: db-5.5.15

I am trying to compile openldap-2.4.30 but it fails with following error when *I* run *make install* step. Please help, TIA.


```
/usr/home/user1/openldap-2.4.30/servers/slapd/back-mdb/../../../libraries/libmdb/mdb.c
 cc -g -O2 -I../../../include -I/usr/home/user1/openldap-2.4.30/include -I.. -I/usr/home/user1/openldap-
2.4.30/servers/slapd/back-mdb/.. -I/usr/home/user1/openldap-2.4.30/servers/slapd/back-mdb/../../../libraries/libmdb -c
 /usr/home/user1/openldap-2.4.30/servers/slapd/back-mdb/../../../libraries/libmdb/mdb.c -o mdb.o
/usr/home/user1/openldap-2.4.30/servers/slapd/back-mdb/../../../libraries/libmdb/mdb.c: In function 'mdb_env_open':
/usr/home/user1/openldap-2.4.30/servers/slapd/back-mdb/../../../libraries/libmdb/mdb.c:2821: error: 'O_DSYNC' undeclared
 (first use in this function)
/usr/home/user1/openldap-2.4.30/servers/slapd/back-mdb/../../../libraries/libmdb/mdb.c:2821: error:
 (Each undeclared identifier is reported only once
/usr/home/user1/openldap-2.4.30/servers/slapd/back-mdb/../../../libraries/libmdb/mdb.c:2821: error:
 for each function it appears in.)
*** Error code 1

Stop in /usr/home/user1/openldap-2.4.30/mybuild/servers/slapd/back-mdb.
*** Error code 1

Stop in /usr/home/user1/openldap-2.4.30/mybuild/servers/slapd.
*** Error code 1

Stop in /usr/home/user1/openldap-2.4.30/mybuild/servers.
*** Error code 1

Stop in /usr/home/user1/openldap-2.4.30/mybuild.
```


----------



## SirDice (Apr 17, 2012)

First, update your base OS, you are a couple of patches behind. 

Second, read the handbook. Handbook: Chapter 5 Installing Applications: Packages and Ports

net/openldap24-server


----------



## theregoesbsd (Apr 17, 2012)

*Sorry, but I cannot use ports*

My machine isn't connected to the internet, is there any other way *I* could apply the patch?

Thanks.


----------

