phpbrew icon indicating copy to clipboard operation
phpbrew copied to clipboard

Can't install php 7.2.4 on HighSierra 10.13.4

Open mihailShumilov opened this issue 7 years ago • 7 comments

Output

===> phpbrew will now build 7.2.4
---> Parsing variants from command arguments '+default +tidy'
===> Loading and resolving variants...
Checking distribution checksum...
Checksum matched: 11658a0d764dc94023b9fb60d4b5eb75d438ad17981efe70abb0d0d09a447ef3
===> Distribution file was successfully extracted, skipping...
Source Directory: /Users/godson/.phpbrew/build/php-7.2.4
Writing variant info to /Users/godson/.phpbrew/php/php-7.2.4/phpbrew.variants
===> Checking patches...
Checking patch for replace apache php module name with custom version name
Enabled variants: [tidy, xml, opcache, bcmath, bz2, calendar, cli, ctype, dom, fileinfo, filter, ipc, json, mbregex, mbstring, mhash, mcrypt, pcntl, pcre, pdo, pear, phar, posix, readline, sockets, tokenizer, curl, openssl, zip]
Disabled variants: []
Found existing build.log, renaming it to /Users/godson/.phpbrew/build/php-7.2.4/build.log.1524494794
===> Configuring 7.2.4...


Use tail command to see what's going on:
   $ tail -F /Users/godson/.phpbrew/build/php-7.2.4/build.log


./configure '--cache-file=/Users/godson/.phpbrew/cache/config.cache' '--prefix=/Users/godson/.phpbrew/php/php-7.2.4' '--with-config-file-path=/Users/godson/.phpbrew/php/php-7.2.4/etc' '--with-config-file-scan-dir=/Users/godson/.phpbrew/php/php-7.2.4/var/db' '--disable-all' '--enable-phar' '--enable-session' '--enable-short-tags' '--enable-tokenizer' '--with-pcre-regex' '--with-zlib=/usr' '--with-tidy' '--enable-dom' '--enable-libxml' '--enable-simplexml' '--enable-xml' '--enable-xmlreader' '--enable-xmlwriter' '--with-xsl' '--with-libxml-dir=/usr/local/opt/libxml2' '--enable-opcache' '--enable-bcmath' '--with-bz2=/usr' '--enable-calendar' '--enable-cli' '--enable-ctype' '--enable-dom' '--enable-fileinfo' '--enable-filter' '--enable-shmop' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-json' '--enable-mbregex' '--enable-mbstring' '--with-mhash=/usr/local' '--with-mcrypt=/usr/local' '--enable-pcntl' '--with-pcre-regex' '--with-pcre-dir=/usr/local' '--enable-pdo' '--with-pear=/Users/godson/.phpbrew/php/php-7.2.4/lib/php/pear' '--enable-phar' '--enable-posix' '--with-readline=/usr/local/opt/readline' '--enable-sockets' '--enable-tokenizer' '--with-curl=/usr' '--with-openssl=/usr/local' '--enable-zip' >> /Users/godson/.phpbrew/build/php-7.2.4/build.log 2>&1
Error: Configure failed:
The last 5 lines in the log file:
checking for cc... cc

checking whether the C compiler works... no

configure: error: in `/Users/godson/.phpbrew/build/php-7.2.4':

configure: error: C compiler cannot create executables

See `config.log' for more details

Please checkout the build log file for more details:
	 tail /Users/godson/.phpbrew/build/php-7.2.4/build.log

Command

phpbrew --debug install 7.2.4 +default +tidy

Platform

OS: 10.13.4

mihailShumilov avatar Apr 23 '18 14:04 mihailShumilov

xcode-select --install
xcode-select --switch /Applications/Xcode.app

Then try again.

skyzyx avatar Apr 24 '18 07:04 skyzyx

xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

xcode-select --switch /Applications/Xcode.app
xcode-select: error: --switch must be run as root (e.g. `sudo xcode-select --switch <xcode_folder_path>`).


sudo xcode-select --switch /Applications/Xcode.app
Password:

phpbrew --debug install 7.2.4 +default +tidy
/usr/local/bin/phpbrew: line 1: 404:: command not found

