php / php/php-src

PHP fails to build with macOS libraries (for example ldap)

Đang mở
#10,680 5 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Bug Category: Build System Status: Needs Triage
Ngôn ngữ chính
C
Star
40.4k
Fork
8.2k
Merge trung bình
2 ngày 13 giờ
Pull request đã merge (30 ngày)
96

Mô tả

Description

The following code:

https://github.com/Homebrew/homebrew-core/blob/4e4535e1612ecb88c24103bdefa11fa620162327/Formula/php@8.1.rb

    system "./configure", *args
    system "make"
    system "make", "install"

Resulted in this output:

  Undefined symbols for architecture arm64:
    "_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
  Undefined symbols for architecture arm64:
    "_ldap_create_passwordpolicy_control", referenced from:
        _zif_ldap_exop_passwd in ldap.o
    "_ldap_create_vlv_control_value", referenced from:
        __php_ldap_controls_from_array in ldap.o
    "_ldap_create_sort_control_value", referenced from:
        __php_ldap_controls_from_array in ldap.o
    "_ldap_destroy", referenced from:
        _ldap_link_free_obj in ldap.o
        _zif_ldap_unbind in ldap.o
    "_ldap_create_vlv_control_value", referenced from:
        __php_ldap_controls_from_array in ldap.o
    "_ldap_destroy", referenced from:
        _ldap_link_free_obj in ldap.o
        _zif_ldap_unbind in ldap.o
    "_ldap_parse_passwordpolicy_control", referenced from:
        __php_ldap_controls_to_array in ldap.o
  Undefined symbols for architecture arm64:
    "_ldap_create_passwordpolicy_control", referenced from:
        _zif_ldap_exop_passwd in ldap.o
    "_ldap_parse_passwordpolicy_control", referenced from:
        __php_ldap_controls_to_array in ldap.o
    "_tidyLibraryVersion", referenced from:
        _zm_info_tidy in tidy.o
    "_ldap_create_sort_control_value", referenced from:
        __php_ldap_controls_from_array in ldap.o
    "_tidyLibraryVersion", referenced from:
        _zm_info_tidy in tidy.o
    "_ldap_create_vlv_control_value", referenced from:
        __php_ldap_controls_from_array in ldap.o
  ld: symbol(s) not found for architecture arm64
  ld: symbol(s) not found for architecture arm64
    "_ldap_destroy", referenced from:
        _ldap_link_free_obj in ldap.o
        _zif_ldap_unbind in ldap.o

But I expected this output instead:

I expected the build to succeed.


Homebrew currently carries a patch for this, which was submitted in https://github.com/php/php-src/pull/3472, but denied since PHP 7.4 used pkg config.

PHP Version

PHP 8.1.16

Operating System

macOS 13.2.1

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với lời gọi configure và make trong Homebrew Formula/php@8.1.rb, sau đó xem xét patch Homebrew được liên kết và pull request của PHP để hiểu thay đổi build dự kiến. Tái hiện build PHP 8.1.16 trên macOS 13.2.1 arm64 với LDAP và tidy được bật; hoàn thành khi build kết thúc mà không có các undefined symbols đã được báo cáo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
c, macos, php
Lĩnh vực
build-system
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.