Full_Name: Ron Aitchison Version: 2.4.39 OS: Windows 7/MinGW-w64/MSYS URL: ftp://ftp.openldap.org/incoming/ Submission from: (NULL) (67.230.141.32) Checked the build error reports before submitting Building OpenLDAP 2.4.39 under MinGW-w64 (Win32 chain) and MSYS Configure command ./configure --prefix=/target LIBS='-lpcre -lgdi32 -lpthread' --enable-overlays --disable-shared CPPFLAGS='-I/target/include' LDFLAGS='-L/target/lib' make depend - works make - fails with undefined uint32_t in /servers/slapd/back-mdm/init.c Since this works on standard systems it is clearly some artifact of MinGW and/or configure arguments. Fixed by adding #include <stdint.h> in /servers/slapd/back-mdm/back-mdm.h. Make then ran to completion and slapd loaded. Since stdint.h is 'double include' safe there is probably no down-side to this quick fix.
ron@zytrax.com wrote: > Full_Name: Ron Aitchison > Version: 2.4.39 > OS: Windows 7/MinGW-w64/MSYS > URL: ftp://ftp.openldap.org/incoming/ > Submission from: (NULL) (67.230.141.32) > > > Checked the build error reports before submitting > Building OpenLDAP 2.4.39 under MinGW-w64 (Win32 chain) and MSYS > Configure command > ./configure --prefix=/target LIBS='-lpcre -lgdi32 -lpthread' --enable-overlays > --disable-shared CPPFLAGS='-I/target/include' LDFLAGS='-L/target/lib' > make depend - works > make - fails with undefined uint32_t in /servers/slapd/back-mdm/init.c > Since this works on standard systems it is clearly some artifact of MinGW and/or > configure arguments. Fixed by adding #include <stdint.h> in > /servers/slapd/back-mdm/back-mdm.h. Make then ran to completion and slapd > loaded. Since stdint.h is 'double include' safe there is probably no down-side > to this quick fix. What version of MSYS/Mingw64 are you using? It builds cleanly for me here and has done so for years. -- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
Additional Information re ITS#7878 omitted from original report: The build did not (correctly) auto-detect either Openssl or SASL which may make it a pretty unusual build case. On 20/06/2014 4:44 PM, openldap-its@OpenLDAP.org wrote: > *** THIS IS AN AUTOMATICALLY GENERATED REPLY *** > > Thanks for your report to the OpenLDAP Issue Tracking System. Your > report has been assigned the tracking number ITS#7878. > > One of our support engineers will look at your report in due course. > Note that this may take some time because our support engineers > are volunteers. They only work on OpenLDAP when they have spare > time. > > If you need to provide additional information in regards to your > issue report, you may do so by replying to this message. Note that > any mail sent to openldap-its@openldap.org with (ITS#7878) > in the subject will automatically be attached to the issue report. > > mailto:openldap-its@openldap.org?subject=(ITS#7878) > > You may follow the progress of this report by loading the following > URL in a web browser: > http://www.OpenLDAP.org/its/index.cgi?findid=7878 > > Please remember to retain your issue tracking number (ITS#7878) > on any further messages you send to us regarding this report. If > you don't then you'll just waste our time and yours because we > won't be able to properly track the report. > > Please note that the Issue Tracking System is not intended to > be used to seek help in the proper use of OpenLDAP Software. > Such requests will be closed. > > OpenLDAP Software is user supported. > http://www.OpenLDAP.org/support/ > > -------------- > Copyright 1998-2007 The OpenLDAP Foundation, All Rights Reserved. > > -- Ron Aitchison www.zytrax.com ZYTRAX ron@zytrax.com tel: 514-315-4296 Suite 22 6201 Chemin Cote St. Luc Hampstead QC H3X 2H2 Canada Author: Pro DNS and BIND (Apress) ISBN 1-59059-494-0
I routinely build on windows with MSYS and no issues.
I'm reopening this, because my MSYS2/MinGW environment still reproduces it (after fixing ITS#8383): make[3]: Entering directory '/home/ryan/openldap/servers/slapd/back-mdb' /bin/sh ../../../libtool --tag=disable-shared --mode=compile cc -g -O2 -I../../../include -I../../../include -I.. -I./.. -I./../../../libraries/liblmdb -c init.c cc -g -O2 -I../../../include -I../../../include -I.. -I./.. -I./../../../libraries/liblmdb -c init.c -o init.o In file included from ../slap.h:39, from back-mdb.h:21, from init.c:25: ../../../include/ac/socket.h:101: warning: "EWOULDBLOCK" redefined 101 | #define EWOULDBLOCK WSAEWOULDBLOCK | In file included from ../../../include/ac/errno.h:21, from init.c:23: C:/msys64/mingw64/x86_64-w64-mingw32/include/errno.h:166: note: this is the location of the previous definition 166 | #define EWOULDBLOCK 140 | In file included from ../slap.h:39, from back-mdb.h:21, from init.c:25: ../../../include/ac/socket.h:102: warning: "EINPROGRESS" redefined 102 | #define EINPROGRESS WSAEINPROGRESS | In file included from ../../../include/ac/errno.h:21, from init.c:23: C:/msys64/mingw64/x86_64-w64-mingw32/include/errno.h:158: note: this is the location of the previous definition 158 | #define EINPROGRESS 112 | In file included from ../slap.h:39, from back-mdb.h:21, from init.c:25: ../../../include/ac/socket.h:103: warning: "ETIMEDOUT" redefined 103 | #define ETIMEDOUT WSAETIMEDOUT | In file included from ../../../include/ac/errno.h:21, from init.c:23: C:/msys64/mingw64/x86_64-w64-mingw32/include/errno.h:223: note: this is the location of the previous definition 223 | #define ETIMEDOUT 138 | In file included from init.c:25: back-mdb.h:71:2: error: unknown type name 'uint32_t' 71 | uint32_t mi_dbenv_flags; | ^~~~~~~~ back-mdb.h:85:2: error: unknown type name 'uint32_t' 85 | uint32_t mi_rtxn_size; | ^~~~~~~~ back-mdb.h:87:2: error: unknown type name 'uint32_t' 87 | uint32_t mi_txn_cp_min; | ^~~~~~~~ back-mdb.h:88:2: error: unknown type name 'uint32_t' 88 | uint32_t mi_txn_cp_kbyte; | ^~~~~~~~ init.c: In function 'mdb_db_open': init.c:90:2: error: unknown type name 'uint32_t'; did you mean 'wint_t'? 90 | uint32_t flags; | ^~~~~~~~ | wint_t make[3]: *** [Makefile:343: init.lo] Error 1
https://git.openldap.org/openldap/openldap/-/merge_requests/23
Commits: 38f9dd2f by Ryan Tandy at 2020-04-14T10:04:33-07:00 ITS#7878 Replace uint32_t with unsigned in back-mdb
commit f5143f99eeb66d4f5698284391ed7adf6cef9f03 (HEAD -> OPENLDAP_REL_ENG_2_4, origin/OPENLDAP_REL_ENG_2_4) Author: Ryan Tandy <ryan@nardis.ca> Date: Fri Apr 3 15:15:27 2020 -0700 ITS#7878 Replace uint32_t with unsigned in back-mdb init.c: align mi_dbenv_flags and flags with mdb_dbi_open, which declares flags as unsigned int. search.c: align mi_rtxn_size with ARG_UINT; adjust ww_ctx.nentries to silence a warning about signed/unsigned comparison. config.c: parse checkpoint config more carefully. Reject negative or unreasonably large values for kbytes and minutes. Ensure both values are parsed successfully before making any changes. Fixes a compilation failure under MinGW, where stdint.h types are not implicitly pulled in by other headers.