more bad result...

mihailShumilov avatar Apr 24 '18 08:04 mihailShumilov

Reinstall phpbrew. I ran into this last night. It appears that the self-update command is broken.

skyzyx avatar Apr 24 '18 16:04 skyzyx

I did reinstall and I still have an issue

checking whether the C compiler works... no

configure: error: in `/Users/godson/.phpbrew/build/php-7.2.4':

configure: error: C compiler cannot create executables

mihailShumilov avatar Apr 24 '18 19:04 mihailShumilov

more logs

./configure: line 624: test: too many arguments
./configure: line 624: test: too many arguments
./configure: line 624: test: too many arguments
./configure: line 624: test: too many arguments
./configure: line 624: test: /Library/Application: binary operator expected
./configure: line 624: test: /Library/Application: binary operator expected
configure: WARNING: unrecognized options: --with-mcrypt
configure: loading cache /Users/godson/.phpbrew/cache/config.cache
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... x86_64-apple-darwin17.5.0
checking host system type... x86_64-apple-darwin17.5.0
checking target system type... x86_64-apple-darwin17.5.0
checking whether the C compiler works... no
configure: error: in `/Users/godson/.phpbrew/build/php-7.2.4':
configure: error: C compiler cannot create executables
See `config.log' for more details

I still can't install...

mihailShumilov avatar Apr 27 '18 11:04 mihailShumilov

And config logs


This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ./configure --cache-file=/Users/godson/.phpbrew/cache/config.cache --prefix=/Users/godson/.phpbrew/php/php-7.2.4 --with-config-file-path=/Users/godson/.phpbrew/php/php-7.2.4/etc --with-config-file-scan-dir=/Users/godson/.phpbrew/php/php-7.2.4/var/db --disable-all --enable-phar --enable-session --enable-short-tags --enable-tokenizer --with-pcre-regex --with-zlib=/usr --with-tidy --enable-dom --enable-libxml --enable-simplexml --enable-xml --enable-xmlreader --enable-xmlwriter --with-xsl --with-libxml-dir=/usr/local/opt/libxml2 --enable-opcache --enable-bcmath --with-bz2=/usr --enable-calendar --enable-cli --enable-ctype --enable-dom --enable-fileinfo --enable-filter --enable-shmop --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-json --enable-mbregex --enable-mbstring --with-mhash=/usr/local --with-mcrypt=/usr/local --enable-pcntl --with-pcre-regex --with-pcre-dir=/usr/local --enable-pdo --with-pear=/Users/godson/.phpbrew/php/php-7.2.4/lib/php/pear --enable-phar --enable-posix --with-readline=/usr/local/opt/readline --enable-sockets --enable-tokenizer --with-curl=/usr --with-openssl=/usr/local --enable-zip

## --------- ##
## Platform. ##
## --------- ##

hostname = MacBook-Pro.local
uname -m = x86_64
uname -r = 17.5.0
uname -s = Darwin
uname -v = Darwin Kernel Version 17.5.0: Fri Apr 13 19:32:32 PDT 2018; root:xnu-4570.51.2~1/RELEASE_X86_64

/usr/bin/uname -p = i386
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = Mach kernel version:
	 Darwin Kernel Version 17.5.0: Fri Apr 13 19:32:32 PDT 2018; root:xnu-4570.51.2~1/RELEASE_X86_64
Kernel configured for up to 8 processors.
4 processors are physically available.
8 processors are logically available.
Processor type: x86_64h (Intel x86-64h Haswell)
Processors active: 0 1 2 3 4 5 6 7
Primary memory available: 8.00 gigabytes
Default processor set: 336 tasks, 2244 threads, 8 processors
Load average: 2.49, Mach factor: 5.50
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/opt/curl/bin
PATH: /usr/local/opt/libxml2/bin
PATH: /usr/local/opt/icu4c/sbin
PATH: /usr/local/opt/icu4c/bin
PATH: /usr/local/bin
PATH: /usr/local/bin
PATH: /usr/bin/
PATH: /usr/local/opt/openssl/bin
PATH: /Applications/BB10 WebWorks SDK 2.2.0.15
PATH: /Applications/BB10 WebWorks SDK 2.2.0.15/cordova-blackberry/bin/dependencies/bb-tools/bin
PATH: /Library/Application Support/GoodSync
PATH: /Users/godson/androidSdk/platform-tools
PATH: /Users/godson/androidSdk/tools
PATH: /Applications/Xcode.app/Contents/Developer/usr/bin
PATH: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /opt/X11/bin
PATH: /Applications/Server.app/Contents/ServerRoot/usr/bin
PATH: /Applications/Server.app/Contents/ServerRoot/usr/sbin
PATH: /usr/local/sbin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:3154: loading cache /Users/godson/.phpbrew/cache/config.cache
configure:3240: checking for grep that handles long lines and -e
configure:3298: result: /usr/bin//grep
configure:3303: checking for egrep
configure:3365: result: /usr/bin//grep -E
configure:3370: checking for a sed that does not truncate output
configure:3424: result: /usr/bin//sed
configure:3534: checking build system type
configure:3548: result: x86_64-apple-darwin17.5.0
configure:3568: checking host system type
configure:3581: result: x86_64-apple-darwin17.5.0
configure:3601: checking target system type
configure:3614: result: x86_64-apple-darwin17.5.0
configure:3847: checking for C compiler version
configure:3856: /usr/bin/gcc --version >&5
gcc: error: unable to find utility "gcc", not a developer tool or in PATH
configure:3867: $? = 72
configure:3856: /usr/bin/gcc -v >&5
gcc: error: unable to find utility "gcc", not a developer tool or in PATH
configure:3867: $? = 72
configure:3856: /usr/bin/gcc -V >&5
gcc: error: unable to find utility "gcc", not a developer tool or in PATH
configure:3867: $? = 72
configure:3856: /usr/bin/gcc -qversion >&5
gcc: error: unable to find utility "gcc", not a developer tool or in PATH
configure:3867: $? = 72
configure:3887: checking whether the C compiler works
configure:3909: /usr/bin/gcc  /usr/local/opt/openssl/include: /usr/local/opt/openssl/lib: conftest.c  >&5
gcc: error: unable to find utility "gcc", not a developer tool or in PATH
configure:3913: $? = 72
configure:3951: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3956: error: in `/Users/godson/.phpbrew/build/php-7.2.4':
configure:3958: error: C compiler cannot create executables
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=x86_64-apple-darwin17.5.0
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value=/usr/bin/gcc
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=/usr/local/opt/openssl/include:
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value=/usr/local/opt/openssl/lib:
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_YACC_set=
ac_cv_env_YACC_value=
ac_cv_env_YFLAGS_set=
ac_cv_env_YFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-apple-darwin17.5.0
ac_cv_path_EGREP='/usr/bin//grep -E'
ac_cv_path_GREP=/usr/bin//grep
ac_cv_target=x86_64-apple-darwin17.5.0
lt_cv_path_SED=/usr/bin//sed

