Install mongodb failing on M1 Mac using pecl

284 Views Asked by At

I'm attempting to configure PHP to work with MongoDB by following the steps outlined in the "Getting Set Up to Run PHP with MongoDB" tutorial. However, I encountered an issue during the MongoDB installation process using pecl. Specifically, the installation enters into an infinite loop when it reaches the "running: make" stage.

 ~  sudo pecl install mongodb                                                                                                          ✔  12:10:52 PM
Password:
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading mongodb-1.17.1.tgz ...
Starting to download mongodb-1.17.1.tgz (2,064,698 bytes)
......................................................................................................................................................................................................................................................................................................................................................................................................................done: 2,064,698 bytes
846 source files, building
running: phpize
Configuring for:
PHP Api Version:         20230831
Zend Module Api No:      20230831
Zend Extension Api No:   420230831
Enable developer flags? (yes/no) [no] :
Enable code coverage? (yes/no) [no] :
Use system libraries for libbson, libmongoc, and libmongocrypt? (yes/no) [no] :
Enable client-side encryption? (auto/yes/no) [auto] :
Enable Snappy for compression? (auto/yes/no) [auto] :
Enable zlib for compression? (auto/system/bundled/no) [auto] :
Enable zstd for compression? (auto/yes/no) [auto] :
Enable SASL for Kerberos authentication? (auto/cyrus/no) [auto] :
Enable crypto and TLS? (auto/openssl/libressl/darwin/no) [auto] :
Use system crypto profile (OpenSSL only)? (yes/no) [no] :
Use bundled or system utf8proc for SCRAM-SHA-256 SASLprep? (bundled/system) [bundled] :
building in /private/tmp/pear/install/pear-build-rootfLK3co/mongodb-1.17.1
running: /private/tmp/pear/install/mongodb/configure --with-php-config=/opt/homebrew/bin/php-config --enable-mongodb-developer-flags=no --enable-mongodb-coverage=no --with-mongodb-system-libs=no --with-mongodb-client-side-encryption=auto --with-mongodb-snappy=auto --with-mongodb-zlib=auto --with-mongodb-zstd=auto --with-mongodb-sasl=auto --with-mongodb-ssl=auto --enable-mongodb-crypto-system-profile=no --with-mongodb-utf8proc=bundled
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for pkg-config... no
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether cc accepts -g... yes
checking for cc option to enable C11 features... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -Wl,-rpath,... yes
checking build system type... aarch64-apple-darwin21.6.0
checking host system type... aarch64-apple-darwin21.6.0
checking target system type... aarch64-apple-darwin21.6.0
checking for PHP prefix... /opt/homebrew/Cellar/php/8.3.0
checking for PHP includes... -I/opt/homebrew/Cellar/php/8.3.0/include/php -I/opt/homebrew/Cellar/php/8.3.0/include/php/main -I/opt/homebrew/Cellar/php/8.3.0/include/php/TSRM -I/opt/homebrew/Cellar/php/8.3.0/include/php/Zend -I/opt/homebrew/Cellar/php/8.3.0/include/php/ext -I/opt/homebrew/Cellar/php/8.3.0/include/php/ext/date/lib
checking for PHP extension directory... /opt/homebrew/Cellar/php/8.3.0/pecl/20230831
checking for PHP installed headers prefix... /opt/homebrew/Cellar/php/8.3.0/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to enable MongoDB support... yes, shared
checking for pkg-config... no
checking PHP version... 8.3.0
checking whether to enable developer build flags... no
checking whether to enable code coverage... no
checking whether to compile against system libraries instead of bundled... no
checking whether to use system libbson... no
checking whether to use system libmongoc... no
checking whether to enable client-side encryption... auto
checking for gcc... (cached) cc
checking whether the compiler supports GNU C... (cached) yes
checking whether cc accepts -g... (cached) yes
checking for cc option to enable C11 features... (cached) none needed
checking for g++... g++
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for typeof syntax and keyword spelling... typeof
checking whether C compiler accepts -Wno-deprecated-declarations... yes
checking whether C compiler accepts -Wno-cast-align... yes
checking whether C compiler accepts -Wno-unneeded-internal-declaration... yes
checking whether C compiler accepts -Wno-error=unused-command-line-argument... yes
checking for __sync_add_and_fetch_4... yes
checking for __sync_add_and_fetch_8... yes
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for _Bool... yes
checking for stdbool.h that conforms to C99... yes
checking for strings.h... (cached) yes
checking whether byte ordering is bigendian... no
checking for strnlen... yes
checking for reallocf... yes
checking for syscall... yes
checking for snprintf... yes
checking for strlcpy... yes
checking for struct timespec... yes
checking for library containing clock_gettime... none required
checking for library containing floor... none required
checking for gmtime_r... yes
checking for rand_r... yes
checking for arc4random_buf... yes
checking whether cc is Clang... yes
checking whether pthreads work with "-pthread" and "-lpthread"... yes
checking whether Clang needs flag to prevent "argument unused" warning when linking with -pthread... no
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking whether more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking whether PTHREAD_ONCE_INIT needs braces... no
checking whether to enable Snappy for compression... auto
checking whether to enable zlib for compression... auto
checking whether to enable zstd for compression... auto
checking for snappy... no
checking for snappy_uncompress in -lsnappy... no
checking for snappy-c.h... no
checking for zlib... no
checking for compress2 in -lzlib... no
checking for zlib.h... yes
checking for unistd.h... (cached) yes
checking for stdarg.h... yes
checking for libzstd... no
checking for ZSTD_compress in -lzstd... no
checking for zstd.h... no
checking for res_nsearch... yes
checking for res_ndestroy... yes
checking whether to enable SASL for Kerberos authentication... auto
checking for libsasl2... no
checking for sasl_client_init in -lsasl2... yes
checking for sasl/sasl.h... yes
checking for sasl_client_done in -lsasl2... yes
checking which SASL library to use... cyrus
checking whether to enable crypto and TLS... auto
checking deprecated option for OpenSSL library path... auto
checking for cc options needed to detect all undeclared functions... none needed
checking for openssl >= 1.0.1... no
checking for EVP_DigestInit_ex in -lcrypto... no
checking for OPENSSL_init_ssl in -lssl... no
checking for SSL_library_init in -lssl... no
checking which TLS library to use... darwin
checking whether to use system crypto profile... no
checking deprecated option for whether to use system crypto profile... no
checking whether to use bundled or system utf8proc for SCRAM-SHA-256 SASLprep... bundled
checking whether byte ordering is bigendian... (cached) no
checking for shm_open... yes
checking for sched_getcpu... no
checking for socklen_t... yes
checking for struct sockaddr_storage.ss_family... yes
checking accept ARG2 => struct sockaddr ARG3 => socklen_t ... ok
checking for pthread_join using cc -pthread -lpthread... yes
checking whether cc is Clang... (cached) yes
checking whether Clang needs flag to prevent "argument unused" warning when linking with -pthread... (cached) no
checking for joinable pthread attribute... (cached) PTHREAD_CREATE_JOINABLE
checking whether more special flags are required for pthreads... (cached) no
checking for PTHREAD_PRIO_INHERIT... (cached) yes
checking if weak symbols are supported... yes
checking which crypto library to use for libmongocrypt... darwin
checking whether byte ordering is bigendian... (cached) no
checking for a sed that does not truncate output... /usr/bin/sed
checking for ld used by cc... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 786432
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking if cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fno-common
checking if cc PIC flag -fno-common works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin21.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common
checking if g++ PIC flag -fno-common works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin21.6.0 dyld
(cached) (cached) checking how to hardcode library paths into programs... immediate
configure: patching config.h.in
configure: creating ./config.status

