https://bugs.openldap.org/show_bug.cgi?id=10237
Issue ID: 10237 Summary: openldap-2.6.8 fails to build with GCC14 with [-Wint-conversion] Product: OpenLDAP Version: 2.6.8 Hardware: x86_64 OS: Linux Status: UNCONFIRMED Keywords: needs_review Severity: normal Priority: --- Component: build Assignee: bugs@openldap.org Reporter: timo.gurr@gmail.com Target Milestone: ---
Created attachment 1023 --> https://bugs.openldap.org/attachment.cgi?id=1023&action=edit openldap-2.6.8-build.log
With GCC 14 I'm experiencing the following error trying to build openldap 2.6.8:
[...] In file included from ../slap.h:55, from search.c:32: search.c: In function 'ldap_back_search': ../../../include/ldap_pvt.h:531:31: error: passing argument 3 of '__gmpz_add' makes pointer from integer without a cast [-Wint-conversion] 531 | mpz_add((mpr), (mpr), (mpv)) | ^~~~~ | | | int search.c:257:9: note: in expansion of macro 'ldap_pvt_mp_add' 257 | ldap_pvt_mp_add( li->li_ops_completed[ SLAP_OP_SEARCH ], 1 ); | ^~~~~~~~~~~~~~~ In file included from ../../../include/ldap_pvt.h:519: /usr/x86_64-pc-linux-gnu/include/gmp.h:633:51: note: expected 'mpz_srcptr' {aka 'const __mpz_struct *'} but argument is of type 'int' 633 | __GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); | ^~~~~~~~~~ make[3]: *** [Makefile:331: search.lo] Error 1 make[2]: *** [Makefile:550: .backend] Error 1 make[1]: *** [Makefile:298: all-common] Error 1 make: *** [Makefile:319: all-common] Error 1
This is with GCC 14.1.0, switching to GCC 13.2.0 instead allows the build to succeed, I checked other distributions (already on GCC 14) and git for possible patches but couldn't find anything relevant.
Complete build log is attached.
https://bugs.openldap.org/show_bug.cgi?id=10237
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |TEST Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Howard Chu hyc@openldap.org --- The error appears to be specific to using GMP vs OpenSSL Bignum. The erroneous code was added in be9585d0ed805f01772204ce407985223ec8e2b9 for ITS#7182 back in 2012.
Fixed now in git a323284c0671240e46fbe9d0c365d45278895cda
https://bugs.openldap.org/show_bug.cgi?id=10237
--- Comment #2 from Howard Chu hyc@openldap.org --- Typo in prev commit, fixed in 3327a6b69378acac39828b671726d7c15fe9921d
https://bugs.openldap.org/show_bug.cgi?id=10237
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|needs_review | Target Milestone|--- |2.5.19
https://bugs.openldap.org/show_bug.cgi?id=10237
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|TEST |FIXED
--- Comment #3 from Quanah Gibson-Mount quanah@openldap.org --- RE26:
• 84a64fe3 by Howard Chu at 2024-10-04T21:41:34+00:00 ITS#10237 back-ldap: fix usage of multi-precision add for op counters
RE25:
• b5bc6d69 by Howard Chu at 2024-10-04T21:46:37+00:00 ITS#10237 back-ldap: fix usage of multi-precision add for op counters