[php-src] Issue #9867: Can't build php 8.1.12 from source on macOs Monterey 12.1
| From: | icarta-l | Date: | Tue, 01 Nov 2022 21:14:52 +0000 |
| Subject: | [php-src] Issue #9867: Can't build php 8.1.12 from source on macOs Monterey 12.1 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-242724@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/9867
Author: icarta-l
### Description
Hello,
I am trying to build PHP from source using [PHP 8.1.12 source files found on
php.net](https://www.php.net/distributions/php-8.1.12.tar.gz).
However, I end up with the following errors:
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [sapi/phpdbg/phpdbg] Error 1
The configure script didn't show any error in the terminal when launching it.
Here is the ./configure script I used:
./configure LIBXML_LIBS=/usr/local/lib LIBXML_CFLAGS=/usr/local/include
OPENSSL_CFLAGS=/usr/local/include OPENSSL_LIBS=/usr/local/lib CURL_CFLAGS=/usr/local/include
CURL_LIBS=/usr/local/lib ICU_CFLAGS=/usr/local/include ICU_LIBS=/usr/local/lib/
ZLIB_CFLAGS=/usr/local/include ZLIB_LIBS=/usr/local/lib --with-openssl --with-pdo-mysql --with-curl
--enable-intl --without-sqlite3 --enable-mbstring --disable-mbregex --without-pdo-sqlite
--with-iconv=/usr/local/bin --with-readline
I try to use make clean, and then make again, but it did not solve the
issue.
I copy-pasted the output of make --debug=all in [this
gist](https://gist.github.com/icarta-l/48e53ba93a1883a0df17f8625433b6c5#file-make-logs-from-php-8-1-12-build).
I also copy-pasted the output of the terminal [in another
gist](https://gist.github.com/icarta-l/d26d30a81f2246acc44ace43bf25b6ab#file-make-logs-in-terminal-from-php-8-1-12-build).
Maybe the make script is somehow compiling without the correct library references, provoking a chain
of linker errors?
Is there any way to fix or to debug the build?
### PHP Version
PHP 8.1.12
### Operating System
MacOs Monterey 12.1 Mac Mini