Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install of PHP 7.2.34 fails on M1 Macbook #142

Open
daamsie opened this issue Dec 13, 2022 · 0 comments
Open

Install of PHP 7.2.34 fails on M1 Macbook #142

daamsie opened this issue Dec 13, 2022 · 0 comments

Comments

@daamsie
Copy link

daamsie commented Dec 13, 2022

With all the right homebrew packages in place, this error ends up blocking an install.

> asdf install php 7.2.34

...

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: /var/folders/kx/wsz1xqjj5cncxlwzwh1rh_4c0000gp/T/php-src-php-7.2.34/modules/opcache.a(shared_alloc_shm.o) has no symbols
/bin/sh /var/folders/kx/wsz1xqjj5cncxlwzwh1rh_4c0000gp/T/php-src-php-7.2.34/libtool --silent --preserve-dup-deps --mode=compile cc -I/usr/local/Cellar/icu4c/69.1/include  -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Iext/intl/ -I/var/folders/kx/wsz1xqjj5cncxlwzwh1rh_4c0000gp/T/php-src-php-7.2.34/ext/intl/ -DPHP_ATOM_INC -I/var/folders/kx/wsz1xqjj5cncxlwzwh1rh_4c0000gp/T/php-src-php-7.2.34/include -I/var/folders/kx/wsz1xqjj5cncxlwzwh1rh_4c0000gp/T/php-src-php-7.2.34/main -I/var/folders/kx/wsz1xqjj5cncxlwzwh1rh_4c0000gp/T/php-src-php-7.2.34 -I/var/folders/kx/wsz1xqjj5cncxlwzwh1rh_4c0000gp/T/php-src-php-7.2.34/ext/date/lib -I/usr/local/Cellar/libxml2/2.9.12/include/libxml2 -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/zlib/include -I/usr/local/opt/webp/include -I/usr/local/opt/jpeg/include -I/usr/local/opt/libpng/include -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/opt/gettext/include -I/usr/local/opt/gmp/include -I/usr/local/opt/libiconv/include -I/usr/local/Cellar/icu4c/69.1/include -I/var/folders/kx/wsz1xqjj5cncxlwzwh1rh_4c0000gp/T/php-src-php-7.2.34/ext/mbstring/oniguruma -I/var/folders/kx/wsz1xqjj5cncxlwzwh1rh_4c0000gp/T/php-src-php-7.2.34/ext/mbstring/libmbfl -I/var/folders/kx/wsz1xqjj5cncxlwzwh1rh_4c0000gp/T/php-src-php-7.2.34/ext/mbstring/libmbfl/mbfl -I/usr/local/include -I/var/folders/kx/wsz1xqjj5cncxlwzwh1rh_4c0000gp/T/php-src-php-7.2.34/ext/sqlite3/libsqlite -I/usr/local/opt/libedit/include -I/usr/local/opt/libsodium/include -I/usr/local/opt/libzip/include -I/var/folders/kx/wsz1xqjj5cncxlwzwh1rh_4c0000gp/T/php-src-php-7.2.34/TSRM -I/var/folders/kx/wsz1xqjj5cncxlwzwh1rh_4c0000gp/T/php-src-php-7.2.34/Zend  -no-cpp-precomp  -I/usr/local/opt/libiconv/include -g -O2 -fvisibility=hidden -DZEND_SIGNALS   -c /var/folders/kx/wsz1xqjj5cncxlwzwh1rh_4c0000gp/T/php-src-php-7.2.34/ext/intl/formatter/formatter_data.c -o ext/intl/formatter/formatter_data.lo
mkdir: ext/intl/formatter/.libs: File exists
/var/folders/kx/wsz1xqjj5cncxlwzwh1rh_4c0000gp/T/php-src-php-7.2.34/ext/intl/collator/collator_sort.c:349:26: error: use of undeclared identifier 'TRUE'
        collator_sort_internal( TRUE, INTERNAL_FUNCTION_PARAM_PASSTHRU );
                                ^
/var/folders/kx/wsz1xqjj5cncxlwzwh1rh_4c0000gp/T/php-src-php-7.2.34/ext/intl/collator/collator_sort.c:543:26: error: use of undeclared identifier 'FALSE'
        collator_sort_internal( FALSE, INTERNAL_FUNCTION_PARAM_PASSTHRU );
                                ^
2 errors generated.
make: *** [ext/intl/collator/collator_sort.lo] Error 1
make: *** Waiting for unfinished jobs....

I found reference to the same error here: henkrehorst/homebrew-php#134

The fix includes passing a flag -DU_DEFINE_FALSE_AND_TRUE=1

I have tested and this does appear to fix. I'll submit a PR. Untested on any other systems / installs though, so please test before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant