pecl установить yaml на big sur m1 mac

Так что это та же проблема, что и Не могу установить расширение PHP yaml на Mac Big Sur, но я пытаюсь найти лучшее решение, чем вставка жестко закодированных значений.

Я считаю, что должен быть в состоянии использовать

export LDFLAGS="-L/opt/homebrew/lib/" 
export CFLAGS="-I/opt/homebrew/include/"

Но при установке получаю ту же ошибку:

downloading yaml-2.2.1.tgz ...
Starting to download yaml-2.2.1.tgz (40,977 bytes)
............done: 40,977 bytes
8 source files, building
running: phpize
Configuring for:
PHP Api Version:         20170718
Zend Module Api No:      20170718
Zend Extension Api No:   320170718
configure.ac:7: warning: $as_echo is obsolete; use AS_ECHO(["message"]) instead
aclocal.m4:2723: PHP_CONFIG_NICE is expanded from...
configure.ac:7: the top level
configure.ac:34: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:34: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
aclocal.m4:301: PHP_RUNPATH_SWITCH is expanded from...
configure.ac:34: the top level
configure.ac:149: warning: The macro `AC_LANG_C' is obsolete.
configure.ac:149: You should run autoupdate.
./lib/autoconf/c.m4:72: AC_LANG_C is expanded from...
aclocal.m4:6027: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:6026: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:3366: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:3348: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:3335: AC_PROG_LIBTOOL is expanded from...
configure.ac:149: the top level
configure.ac:149: warning: The macro `AC_LANG_C' is obsolete.
configure.ac:149: You should run autoupdate.
./lib/autoconf/c.m4:72: AC_LANG_C is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
aclocal.m4:3857: _LT_AC_LOCK is expanded from...
aclocal.m4:4484: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
aclocal.m4:6027: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:6026: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:3366: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:3348: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:3335: AC_PROG_LIBTOOL is expanded from...
configure.ac:149: the top level
configure.ac:149: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:149: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
aclocal.m4:3857: _LT_AC_LOCK is expanded from...
aclocal.m4:4484: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
aclocal.m4:6027: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:6026: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:3366: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:3348: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:3335: AC_PROG_LIBTOOL is expanded from...
configure.ac:149: the top level
configure.ac:149: warning: back quotes and double quotes must not be escaped in: $as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe
aclocal.m4:4484: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
aclocal.m4:6027: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:6026: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:3366: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:3348: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:3335: AC_PROG_LIBTOOL is expanded from...
configure.ac:149: the top level
configure.ac:149: warning: back quotes and double quotes must not be escaped in: $as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe
aclocal.m4:4484: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
aclocal.m4:6027: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:6026: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:3366: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:3348: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:3335: AC_PROG_LIBTOOL is expanded from...
configure.ac:149: the top level
configure.ac:149: warning: back quotes and double quotes must not be escaped in: $as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not exist
aclocal.m4:5217: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:3366: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:3348: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:3335: AC_PROG_LIBTOOL is expanded from...
configure.ac:149: the top level
configure.ac:149: warning: back quotes and double quotes must not be escaped in: $as_me: WARNING: output file \`$ofile' does not exist
aclocal.m4:5217: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:3366: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:3348: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:3335: AC_PROG_LIBTOOL is expanded from...
configure.ac:149: the top level
configure.ac:149: warning: back quotes and double quotes must not be escaped in: $as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not look like a libtool script
aclocal.m4:5217: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:3366: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:3348: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:3335: AC_PROG_LIBTOOL is expanded from...
configure.ac:149: the top level
configure.ac:149: warning: back quotes and double quotes must not be escaped in: $as_me: WARNING: output file \`$ofile' does not look like a libtool script
aclocal.m4:5217: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:3366: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:3348: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:3335: AC_PROG_LIBTOOL is expanded from...
configure.ac:149: the top level
configure.ac:149: warning: back quotes and double quotes must not be escaped in: $as_me:${as_lineno-$LINENO}: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'
aclocal.m4:5217: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:3366: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:3348: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:3335: AC_PROG_LIBTOOL is expanded from...
configure.ac:149: the top level
configure.ac:149: warning: back quotes and double quotes must not be escaped in: $as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'
aclocal.m4:5217: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:3366: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:3348: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:3335: AC_PROG_LIBTOOL is expanded from...
configure.ac:149: the top level
configure.ac:149: warning: back quotes and double quotes must not be escaped in: tag name \"$tagname\" already exists
aclocal.m4:5217: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:3366: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:3348: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:3335: AC_PROG_LIBTOOL is expanded from...
configure.ac:149: the top level
configure.ac:149: warning: The macro `AC_LANG_CPLUSPLUS' is obsolete.
configure.ac:149: You should run autoupdate.
./lib/autoconf/c.m4:262: AC_LANG_CPLUSPLUS is expanded from...
aclocal.m4:6109: _LT_AC_LANG_CXX_CONFIG is expanded from...
aclocal.m4:6108: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
aclocal.m4:5217: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:3366: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:3348: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:3335: AC_PROG_LIBTOOL is expanded from...
configure.ac:149: the top level
configure.ac:149: warning: back quotes and double quotes must not be escaped in: $as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe
aclocal.m4:4484: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
aclocal.m4:6109: _LT_AC_LANG_CXX_CONFIG is expanded from...
aclocal.m4:6108: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
aclocal.m4:5217: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:3366: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:3348: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:3335: AC_PROG_LIBTOOL is expanded from...
configure.ac:149: the top level
configure.ac:149: warning: back quotes and double quotes must not be escaped in: $as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe
aclocal.m4:4484: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
aclocal.m4:6109: _LT_AC_LANG_CXX_CONFIG is expanded from...
aclocal.m4:6108: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
aclocal.m4:5217: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:3366: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:3348: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:3335: AC_PROG_LIBTOOL is expanded from...
configure.ac:149: the top level
configure.ac:199: warning: The macro `AC_CONFIG_HEADER' is obsolete.
configure.ac:199: You should run autoupdate.
./lib/autoconf/status.m4:719: AC_CONFIG_HEADER is expanded from...
configure.ac:199: the top level
Please provide the prefix of libyaml installation [autodetect] :
building in /private/tmp/pear/temp/pear-build-adammarsheMny6w/yaml-2.2.1
running: /private/tmp/pear/temp/yaml/configure --with-php-config=/opt/homebrew/opt/[email protected]/bin/php-config --with-yaml
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 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 whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... arm-apple-darwin20.3.0
checking host system type... arm-apple-darwin20.3.0
checking target system type... arm-apple-darwin20.3.0
checking for PHP prefix... /opt/homebrew/Cellar/[email protected]/7.2.34_4
checking for PHP includes... -I/opt/homebrew/Cellar/[email protected]/7.2.34_4/include/php -I/opt/homebrew/Cellar/[email protected]/7.2.34_4/include/php/main -I/opt/homebrew/Cellar/[email protected]/7.2.34_4/include/php/TSRM -I/opt/homebrew/Cellar/[email protected]/7.2.34_4/include/php/Zend -I/opt/homebrew/Cellar/[email protected]/7.2.34_4/include/php/ext -I/opt/homebrew/Cellar/[email protected]/7.2.34_4/include/php/ext/date/lib
checking for PHP extension directory... /opt/homebrew/Cellar/[email protected]/7.2.34_4/pecl/20170718
checking for PHP installed headers prefix... /opt/homebrew/Cellar/[email protected]/7.2.34_4/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to enable LibYAML suppot... yes, shared
checking for yaml headers... not found
configure: error: Please install libyaml
ERROR: `/private/tmp/pear/temp/yaml/configure --with-php-config=/opt/homebrew/opt/[email protected]/bin/php-config --with-yaml' failed

