PHP :: Bug #76433 :: Build failure with macOS libldap.dylib
php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76433 Build failure with macOS libldap.dylib
Submitted: 2018-06-08 22:50 UTC Modified: 2018-06-11 07:39 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: kevin dot abel dot 0 at gmail dot com Assigned: mcmic (profile)
Status: Assigned Package: LDAP related
PHP Version: 7.3.0alpha1 OS: macOS
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kevin dot abel dot 0 at gmail dot com
New email:
PHP Version: OS:

 

 [2018-06-08 22:50 UTC] kevin dot abel dot 0 at gmail dot com
Description:
------------
Trying to build PHP 7.3.0alpha1 on macOS 10.13 with the ldap extension results in failure during linking. The macOS library for ldap (/usr/lib/libldap.dylib) does not contain some of the new symbols used in the 7.3 ldap changes.

Test script:
---------------
Output from configure script run is available at https://gist.github.com/kabel/28ffd286da24d39ad7a6062d7cf27564#file-01-configure

Output from the make process is available at https://gist.github.com/kabel/28ffd286da24d39ad7a6062d7cf27564#file-02-make

Expected result:
----------------
Build success or configure failure

Actual result:
--------------
Configure success, build failure at link.

make: *** [sapi/cli/php] Error 1
Undefined symbols for architecture x86_64:
  "_ldap_create_passwordpolicy_control", referenced from:
      _zif_ldap_exop_passwd in ldap.o
  "_ldap_create_sort_control_value", referenced from:
      __php_ldap_controls_from_array in ldap.o
  "_ldap_create_vlv_control_value", referenced from:
      __php_ldap_controls_from_array in ldap.o
  "_ldap_parse_passwordpolicy_control", referenced from:
      __php_ldap_controls_to_array in ldap.o
ld: symbol(s) not found for architecture x86_64

Patches

macos-ldap (last revision 2018-06-11 17:57 UTC) by kevin dot abel dot 0 at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-06-09 13:51 UTC] cmb@php.net
-Assigned To: +Assigned To: mcmic
 [2018-06-09 13:51 UTC] cmb@php.net
Côme, could you please have a look at this issue?
 [2018-06-11 07:39 UTC] mcmic@php.net
First, the documentation says OpenLDAP 2.4 or newer is needed: https://secure.php.net/manual/en/ldap.requirements.php

There was a discussion and a patch to make it build with solaris LDAP but it was for PHP 5.6 IIRC, not sure it’s still building: https://php.markmail.org/thread/mke5rclimfzvtaza#query:+page:1+mid:22llnz6vwjpl6sl5+state:results

Which changes would be needed to make it build with libldap.dylib?
 [2018-06-11 18:01 UTC] kevin dot abel dot 0 at gmail dot com
libldap on macOS is a fork of OpenLDAP, claiming to be 2.4.28, although there are clearly some pieces of the API that have been taken out or disabled. I added a patch to the bug that just adds some configure checks to these functions and add guards around them in the source. It may not be the best solution, but I was at least able to fully compile with it.
 [2018-07-24 11:06 UTC] php dot mac75 at yahoo dot com
Sorry to intervene but is using openldap from homebrew an option/alternative ?
 [2018-07-25 08:47 UTC] jan dot a dot viljanen at gmail dot com
It is but currently https://bugs.php.net/bug.php?id=76403 is blocking the project from doing just that. Can also add that if you look in the ldap.h header file macOS provides it states

LDAP_F( int )
ldap_parse_passwordpolicy_control LDAP_P((
        LDAP *ld,
        LDAPControl *ctrl,
        ber_int_t *expirep,
        ber_int_t *gracep,
        LDAPPasswordPolicyError *errorp )) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_0, __MAC_10_11, __IPHONE_NA, __IPHONE_NA, "use OpenDirectory Framework");

so it looks like they are trying to get people to not use openldap.
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Thu Aug 16 12:01:24 2018 UTC