#35467 closed defect (fixed)
openldap @2.4.31 fails to upgrade on <= Leopard
Reported by: | nonstop.server@… | Owned by: | landonf (Landon Fuller) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.2 |
Keywords: | Cc: | ballapete (Peter "Pete" Dyballa), sasoph@… | |
Port: | openldap |
Description
Port openldap fails to upgrade from version 2.4.21_5 to version 2.4.31_0.
:info:build /usr/bin/gcc-4.0 -pipe -O2 -arch i386 -I../../../include -I../../../include -I.. -I./.. -I./../../../libraries/libmdb -I/opt/local/include -I/opt/local/include/db46 -I/opt/local/include/openssl -DBIND_8_COMPAT -c ./../../../libraries/libmdb/mdb.c -o mdb.o :info:build /bin/sh ../../../libtool --tag=disable-shared --mode=compile /usr/bin/gcc-4.0 -pipe -O2 -arch i386 -I../../../include -I../../../include -I.. -I./.. -I./../../../libraries/libmdb -I/opt/local/include -I/opt/local/include/db46 -I/opt/local/include/openssl -DBIND_8_COMPAT -c ./../../../libraries/libmdb/midl.c :info:build ./../../../libraries/libmdb/mdb.c: In function 'mdb_env_open': :info:build ./../../../libraries/libmdb/mdb.c:2995: error: 'O_DSYNC' undeclared (first use in this function) :info:build ./../../../libraries/libmdb/mdb.c:2995: error: (Each undeclared identifier is reported only once :info:build ./../../../libraries/libmdb/mdb.c:2995: error: for each function it appears in.) :info:build make[3]: *** [mdb.lo] Error 1 :info:build make[3]: *** Waiting for unfinished jobs.... :info:build /usr/bin/gcc-4.0 -pipe -O2 -arch i386 -I../../include -I. -I./slapi -I. -I../../include -I/opt/local/include -I/opt/local/include/db46 -I/opt/local/include/openssl -DBIND_8_COMPAT -c -o backglue.o backglue.c :info:build /usr/bin/gcc-4.0 -pipe -O2 -arch i386 -I../../../include -I../../../include -I.. -I./.. -I./../../../libraries/libmdb -I/opt/local/include -I/opt/local/include/db46 -I/opt/local/include/openssl -DBIND_8_COMPAT -c ./../../../libraries/libmdb/midl.c -o midl.o :info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_openldap/openldap/work/openldap-2.4.31/servers/slapd/back-mdb' :info:build make[2]: *** [.backend] Error 1 :info:build make[2]: *** Waiting for unfinished jobs.... :info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_openldap/openldap/work/openldap-2.4.31/servers/slapd' :info:build make[1]: *** [all-common] Error 1 :info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_openldap/openldap/work/openldap-2.4.31/servers' :info:build make: *** [all-common] Error 1 :info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_openldap/openldap/work/openldap-2.4.31' :info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_openldap/openldap/work/openldap-2.4.31" && /usr/bin/make -j2 -w all :info:build Exit code: 2 :error:build org.macports.build for port openldap returned: command execution failed
Version Information:
Mac OS Version: Darwin 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 Xcode Version: Xcode 3.1.4 Component versions: DevToolsCore-1204.0; DevToolsSupport-1186.0 BuildVersion: 9M2809 Macports Version: Version: 2.1.2
Attachments (3)
Change History (10)
Changed 12 years ago by nonstop.server@…
comment:1 follow-up: 2 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | landonf@… removed |
---|---|
Owner: | changed from macports-tickets@… to landonf@… |
comment:2 Changed 12 years ago by nonstop.server@…
Replying to ryandesign@…:
Deactivating the old openldap before upgrading did not solve the problem, so it does not seem to be specific to upgrading.
The log of the second attempt to upgrade openldap is also attached to the ticket.
Changed 12 years ago by nonstop.server@…
Attachment: | main_2nd_try.log added |
---|
log of the second attempt upgrading with old openldap deactivated
comment:4 Changed 12 years ago by ballapete (Peter "Pete" Dyballa)
On a PPC Mac with just one processor I get as well the same error.
I think the error is caused from these lines (with line numbers, but TABs removed by this input form) in /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_databases_openldap/openldap/work/openldap-2.4.31/libraries/libmdb/mdb.c:
211 #ifndef _WIN32 212 /** A flag for opening a file and requesting synchronous data writes. 213 * This is only used when writing a meta page. It's not strictly needed; 214 * we could just do a normal write and then immediately perform a flush. 215 * But if this flag is available it saves us an extra system call. 216 * 217 * @note If O_DSYNC is undefined but exists in /usr/include, 218 * preferably set some compiler flag to get the definition. 219 * Otherwise compile with the less efficient -DMDB_DSYNC=O_SYNC. 220 */ 221 #ifndef MDB_DSYNC 222 # define MDB_DSYNC O_DSYNC 223 #endif 224 #endif
On my system I did not find a C header file with a valid definition of O_DSYNC. In /usr/include/sys/aio.h I found this:
127 /* 128 * A aio_fsync() options 129 * that the calling thread is to continue execution while 130 * the lio_listio() operation is being performed, and no 131 * notification is given when the operation is complete 132 */ 133 134 #ifndef O_SYNC /* XXX investigate documentation error */ 135 #define O_SYNC 0x0080 /* queued IO is completed as if by fsync() */ 136 #endif 137 #if 0 /* O_DSYNC - NOT SUPPORTED */ 138 #define O_DSYNC 0x1 /* queued async IO is completed as if by fdatasync() */ 139 #endif
So it seems we need to use -DMDB_DSYNC=O_SYNC…
Changed 12 years ago by ballapete (Peter "Pete" Dyballa)
Attachment: | main.2.log added |
---|
Pete's PPC main.log
comment:6 follow-up: 7 Changed 12 years ago by jmroot (Joshua Root)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Summary: | openldap @2.4.31 fails to upgrade → openldap @2.4.31 fails to upgrade on <= Leopard |
Try deactivating the old openldap first:
That way we'll know if the problem is specific to upgrading, or whether it happens when just installing too.