mongodb was configured with the following options:

Build configuration:
  CC                                               : cc
  CFLAGS                                           : -g -O2
  Extra CFLAGS                                     :  -Wno-deprecated-declarations -Wno-cast-align -Wno-unneeded-internal-declaration -Wno-error=unused-command-line-argument
  Developers flags (slow)                          :
  Code Coverage flags (extra slow)                 :
  libmongoc                                        : Bundled (1.25.2)
  libbson                                          : Bundled (1.25.2)
  libmongocrypt                                    : Bundled (1.8.2)
  LDFLAGS                                          :
  EXTRA_LDFLAGS                                    :
  MONGODB_SHARED_LIBADD                            : -framework Security -framework CoreFoundation -lsasl2 -lresolv  -lpthread -pthread -lpthread -pthread

Please submit bugreports at:
  https://jira.mongodb.org/browse/PHPC


config.status: creating /private/tmp/pear/install/mongodb/src/libmongoc/src/common/common-config.h
config.status: creating /private/tmp/pear/install/mongodb/src/libmongoc/src/libbson/src/bson/bson-config.h
config.status: creating /private/tmp/pear/install/mongodb/src/libmongoc/src/libbson/src/bson/bson-version.h
config.status: creating /private/tmp/pear/install/mongodb/src/libmongoc/src/libmongoc/src/mongoc/mongoc-config.h
config.status: creating /private/tmp/pear/install/mongodb/src/libmongoc/src/libmongoc/src/mongoc/mongoc-version.h
config.status: creating /private/tmp/pear/install/mongodb/src/libmongoc/src/zlib-1.2.13/zconf.h
config.status: creating /private/tmp/pear/install/mongodb/src/libmongocrypt/src/mongocrypt-config.h
config.status: creating config.h



