https://bugs.openldap.org/show_bug.cgi?id=9201
Bug ID: 9201 Summary: LDAP_THREAD_DEBUG doesn't compile Product: OpenLDAP Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: --- Component: libraries Assignee: bugs@openldap.org Reporter: ryan@openldap.org Target Milestone: ---
on master @ 4ac88b219d:
./configure CPPFLAGS="-DLDAP_THREAD_DEBUG" && make
make[2]: Entering directory '/home/ryan/tmp/openldap/libraries/libldap_r' /bin/sh ../../libtool --mode=compile cc -g -O2 -I../../include -I../../include -DLDAP_R_COMPILE -I./../libldap -DLDAP_THREAD_DEBUG -DLDAP_LIBRARY -c threads.c cc -g -O2 -I../../include -I../../include -DLDAP_R_COMPILE -I./../libldap -DLDAP_THREAD_DEBUG -DLDAP_LIBRARY -c threads.c -fPIC -DPIC -o .libs/threads.o In file included from ldap_thr_debug.h:129, from threads.c:73: ../../include/ldap_pvt_thread.h:114:1: error: conflicting types for 'ldap_pvt_thread_mutex_recursive_init' ldap_pvt_thread_mutex_recursive_init LDAP_P(( ldap_pvt_thread_mutex_t *mutex )); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ldap_thr_debug.h:129, from threads.c:26: ../../include/ldap_pvt_thread.h:114:1: note: previous declaration of 'ldap_pvt_thread_mutex_recursive_init' was here ldap_pvt_thread_mutex_recursive_init LDAP_P(( ldap_pvt_thread_mutex_t *mutex )); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ make[2]: *** [Makefile:420: threads.lo] Error 1
https://bugs.openldap.org/show_bug.cgi?id=9201
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.5.0
https://bugs.openldap.org/show_bug.cgi?id=9201
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |CONFIRMED Ever confirmed|0 |1
--- Comment #1 from Quanah Gibson-Mount quanah@openldap.org --- Still occurs with current master:
In file included from ldap_thr_debug.h:129, from threads.c:77: ../../include/ldap_pvt_thread.h:114:1: error: conflicting types for ‘ldap_pvt_thread_mutex_recursive_init’ ldap_pvt_thread_mutex_recursive_init LDAP_P(( ldap_pvt_thread_mutex_t *mutex )); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ldap_thr_debug.h:129, from threads.c:30: ../../include/ldap_pvt_thread.h:114:1: note: previous declaration of ‘ldap_pvt_thread_mutex_recursive_init’ was here ldap_pvt_thread_mutex_recursive_init LDAP_P(( ldap_pvt_thread_mutex_t *mutex ));
https://bugs.openldap.org/show_bug.cgi?id=9201
--- Comment #2 from Quanah Gibson-Mount quanah@openldap.org --- Double inclusion of the "ldap_thr_debug.h" file at line 77 which is bogus.
https://bugs.openldap.org/show_bug.cgi?id=9201
--- Comment #3 from Quanah Gibson-Mount quanah@openldap.org --- Digging further, at line 76:
LDAP_THREAD_IMPLEMENTATION is defined, which changes some behaviors in ldap_thr_debug.h. It is not defined in the prior inclusion.
So ldap_thr_debug.h needs some tweaking to handle this.
https://bugs.openldap.org/show_bug.cgi?id=9201
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |RESOLVED Resolution|--- |TEST
--- Comment #4 from Quanah Gibson-Mount quanah@openldap.org --- Commits: • b24ca759 by Howard Chu at 2020-09-03T12:37:32+01:00 ITS#9201 fix LDAP_THREAD_DEBUG
Add missing defs to ldap_thr_debug.h. slap tools must init libldap so internal mutexes get inited.
https://bugs.openldap.org/show_bug.cgi?id=9201
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|TEST |--- Status|RESOLVED |CONFIRMED
--- Comment #5 from Quanah Gibson-Mount quanah@openldap.org --- I get a build failure with overlays enabled:
/home/quanah/git/head/servers/slapd/overlays/accesslog.c:2212: undefined reference to `ldap_pvt_thread_mutex_recursive_init'
https://bugs.openldap.org/show_bug.cgi?id=9201
--- Comment #6 from Quanah Gibson-Mount quanah@openldap.org --- My configure options:
CPPFLAGS="-DLDAP_THREAD_DEBUG" ./configure --enable-overlays --enable-ldap --enable-meta --with-tls=openssl
https://bugs.openldap.org/show_bug.cgi?id=9201
--- Comment #7 from Quanah Gibson-Mount quanah@openldap.org --- Note: build passes if I make it dynamic modules, i.e.:
CPPFLAGS="-DLDAP_THREAD_DEBUG" ./configure --enable-overlays=mod --enable-ldap --enable-meta --with-tls=openssl --enable-modules
so it's specific to static module build.
https://bugs.openldap.org/show_bug.cgi?id=9201
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |OL_2_5_REQ
https://bugs.openldap.org/show_bug.cgi?id=9201
--- Comment #8 from Quanah Gibson-Mount quanah@openldap.org --- Even with a dynamic build, the test suite fails to pass:
5f514254 <<< dnPrettyNormal: <cn=Manager,dc=example,dc=com>, <cn=manager,dc=example,dc=com> /home/quanah/git/head/servers/slapd/.libs/slapd: symbol lookup error: ../servers/slapd/overlays/.libs/accesslog-2-devel.so.0: undefined symbol: ldap_pvt_thread_mutex_recursive_init
https://bugs.openldap.org/show_bug.cgi?id=9201
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |TEST Status|CONFIRMED |RESOLVED
--- Comment #9 from Quanah Gibson-Mount quanah@openldap.org ---
Commits: • ccfbb74c by Howard Chu at 2020-09-03T21:01:07+01:00 ITS#9201 additional fixes
Commits: • 6d7c2511 by Howard Chu at 2020-09-03T21:08:17+01:00 ITS#9201 partial revert
https://bugs.openldap.org/show_bug.cgi?id=9201
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|OL_2_5_REQ |
https://bugs.openldap.org/show_bug.cgi?id=9201
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED Resolution|TEST |FIXED