Bug 2032694

Summary: [F36FTBFS]: opensips fails to build from source in Fedora Rawhide with openldap-2.6
Product: [Fedora] Fedora Reporter: Simon Pichugin <spichugi>
Component: opensipsAssignee: Peter Lemenkov <lemenkov>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ivaxer, lemenkov, ppisar
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://koschei.fedoraproject.org/package/opensips?collection=f37
Whiteboard:
Fixed In Version: opensips-3.1.7-2.fc36 opensips-3.1.8-1.fc34 opensips-3.1.8-1.fc35 opensips-3.1.8-1.fc36 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-24 14:52:23 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, 2045102    

Description Simon Pichugin 2021-12-15 02:35:24 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 Peter Lemenkov 2022-01-31 19:59:57 UTC
Fixed in opensips-3.1.7-2.fc36

Comment 2 Petr Pisar 2022-02-21 15:22:01 UTC
opensips-3.1.7-2.fc36 was built with openldap-2.4.59-6.fc36 <https://kojipkgs.fedoraproject.org//packages/opensips/3.1.7/2.fc36/data/logs/armv7hl/root.log>.
opensips-3.1.7-2.fc36 still fails to build with openldap-devel-2.6.1-1.fc36:

gcc -fPIC -DPIC -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fgnu89-inline -DMOD_NAME='ldap' -DPKG_MALLOC  -DSHM_MMAP  -DUSE_MCAST  -DDISABLE_NAGLE  -DSTATISTICS  -DHAVE_RESOLV_RES  -DF_MALLOC  -DQ_MALLOC  -DHP_MALLOC  -DDBG_MALLOC   -DNAME='"opensips"' -DVERSION='"3.1.7"' -DARCH='"aarch64"' -DOS='"linux"' -DCOMPILER='"gcc 12"' -D__CPU_aarch64 -D__OS_linux -D__SMP_yes -DCFG_DIR='"/etc/opensips/"'  -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DUSE_POSIX_SEM   -DHAVE_EPOLL -DHAVE_SIGIO_RT -DHAVE_SELECT -c ld_session.c -o ld_session.o
[...]
In file included from ld_session.c:33:
ldap_connect.h:46:12: error: conflicting types for 'ldap_connect'; have 'int(char *, struct ld_conn *)'
   46 | extern int ldap_connect(char* _ld_name, struct ld_conn* conn);
      |            ^~~~~~~~~~~~
In file included from ld_session.h:34,
                 from ld_session.c:32:
/usr/include/ldap.h:1555:1: note: previous declaration of 'ldap_connect' with type 'int(LDAP *)' {aka 'int(struct ldap *)'}
 1555 | ldap_connect( LDAP *ld );
      | ^~~~~~~~~~~~
make[1]: *** [../../Makefile.rules:26: ld_session.o] Error 1

Comment 3 Simon Pichugin 2022-03-15 00:37:28 UTC
Hi Petr,
Hi Peter,
I think the issue that you have is the same that Bind package had. You can check how they fixed it here:
https://src.fedoraproject.org/rpms/bind/c/ec7f7e4c125f8d3ac99dd1bba0fba0d4f7639a5d?branch=rawhide 

Also, feel free to drop me an email message in google chat or IRC if you'll have any questions, - spichugi (spichugi)

Thanks!
Simon

Comment 4 Petr Pisar 2022-03-15 16:16:38 UTC
Indeed. That's the same issue. modules/ldap coincidently named an internal function, which is used only inside that module, with the same name as is used in openldap.

Comment 5 Fedora Update System 2022-03-15 22:00:26 UTC
FEDORA-2022-76f0becfd3 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-76f0becfd3

Comment 6 Fedora Update System 2022-03-15 22:00:27 UTC
FEDORA-2022-f884e2b0de has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2022-f884e2b0de

Comment 7 Fedora Update System 2022-03-15 22:00:28 UTC
FEDORA-2022-3fbd5b7f38 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-3fbd5b7f38

Comment 8 Fedora Update System 2022-03-16 14:57:06 UTC
FEDORA-2022-76f0becfd3 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-76f0becfd3`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-76f0becfd3

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2022-03-16 16:25:56 UTC
FEDORA-2022-3fbd5b7f38 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-3fbd5b7f38`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-3fbd5b7f38

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2022-03-16 16:51:23 UTC
FEDORA-2022-f884e2b0de has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-f884e2b0de`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-f884e2b0de

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2022-03-24 14:52:23 UTC
FEDORA-2022-f884e2b0de has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2022-03-24 16:15:36 UTC
FEDORA-2022-3fbd5b7f38 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2022-03-26 15:22:43 UTC
FEDORA-2022-76f0becfd3 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.