running: make
/bin/sh /private/tmp/pear/install/pear-build-rootfLK3co/mongodb-1.17.1/libtool --mode=compile cc -Isrc/libmongoc/src/common/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/common/ -I/private/tmp/pear/install/pear-build-rootfLK3co/mongodb-1.17.1/include -I/private/tmp/pear/install/pear-build-rootfLK3co/mongodb-1.17.1/main -I/private/tmp/pear/install/mongodb -I/opt/homebrew/Cellar/php/8.3.0/include/php -I/opt/homebrew/Cellar/php/8.3.0/include/php/main -I/opt/homebrew/Cellar/php/8.3.0/include/php/TSRM -I/opt/homebrew/Cellar/php/8.3.0/include/php/Zend -I/opt/homebrew/Cellar/php/8.3.0/include/php/ext -I/opt/homebrew/Cellar/php/8.3.0/include/php/ext/date/lib -I/private/tmp/pear/install/mongodb/src/libmongoc/src/common/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/libbson/src/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/libbson/src/jsonsl/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/libmongoc/src/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/utf8proc-2.8.0/ -I/private/tm
p/pear/install/mongodb/src/libmongoc/src/zlib-1.2.13/ -I/private/tmp/pear/install/mongodb/src/libmongocrypt/src/ -I/private/tmp/pear/install/mongodb/src/libmongocrypt/kms-message/src/ -I/private/tmp/pear/install/mongodb/src/libmongocrypt-compat/ -I/private/tmp/pear/install/mongodb/src/ -I/private/tmp/pear/install/mongodb/src/BSON/ -I/private/tmp/pear/install/mongodb/src/MongoDB/ -I/private/tmp/pear/install/mongodb/src/MongoDB/Exception/ -I/private/tmp/pear/install/mongodb/src/MongoDB/Monitoring/ -I/private/tmp/pear/install/mongodb/src/contrib/  -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_DARWIN_C_SOURCE -DHAVE_CONFIG_H  -g -O2 -D_GNU_SOURCE    -DBSON_COMPILATION -DMONGOC_COMPILATION -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_DARWIN_C_SOURCE -pthread -DKMS_MESSAGE_ENABLE_CRYPTO=1 -DKMS_MESSAGE_ENABLE_CRYPTO_COMMON_CRYPTO=1 -DKMS_MESSAGE_LITTLE_ENDIAN=1 -pthread -c /private/tmp/pear/install/mongodb/src/libmongoc/src/common/common-b64.c -o src/libmongoc/src/common/common-b64.lo  -MMD -MF
src/libmongoc/src/common/common-b64.dep -MT src/libmongoc/src/common/common-b64.lo
mkdir src/libmongoc/src/common/.libs
 cc -Isrc/libmongoc/src/common/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/common/ -I/private/tmp/pear/install/pear-build-rootfLK3co/mongodb-1.17.1/include -I/private/tmp/pear/install/pear-build-rootfLK3co/mongodb-1.17.1/main -I/private/tmp/pear/install/mongodb -I/opt/homebrew/Cellar/php/8.3.0/include/php -I/opt/homebrew/Cellar/php/8.3.0/include/php/main -I/opt/homebrew/Cellar/php/8.3.0/include/php/TSRM -I/opt/homebrew/Cellar/php/8.3.0/include/php/Zend -I/opt/homebrew/Cellar/php/8.3.0/include/php/ext -I/opt/homebrew/Cellar/php/8.3.0/include/php/ext/date/lib -I/private/tmp/pear/install/mongodb/src/libmongoc/src/common/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/libbson/src/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/libbson/src/jsonsl/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/libmongoc/src/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/utf8proc-2.8.0/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/zlib-1.2.13/ -I/private/tmp/pear/install/mongodb/src
