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
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: Normal normal (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
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: ---


Attachments
build.log (build.log,234.16 KB, text/plain)
2012-03-13 09:41 UTC, Dmitri Bogomolov
Details
emerge --info =net-nds/openldap-2.4.28-r1 (emerge.info-openldap,3.46 KB, text/plain)
2012-03-13 09:42 UTC, Dmitri Bogomolov
Details
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]
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"
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]
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
Comment 3 Dmitri Bogomolov 2012-03-13 22:05:22 UTC
Created attachment 305261 [details, diff]
openldap-2.4.28-fdatasync.patch
Comment 4 Naohiro Aota gentoo-dev 2012-03-13 23:24:59 UTC
Dmitri,
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]
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
Comment 6 Dmitri Bogomolov 2012-03-14 20:14:00 UTC
Created attachment 305357 [details, diff]
openldap-2.4.30.ebuild.patch

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