Closed designermonkey closed 3 years ago
I guess it's related to #16
Thanks for the link. I cannot get v0.8.0
to work either, but for different reasons.
Is there a stable version available at present?
@designermonkey I was thinking it's the PHP version 7.4 that's the problem. Writing my own little ticket (#19), just then, I checked closed ones, saw a resemblance between #16 and your one, and was hoping to help the devs :)
To ack your Q: I'm sorry to guess the 0.* version hints on "unstability".
I am able to build Parle 0.8.1 (w/w/o -utf32) against https://ports.macports.org/port/php73 (in env PATH) on "darwin17.7.0" macOS 10.13 High Sierra. (By the output you posted I deduct you're using "darwin19.0.0" macOS 10.15 Catalina, and Homebrew's "/usr/local/Cellar".)
My PECL (pear) was built recently (for the purpose of parle), approximately, by running curl -O https://pear.php.net/go-pear.phar && sudo php73 -d detect_unicode=0 go-pear.phar
.
Almost directly from my notes, the command line I build Parle with in bash (v5.0.11 w/ profile) is:
(pkg=channel://pecl.php.net/parle-0.8.1 &&C=( --enable-parle --enable-parle-utf32 )&&unset sudo&&nm=${pkg##*/}&&nm=${nm%-*}&&pecl=/usr/local/pear/bin/pecl && php=73 &&d="$($pecl config-get temp_dir)"/$nm&&$sudo $pecl -v -d php_suffix=$php bundle -d "$(dirname "$d")" $pkg&&(cd "$d"&&$sudo phpize&&$sudo ./configure "${C[@]}" && $sudo make && $sudo make test && sudo make install)&&rm -Ir "$d")
(ymmv - not least regarding the hardcoded path to /usr/local/pear/bin/pecl
, oddly different to my which pecl
but my PATH is massive).
Running all but the && sudo make install
part of previous command yields the following [almost] entire output:
downloading parle-0.8.1.tgz ...
Starting to download parle-0.8.1.tgz (112,744 bytes)
.........................done: 112,744 bytes
Package ready at '/private/tmp/pear/install/parle'
/tmp/pear/install/parle
/tmp/pear/install/parle
Configuring for:
PHP Api Version: 20180731
Zend Module Api No: 20180731
Zend Extension Api No: 320180731
checking for grep that handles long lines and -e... /opt/local/bin/grep
checking for egrep... /opt/local/bin/grep -E
checking for a sed that does not truncate output... /opt/local/bin/gsed
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 we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... 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... x86_64-apple-darwin17.7.0
checking host system type... x86_64-apple-darwin17.7.0
checking target system type... x86_64-apple-darwin17.7.0
checking for PHP prefix... /opt/local
checking for PHP includes... -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include
checking for PHP extension directory... /opt/local/lib/php73/extensions/no-debug-non-zts-20180731
checking for PHP installed headers prefix... /opt/local/include/php73/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 1.2.1 (ok)
checking for gawk... gawk
checking whether to enable parle support... yes, shared
checking whether to enable internal UTF-32 support in parle... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by cc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /opt/local/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E
checking the maximum length of command line arguments... 196608
checking command to parse /opt/local/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 (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin17.7.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++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/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 (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin17.7.0 dyld
(cached) (cached) checking how to hardcode library paths into programs... immediate
configure: creating ./config.status
config.status: creating config.h
/bin/sh /tmp/pear/install/parle/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -I. -I/tmp/pear/install/parle -DPHP_ATOM_INC -I/tmp/pear/install/parle/include -I/tmp/pear/install/parle/main -I/tmp/pear/install/parle -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/tmp/pear/install/parle/lib/lexertl14 -I/tmp/pear/install/parle/lib/parsertl14 -I/tmp/pear/install/parle/lib/parle -I/tmp/pear/install/parle/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/install/parle/parle.cpp -o parle.lo
mkdir .libs
g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -I. -I/tmp/pear/install/parle -DPHP_ATOM_INC -I/tmp/pear/install/parle/include -I/tmp/pear/install/parle/main -I/tmp/pear/install/parle -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/tmp/pear/install/parle/lib/lexertl14 -I/tmp/pear/install/parle/lib/parsertl14 -I/tmp/pear/install/parle/lib/parle -I/tmp/pear/install/parle/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/install/parle/parle.cpp -fno-common -DPIC -o .libs/parle.o
In file included from /tmp/pear/install/parle/parle.cpp:46:
In file included from /tmp/pear/install/parle/lib/parsertl14/parsertl/generator.hpp:12:
/tmp/pear/install/parle/lib/parsertl14/parsertl/rules.hpp:56:37: warning: '&&' within '||' [-Wlogical-op-parentheses]
_type == rhs_._type && _id < rhs_._id;
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/tmp/pear/install/parle/lib/parsertl14/parsertl/rules.hpp:56:37: note: place parentheses around the '&&' expression to silence this warning
_type == rhs_._type && _id < rhs_._id;
^
( )
In file included from /tmp/pear/install/parle/parle.cpp:54:
In file included from /opt/local/include/php73/php/main/php.h:33:
In file included from /opt/local/include/php73/php/Zend/zend.h:335:
/opt/local/include/php73/php/Zend/zend_operators.h:113:18: warning: 'finite' is deprecated: first deprecated in macOS 10.9 [-Wdeprecated-declarations]
if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) {
^
/opt/local/include/php73/php/main/php_config.h:2653:24: note: expanded from macro 'zend_finite'
#define zend_finite(a) finite(a)
^
/usr/include/math.h:757:12: note: 'finite' has been explicitly marked deprecated here
extern int finite(double) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_9, __IPHONE_NA, __IPHONE_NA);
^
In file included from /tmp/pear/install/parle/parle.cpp:54:
In file included from /opt/local/include/php73/php/main/php.h:33:
In file included from /opt/local/include/php73/php/Zend/zend.h:335:
/opt/local/include/php73/php/Zend/zend_operators.h:124:18: warning: 'finite' is deprecated: first deprecated in macOS 10.9 [-Wdeprecated-declarations]
if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) {
^
/opt/local/include/php73/php/main/php_config.h:2653:24: note: expanded from macro 'zend_finite'
#define zend_finite(a) finite(a)
^
/usr/include/math.h:757:12: note: 'finite' has been explicitly marked deprecated here
extern int finite(double) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_9, __IPHONE_NA, __IPHONE_NA);
^
In file included from /tmp/pear/install/parle/parle.cpp:46:
/tmp/pear/install/parle/lib/parsertl14/parsertl/generator.hpp:784:29: warning: enumeration values 'token' and 'right' not handled in switch [-Wswitch]
switch (lhs_assoc_)
^
/tmp/pear/install/parle/lib/parsertl14/parsertl/generator.hpp:784:29: note: add missing switch cases
switch (lhs_assoc_)
^
In file included from /tmp/pear/install/parle/parle.cpp:49:
/tmp/pear/install/parle/lib/parsertl14/parsertl/parse.hpp:22:17: warning: enumeration value 'accept' not handled in switch [-Wswitch]
switch (results_.entry.action)
^
/tmp/pear/install/parle/lib/parsertl14/parsertl/parse.hpp:22:17: note: add missing switch cases
switch (results_.entry.action)
^
/tmp/pear/install/parle/lib/parsertl14/parsertl/parse.hpp:22:17: warning: enumeration value 'accept' not handled in switch [-Wswitch]
switch (results_.entry.action)
^
/tmp/pear/install/parle/lib/parsertl14/parsertl/parse.hpp:22:17: note: add missing switch cases
switch (results_.entry.action)
^
6 warnings generated.
/bin/sh /tmp/pear/install/parle/libtool --mode=link g++ -DPHP_ATOM_INC -I/tmp/pear/install/parle/include -I/tmp/pear/install/parle/main -I/tmp/pear/install/parle -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/tmp/pear/install/parle/lib/lexertl14 -I/tmp/pear/install/parle/lib/parsertl14 -I/tmp/pear/install/parle/lib/parle -I/tmp/pear/install/parle/lib -DHAVE_CONFIG_H -g -O2 -o parle.la -export-dynamic -avoid-version -prefer-pic -module -rpath /tmp/pear/install/parle/modules parle.lo -lstdc++
g++ ${wl}-undefined ${wl}dynamic_lookup -o .libs/parle.so -bundle .libs/parle.o -lstdc++
dsymutil .libs/parle.so || :
creating parle.la
(cd .libs && rm -f parle.la && ln -s ../parle.la parle.la)
/bin/sh /tmp/pear/install/parle/libtool --mode=install cp ./parle.la /tmp/pear/install/parle/modules
cp ./.libs/parle.so /tmp/pear/install/parle/modules/parle.so
cp ./.libs/parle.lai /tmp/pear/install/parle/modules/parle.la
----------------------------------------------------------------------
Libraries have been installed in:
/tmp/pear/install/parle/modules
[…]
Build complete.
Don't forget to run 'make test'.
=====================================================================
PHP : /opt/local/bin/php73
PHP_SAPI : cli
PHP_VERSION : 7.3.13
ZEND_VERSION: 3.3.13
PHP_OS : Darwin - Darwin [private].local 17.7.0 Darwin Kernel Version 17.7.0: [personal] x86_64
INI actual : /private/tmp/pear/install/parle/tmp-php.ini
More .INIs :
CWD : /private/tmp/pear/install/parle
Extra dirs :
VALGRIND : Not used
=====================================================================
TIME START 2020-01-08 02:35:36
=====================================================================
PASS Simple stackless calc [tests/calc_001.phpt]
PASS Advanced calc with state [tests/calc_002.phpt]
PASS Advanced calc with state [tests/calc_003.phpt]
PASS Lex PHP var statement [tests/lexer_001.phpt]
PASS Lex various number formats [tests/lexer_002.phpt]
SKIP Lex JSON [tests/lexer_003.phpt] reason: not for internal UTF-32
PASS Restartable lexing [tests/lexer_004.phpt]
PASS Lexer marker and cursor [tests/lexer_005.phpt]
PASS Lexer token callback [tests/lexer_006.phpt]
PASS Lex JSON [tests/lexer_007.phpt]
PASS Lexer flags [tests/lexer_flags.phpt]
PASS Lexer functionality while it's used by parser [tests/lexer_position_tracking_001.phpt]
PASS return type in arg info [tests/reflection_001.phpt]
PASS Test lexer/parser argument checking [tests/reflection_002.phpt]
PASS Stack var_dump() [tests/stack_001.phpt]
PASS Parse words from a string [tests/words_001.phpt]
SKIP Parse words from a string, UTF-8 regex [tests/words_002.phpt] reason: not for internal UTF-32
PASS Parse words from a string, UTF-8 regex [tests/words_003.phpt]
=====================================================================
TIME END 2020-01-08 02:35:38
=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped : 0
Exts tested : 27
---------------------------------------------------------------------
Number of tests : 18 16
Tests skipped : 2 ( 11.1%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 0 ( 0.0%) ( 0.0%)
Expected fail : 0 ( 0.0%) ( 0.0%)
Tests passed : 16 ( 88.9%) (100.0%)
---------------------------------------------------------------------
Time taken : 2 seconds
=====================================================================
[…]
Do you want to send this report now? [Yns]:
Please enter your email address.
(Your address will be mangled so that it will not go out on any
mailinglist in plain text): [personal]
Posting to http://qa.php.net/buildtest-process.php
Thank you for helping to make PHP better.
Finally, some more detail on my toolchain - Xcode v10.1 (officially unsupported on my OS version):
g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Hoping this helps anybody :) cheers.
Thanks for the reports. The 7.4 and 8.0 patch from Remi has been released in 0.8.2. With this, consider the issue solved.
Thanks!
Hi there, I cannot get this to compile using my Mac and version 0.8.1.
I've tried building with pecl, and this is the entire output.
I'm no C guy so have no idea how to even look to help fix this. I can answer any questions about my setup though. I don't know if there's a bug or it's my compiler or nything. Any help is appreciated as I really want to play with this extension :)