Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 408001 - net-nds/openldap (2.4.28, 2.4.30): emake dies on libraries/libmdb/mdb.c
Summary: net-nds/openldap (2.4.28, 2.4.30): emake dies on libraries/libmdb/mdb.c
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: Normal normal (vote)
Assignee: Gentoo/BSD Team
Depends on:
Reported: 2012-03-13 09:41 UTC by Dmitri Bogomolov
Modified: 2012-05-25 22:21 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

build.log (build.log,234.16 KB, text/plain)
2012-03-13 09:41 UTC, Dmitri Bogomolov
emerge --info =net-nds/openldap-2.4.28-r1 (,3.46 KB, text/plain)
2012-03-13 09:42 UTC, Dmitri Bogomolov
openldap-2.4.30.ebuild.patch (openldap-2.4.30.ebuild.patch,613 bytes, patch)
2012-03-13 22:04 UTC, Dmitri Bogomolov
Details | Diff
openldap-2.4.28-fdatasync.patch (openldap-2.4.28-fdatasync.patch,362 bytes, patch)
2012-03-13 22:05 UTC, Dmitri Bogomolov
Details | Diff
openldap-2.4.28-libmdb.patch (openldap-2.4.28-libmdb.patch,726 bytes, patch)
2012-03-14 20:10 UTC, Dmitri Bogomolov
Details | Diff
openldap-2.4.30.ebuild.patch (openldap-2.4.30.ebuild.patch,368 bytes, patch)
2012-03-14 20:14 UTC, Dmitri Bogomolov
Details | Diff
alternative openldap-2.4.30.ebuild.patch (openldap-2.4.30.ebuild.patch,405 bytes, patch)
2012-03-19 21:18 UTC, Dmitri Bogomolov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitri Bogomolov 2012-03-13 09:41:28 UTC
Created attachment 305135 [details]

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:
 *, 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"
Comment 1 Dmitri Bogomolov 2012-03-13 09:42:07 UTC
Created attachment 305137 [details]
emerge --info =net-nds/openldap-2.4.28-r1
Comment 2 Dmitri Bogomolov 2012-03-13 22:04:16 UTC
Created attachment 305259 [details, diff]

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:
 *      @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.

#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.
# define MDB_FDATASYNC  fdatasync
Comment 3 Dmitri Bogomolov 2012-03-13 22:05:22 UTC
Created attachment 305261 [details, diff]
Comment 4 Naohiro Aota gentoo-dev 2012-03-13 23:24:59 UTC
Could you send the fdatasync patch to upstream please?
Comment 5 Dmitri Bogomolov 2012-03-14 20:10:57 UTC
Created attachment 305355 [details, diff]

(In reply to comment #4)
> Dmitri,
> Could you send the fdatasync patch to upstream please?

Yes, I've probably sent:
Comment 6 Dmitri Bogomolov 2012-03-14 20:14:00 UTC
Created attachment 305357 [details, diff]

No append-flags, just epatch.
Comment 7 Dmitri Bogomolov 2012-03-19 21:18:34 UTC
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.
Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-05-25 22:21:58 UTC
In 2.4.31