## ----------------- ##
## Output variables. ##
## ----------------- ##

ALLOCA=''
AR=''
AWK=''
CC='/usr/bin/gcc'
CFLAGS=''
CONFIGURE_COMMAND=' '\''./configure'\''  '\''--cache-file=/Users/godson/.phpbrew/cache/config.cache'\'' '\''--prefix=/Users/godson/.phpbrew/php/php-7.2.4'\'' '\''--with-config-file-path=/Users/godson/.phpbrew/php/php-7.2.4/etc'\'' '\''--with-config-file-scan-dir=/Users/godson/.phpbrew/php/php-7.2.4/var/db'\'' '\''--disable-all'\'' '\''--enable-session'\'' '\''--enable-short-tags'\'' '\''--with-zlib=/usr'\'' '\''--with-tidy'\'' '\''--enable-libxml'\'' '\''--enable-simplexml'\'' '\''--enable-xml'\'' '\''--enable-xmlreader'\'' '\''--enable-xmlwriter'\'' '\''--with-xsl'\'' '\''--with-libxml-dir=/usr/local/opt/libxml2'\'' '\''--enable-opcache'\'' '\''--enable-bcmath'\'' '\''--with-bz2=/usr'\'' '\''--enable-calendar'\'' '\''--enable-cli'\'' '\''--enable-ctype'\'' '\''--enable-dom'\'' '\''--enable-fileinfo'\'' '\''--enable-filter'\'' '\''--enable-shmop'\'' '\''--enable-sysvsem'\'' '\''--enable-sysvshm'\'' '\''--enable-sysvmsg'\'' '\''--enable-json'\'' '\''--enable-mbregex'\'' '\''--enable-mbstring'\'' '\''--with-mhash=/usr/local'\'' '\''--with-mcrypt=/usr/local'\'' '\''--enable-pcntl'\'' '\''--with-pcre-regex'\'' '\''--with-pcre-dir=/usr/local'\'' '\''--enable-pdo'\'' '\''--with-pear=/Users/godson/.phpbrew/php/php-7.2.4/lib/php/pear'\'' '\''--enable-phar'\'' '\''--enable-posix'\'' '\''--with-readline=/usr/local/opt/readline'\'' '\''--enable-sockets'\'' '\''--enable-tokenizer'\'' '\''--with-curl=/usr'\'' '\''--with-openssl=/usr/local'\'' '\''--enable-zip'\'''
CONFIGURE_OPTIONS=' '\''--cache-file=/Users/godson/.phpbrew/cache/config.cache'\'' '\''--prefix=/Users/godson/.phpbrew/php/php-7.2.4'\'' '\''--with-config-file-path=/Users/godson/.phpbrew/php/php-7.2.4/etc'\'' '\''--with-config-file-scan-dir=/Users/godson/.phpbrew/php/php-7.2.4/var/db'\'' '\''--disable-all'\'' '\''--enable-session'\'' '\''--enable-short-tags'\'' '\''--with-zlib=/usr'\'' '\''--with-tidy'\'' '\''--enable-libxml'\'' '\''--enable-simplexml'\'' '\''--enable-xml'\'' '\''--enable-xmlreader'\'' '\''--enable-xmlwriter'\'' '\''--with-xsl'\'' '\''--with-libxml-dir=/usr/local/opt/libxml2'\'' '\''--enable-opcache'\'' '\''--enable-bcmath'\'' '\''--with-bz2=/usr'\'' '\''--enable-calendar'\'' '\''--enable-cli'\'' '\''--enable-ctype'\'' '\''--enable-dom'\'' '\''--enable-fileinfo'\'' '\''--enable-filter'\'' '\''--enable-shmop'\'' '\''--enable-sysvsem'\'' '\''--enable-sysvshm'\'' '\''--enable-sysvmsg'\'' '\''--enable-json'\'' '\''--enable-mbregex'\'' '\''--enable-mbstring'\'' '\''--with-mhash=/usr/local'\'' '\''--with-mcrypt=/usr/local'\'' '\''--enable-pcntl'\'' '\''--with-pcre-regex'\'' '\''--with-pcre-dir=/usr/local'\'' '\''--enable-pdo'\'' '\''--with-pear=/Users/godson/.phpbrew/php/php-7.2.4/lib/php/pear'\'' '\''--enable-phar'\'' '\''--enable-posix'\'' '\''--with-readline=/usr/local/opt/readline'\'' '\''--enable-sockets'\'' '\''--enable-tokenizer'\'' '\''--with-curl=/usr'\'' '\''--with-openssl=/usr/local'\'' '\''--enable-zip'\'''
CPP=''
CPPFLAGS='/usr/local/opt/openssl/include:'
CXX=''
CXXCPP=''
CXXFLAGS=''
DEBUG_CFLAGS=''
DEFS=''
DSYMUTIL=''
ECHO='/bin/echo'
ECHO_C='\c'
ECHO_N=''
ECHO_T=''
EGREP='/usr/bin//grep -E'
EXEEXT=''
EXPANDED_BINDIR=''
EXPANDED_DATADIR=''
EXPANDED_EXTENSION_DIR=''
EXPANDED_LIBDIR=''
EXPANDED_LOCALSTATEDIR=''
EXPANDED_MANDIR=''
EXPANDED_PEAR_INSTALLDIR=''
EXPANDED_PHP_CONFIG_FILE_PATH=''
EXPANDED_PHP_CONFIG_FILE_SCAN_DIR=''
EXPANDED_SBINDIR=''
EXPANDED_SYSCONFDIR=''
EXTENSION_DIR=''
EXTRA_INCLUDES=''
EXTRA_LDFLAGS=''
EXTRA_LDFLAGS_PROGRAM=''
EXTRA_LIBS=''
FB_CONFIG=''
GREP='/usr/bin//grep'
ICU_CONFIG=''
INCLUDES=''
INCLUDE_PATH=''
INLINE_CFLAGS=''
INSTALL_IT=''
KRB5_CONFIG=''
LDFLAGS='/usr/local/opt/openssl/lib:'
LIBOBJS=''
LIBS=''
LIBTOOL=''
LN_S=''
LTLIBOBJS=''
LTP=''
LTP_GENHTML=''
MANFMT=''
NATIVE_RPATHS=''
NMEDIT=''
OBJEXT=''
OCI8_DIR=''
OCI8_ORACLE_VERSION=''
OCI8_SHARED_LIBADD=''
ODBC_INCLUDE=''
ODBC_LFLAGS=''
ODBC_LIBS=''
ODBC_TYPE=''
OPENSSL_INCDIR_OPT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PDO_MYSQL_MODULE_TYPE=''
PDO_OCI_DIR=''
PDO_OCI_SHARED_LIBADD=''
PDO_OCI_VERSION=''
PEAR_INSTALLDIR=''
PHP_INSTALLED_SAPIS=''
PHP_LDFLAGS=''
PHP_LIBS=''
PHP_VERSION='7.2.4'
PHP_VERSION_ID='70204'
PKG_CONFIG=''
PROG_SENDMAIL=''
RANLIB=''
RE2C=''
SED='/usr/bin//sed'
SHELL='/bin/sh'
SHLIB_DL_SUFFIX_NAME=''
SHLIB_SUFFIX_NAME=''
SNMP_CONFIG=''
STRIP=''
TOUCH=''
UNZIP=''
YACC=''
YFLAGS=''
ZEND_EXTRA_LIBS=''
abs_builddir='/Users/godson/.phpbrew/build/php-7.2.4'
abs_srcdir='/Users/godson/.phpbrew/build/php-7.2.4'
ac_ct_CC=''
ac_ct_CXX=''
bindir='${exec_prefix}/bin'
build='x86_64-apple-darwin17.5.0'
build_alias=''
build_cpu='x86_64'
build_os='darwin17.5.0'
build_vendor='apple'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
host='x86_64-apple-darwin17.5.0'
host_alias='x86_64-apple-darwin17.5.0'
host_cpu='x86_64'
host_os='darwin17.5.0'
host_vendor='apple'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
php_abs_top_builddir='/Users/godson/.phpbrew/build/php-7.2.4'
php_abs_top_srcdir='/Users/godson/.phpbrew/build/php-7.2.4'
php_fpm_group=''
php_fpm_localstatedir=''
php_fpm_prefix=''
php_fpm_sysconfdir=''
php_fpm_systemd=''
php_fpm_user=''
prefix='/Users/godson/.phpbrew/php/php-7.2.4'
program_prefix='NONE'
program_suffix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target='x86_64-apple-darwin17.5.0'
target_alias=''
target_cpu='x86_64'
target_os='darwin17.5.0'
target_vendor='apple'

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""

configure: exit 77

mihailShumilov avatar Apr 27 '18 11:04 mihailShumilov

./configure: line 624: test: too many arguments
./configure: line 624: test: /Library/Application: binary operator expected

I also got same errors. A cause is that the PATH env var contains whitespaces.

Removing the following paths from PATH may fix errors.

PATH: /Applications/BB10 WebWorks SDK 2.2.0.15
PATH: /Applications/BB10 WebWorks SDK 2.2.0.15/cordova-blackberry/bin/dependencies/bb-tools/bin
PATH: /Library/Application Support/GoodSync

nmotod avatar Aug 04 '18 02:08 nmotod

The issue is outdated and closed now.

peter279k avatar Dec 01 '22 17:12 peter279k