PHP_ADD_EXTENSION_DEP doesn't fail when expected (build system)
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C
- Star
- 40.4k
- Fork
- 8.1k
- Merge trung bình
- 2 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 96
Mô tả
Description
I have the following m4 code: https://github.com/pmmp/ext-pmmpthread/blob/6a516e5b58d326e2dcc23bb75fba6e210d5b313f/config.m4#L33-L44
CLASSES_SRC="classes/pool.c classes/thread.c classes/thread_safe_array.c classes/thread_safe.c classes/runnable.c classes/worker.c"
PHP_NEW_EXTENSION(pmmpthread, php_pmmpthread.c $CLASSES_SRC src/copy.c src/monitor.c src/worker.c src/globals.c src/prepare.c src/store.c src/handlers.c src/object.c src/routine.c src/queue.c src/ext_sockets_hacks.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Werror=implicit-function-declaration)
PHP_ADD_BUILD_DIR($ext_builddir/src, 1)
PHP_ADD_INCLUDE($ext_builddir)
if test "$PHP_PMMPTHREAD_SOCKETS" != "no"; then
AC_MSG_NOTICE([Support for passing Socket objects between threads enabled. The sockets extension must be loaded at runtime. You can disable support using --without-pmmpthread-sockets.])
AC_DEFINE(HAVE_PMMPTHREAD_EXT_SOCKETS_SUPPORT, 1, [Whether pmmpthread supports passing Socket objects between threads])
PHP_ADD_EXTENSION_DEP(pmmpthread, sockets)
else
AC_MSG_NOTICE([Support for passing Socket objects between threads disabled. You can enable support using --with-pmmpthread-sockets.])
fi
fi
When using --disable-all or --disable-sockets in conjunction with --with-pmmpthread-sockets, I expect the configure command to fail (because of the PHP_ADD_EXTENSION_DEP(pmmpthread, sockets)), but it doesn't.
The build proceeds and results in a compile error due to sockets being disabled.
Similar code for Windows works correctly.
PHP Version
PHP 8.2 git 6a914cb7a50fafbda38a4d8acce3a06b97dbd994
Operating System
WSL2 Ubuntu 20.04
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với ví dụ config.m4 được liên kết và lần theo PHP_ADD_EXTENSION_DEP(pmmpthread, sockets) qua các macro tạo configure. Tái hiện bằng --disable-all hoặc --disable-sockets cùng với --with-pmmpthread-sockets, sau đó so sánh đường dẫn Unix với hành vi trên Windows; hoàn tất khi configure từ chối dependency bị thiếu trước khi biên dịch.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- php
- Lĩnh vực
- build-system
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100