Установка Mosquitto-alpha приводит к следующему (не обращайте внимания на каталог, в любом случае я получаю тот же результат):
Код: Выделить всё
@MiniServer Mosquitto-0.4.0 % pecl install Mosquitto-alpha
downloading Mosquitto-0.4.0.tgz ...
Starting to download Mosquitto-0.4.0.tgz (23,804 bytes)
........done: 23,804 bytes
5 source files, building
running: phpize
Configuring for:
PHP Version: 8.5
PHP Api Version: 20250925
Zend Module Api No: 20250925
Zend Extension Api No: 420250925
Please provide the prefix of the libmosquitto installation [autodetect] : /opt/homebrew/opt/mosquitto
building in /private/tmp/pear/temp/pear-build-peterwileyhvsdt26sus1uaOWn0O6/Mosquitto-0.4.0
running: /private/tmp/pear/temp/Mosquitto/configure --with-php-config=/opt/homebrew/opt/php/bin/php-config --with-mosquitto=/opt/homebrew/opt/mosquitto
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 build system type... aarch64-apple-darwin25.2.0
checking host system type... aarch64-apple-darwin25.2.0
checking target system type... aarch64-apple-darwin25.2.0
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking for pkg-config... /opt/homebrew/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
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 egrep -e... (cached) /usr/bin/grep -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -Wl,-rpath,... yes
checking for PHP prefix... /opt/homebrew/Cellar/php/8.5.3
checking for PHP includes... -I/opt/homebrew/Cellar/php/8.5.3/include/php -I/opt/homebrew/Cellar/php/8.5.3/include/php/main -I/opt/homebrew/Cellar/php/8.5.3/include/php/TSRM -I/opt/homebrew/Cellar/php/8.5.3/include/php/Zend -I/opt/homebrew/Cellar/php/8.5.3/include/php/ext -I/opt/homebrew/Cellar/php/8.5.3/include/php/ext/date/lib
checking for PHP extension directory... /opt/homebrew/Cellar/php/8.5.3/pecl/20250925
checking for PHP installed headers prefix... /opt/homebrew/Cellar/php/8.5.3/include/php
checking if debugging is enabled... no
checking if PHP is built with thread safety (ZTS)... no
Configuring extension
checking for mosquitto support... yes, shared
checking for cc options needed to detect all undeclared functions... none needed
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 whether strerror_r is declared... yes
checking whether strerror_r returns char *... no
Configuring libtool
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... ld: warning: -single_module is obsolete
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... darwin25.2.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
Generating files
configure: creating build directories
configure: creating Makefile
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/tmp/pear/temp/pear-build-peterwileyhvsdt26sus1uaOWn0O6/Mosquitto-0.4.0/libtool --tag=CC --mode=compile cc -I. -I/private/tmp/pear/temp/Mosquitto -I/opt/homebrew/Cellar/php/8.5.3/include/php -I/opt/homebrew/Cellar/php/8.5.3/include/php/main -I/opt/homebrew/Cellar/php/8.5.3/include/php/TSRM -I/opt/homebrew/Cellar/php/8.5.3/include/php/Zend -I/opt/homebrew/Cellar/php/8.5.3/include/php/ext -I/opt/homebrew/Cellar/php/8.5.3/include/php/ext/date/lib -I/opt/homebrew/opt/mosquitto/include -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /private/tmp/pear/temp/Mosquitto/mosquitto.c -o mosquitto.lo -MMD -MF mosquitto.dep -MT mosquitto.lo
mkdir .libs
cc -I. -I/private/tmp/pear/temp/Mosquitto -I/opt/homebrew/Cellar/php/8.5.3/include/php -I/opt/homebrew/Cellar/php/8.5.3/include/php/main -I/opt/homebrew/Cellar/php/8.5.3/include/php/TSRM -I/opt/homebrew/Cellar/php/8.5.3/include/php/Zend -I/opt/homebrew/Cellar/php/8.5.3/include/php/ext -I/opt/homebrew/Cellar/php/8.5.3/include/php/ext/date/lib -I/opt/homebrew/opt/mosquitto/include -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /private/tmp/pear/temp/Mosquitto/mosquitto.c -MMD -MF mosquitto.dep -MT mosquitto.lo -fno-common -DPIC -o .libs/mosquitto.o
In file included from /private/tmp/pear/temp/Mosquitto/mosquitto.c:12:
In file included from /private/tmp/pear/temp/Mosquitto/php_mosquitto.h:37:
In file included from /opt/homebrew/opt/mosquitto/include/mosquitto.h:30:
In file included from /opt/homebrew/opt/mosquitto/include/mosquitto/libcommon.h:40:
/opt/homebrew/opt/mosquitto/include/mosquitto/libcommon_cjson.h:31:10: fatal error: 'cjson/cJSON.h' file not found
31 | #include
| ^~~~~~~~~~~~~~~
1 error generated.
make: *** [mosquitto.lo] Error 1
ERROR: `make' failed
Может кто-нибудь объяснить, что происходит, что происходит не так? Я подозреваю, что проблема в пути, но я на пределе своего понимания файловой системы/схемы.
Подробнее: https://stackoverflow.com/questions/799 ... on-cjson-h
Мобильная версия