/libmongocrypt/src/ -I/private/tmp/pear/install/mongodb/src/libmongocrypt/kms-message/src/ -I/private/tmp/pear/install/mongodb/src/libmongocrypt-compat/ -I/private/tmp/pear/install/mongodb/src/ -I/private/tmp/pear/install/mongodb/src/BSON/ -I/private/tmp/pear/install/mongodb/src/MongoDB/ -I/private/tmp/pear/install/mongodb/src/MongoDB/Exception/ -I/private/tmp/pear/install/mongodb/src/MongoDB/Monitoring/ -I/private/tmp/pear/install/mongodb/src/contrib/ -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_DARWIN_C_SOURCE -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DBSON_COMPILATION -DMONGOC_COMPILATION -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_DARWIN_C_SOURCE -pthread -DKMS_MESSAGE_ENABLE_CRYPTO=1 -DKMS_MESSAGE_ENABLE_CRYPTO_COMMON_CRYPTO=1 -DKMS_MESSAGE_LITTLE_ENDIAN=1 -pthread -c /private/tmp/pear/install/mongodb/src/libmongoc/src/common/common-b64.c -MMD -MF src/libmongoc/src/common/common-b64.dep -MT src/libmongoc/src/common/common-b64.lo  -fno-common -DPIC -o src/libmongoc/src/common/.libs/commo
n-b64.o
/bin/sh /private/tmp/pear/install/pear-build-rootfLK3co/mongodb-1.17.1/libtool --mode=compile cc -Isrc/libmongoc/src/common/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/common/ -I/private/tmp/pear/install/pear-build-rootfLK3co/mongodb-1.17.1/include -I/private/tmp/pear/install/pear-build-rootfLK3co/mongodb-1.17.1/main -I/private/tmp/pear/install/mongodb -I/opt/homebrew/Cellar/php/8.3.0/include/php -I/opt/homebrew/Cellar/php/8.3.0/include/php/main -I/opt/homebrew/Cellar/php/8.3.0/include/php/TSRM -I/opt/homebrew/Cellar/php/8.3.0/include/php/Zend -I/opt/homebrew/Cellar/php/8.3.0/include/php/ext -I/opt/homebrew/Cellar/php/8.3.0/include/php/ext/date/lib -I/private/tmp/pear/install/mongodb/src/libmongoc/src/common/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/libbson/src/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/libbson/src/jsonsl/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/libmongoc/src/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/utf8proc-2.8.0/ -I/private/tm
p/pear/install/mongodb/src/libmongoc/src/zlib-1.2.13/ -I/private/tmp/pear/install/mongodb/src/libmongocrypt/src/ -I/private/tmp/pear/install/mongodb/src/libmongocrypt/kms-message/src/ -I/private/tmp/pear/install/mongodb/src/libmongocrypt-compat/ -I/private/tmp/pear/install/mongodb/src/ -I/private/tmp/pear/install/mongodb/src/BSON/ -I/private/tmp/pear/install/mongodb/src/MongoDB/ -I/private/tmp/pear/install/mongodb/src/MongoDB/Exception/ -I/private/tmp/pear/install/mongodb/src/MongoDB/Monitoring/ -I/private/tmp/pear/install/mongodb/src/contrib/  -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_DARWIN_C_SOURCE -DHAVE_CONFIG_H  -g -O2 -D_GNU_SOURCE    -DBSON_COMPILATION -DMONGOC_COMPILATION -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_DARWIN_C_SOURCE -pthread -DKMS_MESSAGE_ENABLE_CRYPTO=1 -DKMS_MESSAGE_ENABLE_CRYPTO_COMMON_CRYPTO=1 -DKMS_MESSAGE_LITTLE_ENDIAN=1 -pthread -c /private/tmp/pear/install/mongodb/src/libmongoc/src/common/common-md5.c -o src/libmongoc/src/common/common-md5.lo  -MMD -MF
src/libmongoc/src/common/common-md5.dep -MT src/libmongoc/src/common/common-md5.lo
 cc -Isrc/libmongoc/src/common/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/common/ -I/private/tmp/pear/install/pear-build-rootfLK3co/mongodb-1.17.1/include -I/private/tmp/pear/install/pear-build-rootfLK3co/mongodb-1.17.1/main -I/private/tmp/pear/install/mongodb -I/opt/homebrew/Cellar/php/8.3.0/include/php -I/opt/homebrew/Cellar/php/8.3.0/include/php/main -I/opt/homebrew/Cellar/php/8.3.0/include/php/TSRM -I/opt/homebrew/Cellar/php/8.3.0/include/php/Zend -I/opt/homebrew/Cellar/php/8.3.0/include/php/ext -I/opt/homebrew/Cellar/php/8.3.0/include/php/ext/date/lib -I/private/tmp/pear/install/mongodb/src/libmongoc/src/common/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/libbson/src/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/libbson/src/jsonsl/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/libmongoc/src/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/utf8proc-2.8.0/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/zlib-1.2.13/ -I/private/tmp/pear/install/mongodb/src
