Created attachment 305135 [details] build.log Message tail is: ../../../libraries/libmdb/mdb.c: In function 'mdb_env_open': ../../../libraries/libmdb/mdb.c:2786:14: error: 'O_DSYNC' undeclared (first use in this function) ../../../libraries/libmdb/mdb.c:2786:14: note: each undeclared identifier is reported only once for each function it appears in gmake[3]: *** [mdb.lo] Error 1 gmake[3]: Leaving directory `/var/tmp/portage/net-nds/openldap-2.4.28-r1/work/openldap-2.4.28/servers/slapd/back-mdb' gmake[2]: *** [.backend] Error 1 gmake[2]: Leaving directory `/var/tmp/portage/net-nds/openldap-2.4.28-r1/work/openldap-2.4.28/servers/slapd' gmake[1]: *** [all-common] Error 1 gmake[1]: Leaving directory `/var/tmp/portage/net-nds/openldap-2.4.28-r1/work/openldap-2.4.28/servers' gmake: *** [all-common] Error 1 emake failed * ERROR: net-nds/openldap-2.4.28-r1 failed (compile phase): * emake failed * * Call stack: * ebuild.sh, line 85: Called src_compile * environment, line 3401: Called die * The specific snippet of code: * emake CC="${CC}" AR="${AR}" || die "emake failed"; * * If you need support, post the output of 'emerge --info =net-nds/openldap-2.4.28-r1', * the complete build log and the output of 'emerge -pqv =net-nds/openldap-2.4.28-r1'. * The complete build log is located at '/var/tmp/portage/net-nds/openldap-2.4.28-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-nds/openldap-2.4.28-r1/temp/environment'. * S: '/var/tmp/portage/net-nds/openldap-2.4.28-r1/work/openldap-2.4.28' # emerge -pqv =net-nds/openldap-2.4.28-r1 [ebuild U ] net-nds/openldap-2.4.28-r1 [2.4.25-r1] USE="berkdb crypt experimental overlays ssl syslog tcpd -cxx -debug -gnutls* -icu -iodbc -ipv6 (-kerberos) -minimal -odbc -perl -samba -sasl* (-selinux) -slp -smbkrb5passwd"
Created attachment 305137 [details] emerge --info =net-nds/openldap-2.4.28-r1
Created attachment 305259 [details, diff] openldap-2.4.30.ebuild.patch I installed net-nds/openldap-2.4.30 with this patch (openldap-2.4.28-fdatasync.patch next attachment). There is a hints in libraries/libmdb/mdb.c: 1) * @note If O_DSYNC is undefined but exists in /usr/include, * preferably set some compiler flag to get the definition. * Otherwise compile with the less efficient -DMDB_DSYNC=O_SYNC. 2) #ifdef __APPLE__ #define LOCK_MUTEX_R(env) sem_wait((env)->me_rmutex) #define UNLOCK_MUTEX_R(env) sem_post((env)->me_rmutex) #define LOCK_MUTEX_W(env) sem_wait((env)->me_wmutex) #define UNLOCK_MUTEX_W(env) sem_post((env)->me_wmutex) #define fdatasync(fd) fsync(fd) <<<- /** Function for flushing the data of a file. Define this to fsync * if fdatasync() is not supported. */ #ifndef MDB_FDATASYNC # define MDB_FDATASYNC fdatasync #endif
Created attachment 305261 [details, diff] openldap-2.4.28-fdatasync.patch
Dmitri, Could you send the fdatasync patch to upstream please?
Created attachment 305355 [details, diff] openldap-2.4.28-libmdb.patch (In reply to comment #4) > Dmitri, > Could you send the fdatasync patch to upstream please? Yes, I've probably sent: http://www.openldap.org/its/index.cgi/Incoming?selectid=7209
Created attachment 305357 [details, diff] openldap-2.4.30.ebuild.patch No append-flags, just epatch.
Created attachment 305905 [details, diff] alternative openldap-2.4.30.ebuild.patch As I understand upstream don't like patch in attachment 305355 [details, diff]. And they recommend to use cflags instead. So there is a ebuild patch with only append-flags. I just compiled.
In 2.4.31