Bug 2032707

Summary: [F36FTBFS]: anope fails to build from source in Fedora Rawhide with openldap-2.6
Product: [Fedora] Fedora Reporter: Simon Pichugin <spichugi>
Component: anopeAssignee: Robert Scheck <redhat-bugzilla>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: redhat-bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: anope-2.0.10-3.fc36 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-12-29 05:20:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2021662    

Description Simon Pichugin 2021-12-15 02:39:16 UTC
Your package fails to build with the newest openldap-2.6, which was part of a recent wide Fedora change. More information about Fedora OpenLDAP Change is available here: https://fedoraproject.org/wiki/Changes/Openldap_25#How_To_Test.
Thank you for your cooperation!

Additional Information:
If you have an issue with libldap_r depreciation, you can use the following example for fixing your package:
https://github.com/389ds/389-ds-base/commit/a3375a08a506c3b72a8a23df5238848017691350

Comment 1 Robert Scheck 2021-12-17 01:40:57 UTC
The instructions do not look really handy...any chance for a build log based on your tests?

Comment 2 Simon Pichugin 2021-12-24 04:55:54 UTC
(In reply to Robert Scheck from comment #1)
> The instructions do not look really handy...any chance for a build log based
> on your tests?

Hello!
Anope package built with openldap-2.6 can be found here - https://copr.fedorainfracloud.org/coprs/spichugi/openldap-2.6/package/anope/

The build log can be found in the latest build (you can see it at the bottom of the page):
https://copr.fedorainfracloud.org/coprs/spichugi/openldap-2.6/build/3059418/

Here it is:
https://download.copr.fedorainfracloud.org/results/spichugi/openldap-2.6/fedora-rawhide-x86_64/03059418-anope/builder-live.log.gz

Hope that helps!

P.S. looks like the simple issue caused by libldap_r shared library depreciation. You need to replace it with libldap, and that should be it. (but I am not sure where, as I am not familiar with anope package. You can try to look at the example provided in the description - https://github.com/389ds/389-ds-base/commit/a3375a08a506c3b72a8a23df5238848017691350)

Comment 3 Robert Scheck 2021-12-24 16:07:25 UTC
Thank you. https://github.com/anope/anope/blob/2.0/modules/extra/m_ldap.cpp#L12 is the only occurence of "ldap_r" inside the anope sources, which seems to be extracted and translated into what cmake finally handles. Unfortunately, that translation mechanism doesn't seem to support fallbacks or conditions.

Is there any upstream documentation that mentions the removal of libldap_r? Because e.g. https://lists.openldap.org/hyperkitty/list/openldap-devel@openldap.org/thread/EZVZ7VFBIUTLS4VKOLB5YX74HHNLCX4W/ seems actually to talk about the oppositeā€¦

Comment 4 Simon Pichugin 2021-12-24 17:11:29 UTC
In the Upstream, libldap_r has been merged with libldap starting from openldap-2.5:
https://lists.openldap.org/hyperkitty/list/openldap-announce@openldap.org/thread/BH3VDPG6IYYF5L5U6LZGHHKMJY5HFA3L/

But in Fedora, we completely removed non-threaded Library (libldap) and we made symlinks from libldap_r in Fedora 34 (openldap-2.4.56-4.fc34) - hence making libldap_r and libldap using the same threaded library: 
https://fedoraproject.org/wiki/Changes/OpenLDAPwithoutNonthreadedLibraries

So for the OpenLDAP Upstream, the correct wording is 'merging libldap_r with libldap', and for Fedora, we basically just deprecate the symlinks.

But the result is the same for both Upstream and Fedora as we came to the same state, - OpenLDAP now uses a threaded library which is called - libldap.so.

Comment 5 Robert Scheck 2021-12-28 01:58:24 UTC
Thank you for the explanation. I've proposed https://github.com/anope/anope/pull/283 to upstream.