Я также пытался связать напрямую с каталогами libyaml include lib в /opt/homebrew, но это не работает.

export LDFLAGS="-L/opt/homebrew/opt/libyaml/lib" 
export CFLAGS="-I/opt/homebrew/opt/libyaml/include/"

У кого-нибудь есть идеи? Я также попытался установить как pecl php_suffix, так и php_prefix, но получил следующую ошибку:

  downloading yaml-2.2.1.tgz ...
  Starting to download yaml-2.2.1.tgz (40,977 bytes)
  ............done: 40,977 bytes
  8 source files, building
  running: phpizeLDFLAGS="-L/opt/homebrew/opt/libyaml/lib" CFLAGS="-I/opt/homebrew/opt/libyaml/include/"
  Please provide the prefix of libyaml installation [autodetect] : building in /private/tmp/pear/temp/pear-build-adammarshy2nRRr/yaml-2.2.1
  running: /private/tmp/pear/temp/yaml/configure --with-yaml
  sh: /private/tmp/pear/temp/yaml/configure: No such file or directory
  ERROR: `/private/tmp/pear/temp/yaml/configure --with-yaml' failed


install [--with-mariadb] [--brew-opt]

Любые идеи?


person Adam Marsh    schedule 02.04.2021    source источник
comment
То же самое. Вы нашли решение?   -  person trogwar    schedule 24.05.2021
comment
Привет! Да, я сделал, я обновлю ответ с ответом сейчас.   -  person Adam Marsh    schedule 25.05.2021


Ответы (1)


Лучшим решением, которое я нашел, было сделать следующее:

echo $(brew --prefix yaml) | pecl install yaml
person Adam Marsh    schedule 25.05.2021