/libmongocrypt/src/ -I/private/tmp/pear/install/mongodb/src/libmongocrypt/kms-message/src/ -I/private/tmp/pear/install/mongodb/src/libmongocrypt-compat/ -I/private/tmp/pear/install/mongodb/src/ -I/private/tmp/pear/install/mongodb/src/BSON/ -I/private/tmp/pear/install/mongodb/src/MongoDB/ -I/private/tmp/pear/install/mongodb/src/MongoDB/Exception/ -I/private/tmp/pear/install/mongodb/src/MongoDB/Monitoring/ -I/private/tmp/pear/install/mongodb/src/contrib/ -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_DARWIN_C_SOURCE -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DBSON_COMPILATION -DMONGOC_COMPILATION -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_DARWIN_C_SOURCE -pthread -DKMS_MESSAGE_ENABLE_CRYPTO=1 -DKMS_MESSAGE_ENABLE_CRYPTO_COMMON_CRYPTO=1 -DKMS_MESSAGE_LITTLE_ENDIAN=1 -pthread -c /private/tmp/pear/install/mongodb/src/libmongoc/src/common/common-md5.c -MMD -MF src/libmongoc/src/common/common-md5.dep -MT src/libmongoc/src/common/common-md5.lo  -fno-common -DPIC -o src/libmongoc/src/common/.libs/commo
n-md5.o
/bin/sh /private/tmp/pear/install/pear-build-rootfLK3co/mongodb-1.17.1/libtool --mode=compile cc -Isrc/libmongoc/src/common/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/common/ -I/private/tmp/pear/install/pear-build-rootfLK3co/mongodb-1.17.1/include -I/private/tmp/pear/install/pear-build-rootfLK3co/mongodb-1.17.1/main -I/private/tmp/pear/install/mongodb -I/opt/homebrew/Cellar/php/8.3.0/include/php -I/opt/homebrew/Cellar/php/8.3.0/include/php/main -I/opt/homebrew/Cellar/php/8.3.0/include/php/TSRM -I/opt/homebrew/Cellar/php/8.3.0/include/php/Zend -I/opt/homebrew/Cellar/php/8.3.0/include/php/ext -I/opt/homebrew/Cellar/php/8.3.0/include/php/ext/date/lib -I/private/tmp/pear/install/mongodb/src/libmongoc/src/common/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/libbson/src/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/libbson/src/jsonsl/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/libmongoc/src/ -I/private/tmp/pear/install/mongodb/src/libmongoc/src/utf8proc-2.8.0/ -I/private/tm
p/pear/install/mongodb/src/libmongoc/src/zlib-1.2.13/ -I/private/tmp/pear/install/mongodb/src/libmongocrypt/src/ -I/private/tmp/pear/install/mongodb/src/libmongocrypt/kms-message/src/ -I/private/tmp/pear/install/mongodb/src/libmongocrypt-compat/ -I/private/tmp/pear/install/mongodb/src/ -I/private/tmp/pear/install/mongodb/src/BSON/ -I/private/tmp/pear/install/mongodb/src/MongoDB/ -I/private/tmp/pear/install/mongodb/src/MongoDB/Exception/ -I/private/tmp/pear/install/mongodb/src/MongoDB/Monitoring/ -I/private/tmp/pear/install/mongodb/src/contrib/  -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_DARWIN_C_SOURCE -DHAVE_CONFIG_H  -g -O2 -D_GNU_SOURCE    -DBSON_COMPILATION -DMONGOC_COMPILATION -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_DARWIN_C_SOURCE -pthread -DKMS_MESSAGE_ENABLE_CRYPTO=1 -DKMS_MESSAGE_ENABLE_CRYPTO_COMMON_CRYPTO=1 -DKMS_MESSAGE_LITTLE_ENDIAN=1 -pthread -c /private/tmp/pear/install/mongodb/src/libmongoc/src/common/common-thread.c -o src/libmongoc/src/common/common-thread.lo  -MM
D -MF src/libmongoc/src/common/common-thread.dep -MT src/libmongoc/src/common/common-thread.lo
^C

These are the versions of my current environment:

  • PHP - 8.3.0

  • MongoDB - 7.0.2

  • Macbook M1 running MacOS Monterey Version 12.5

I tried following the suggestions made in this forum, but it didn't work for me as the installation still fails when it reaches "running: make".

PHP location is - /opt/homebrew/bin/php

Pecl location is - /opt/homebrew/bin/pecl

Thanks in advance.

0

There are 0 best solutions below