weltling / parle

Parser and lexer for PHP
Other
82 stars 9 forks source link

Compile error on Ubuntu 20.04.1 LTS (WSL) #20

Closed ReinRaus closed 3 years ago

ReinRaus commented 3 years ago

OS: Ubuntu 20.04.1 LTS
Host OS: Windows 10 WSL2

sudo pecl install parle-0.8.1
downloading parle-0.8.1.tgz ...
Starting to download parle-0.8.1.tgz (112,744 bytes)
.........................done: 112,744 bytes
58 source files, building
running: phpize
Configuring for:
PHP Api Version:         20190902
Zend Module Api No:      20190902
Zend Extension Api No:   320190902
building in /tmp/pear/temp/pear-build-rootesYSi9/parle-0.8.1
running: /tmp/pear/temp/parle/configure --with-php-config=/usr/bin/php-config
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 pkg-config... no
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 for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20190902
checking for PHP installed headers prefix... /usr/include/php/20190902
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... gawk
checking whether to enable parle support... yes, shared
checking whether to enable internal UTF-32 support in parle... no
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
/tmp/pear/temp/parle/configure: line 4876: cd: ./lib: No such file or directory
/tmp/pear/temp/parle/configure: line 4938: cd: ./lib: No such file or directory
/tmp/pear/temp/parle/configure: line 5000: cd: ./lib: No such file or directory
checking for a sed that does not truncate output... /usr/bin/sed
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /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 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... 1572864
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 if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
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++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
(cached) (cached) checking how to hardcode library paths into programs... immediate
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/bash /tmp/pear/temp/pear-build-rootesYSi9/parle-0.8.1/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -I. -I/tmp/pear/temp/parle -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootesYSi9/parle-0.8.1/include -I/tmp/pear/temp/pear-build-rootesYSi9/parle-0.8.1/main -I/tmp/pear/temp/parle -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/tmp/pear/temp/parle/lib/lexertl14 -I/lexertl14 -I/tmp/pear/temp/parle/lib/parsertl14 -I/parsertl14 -I/tmp/pear/temp/parle/lib/parle -I/parle -I/tmp/pear/temp/parle/lib -I/tmp/pear/temp/pear-build-rootesYSi9/parle-0.8.1/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/parle/parle.cpp -o parle.lo
mkdir .libs
 g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -I. -I/tmp/pear/temp/parle -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootesYSi9/parle-0.8.1/include -I/tmp/pear/temp/pear-build-rootesYSi9/parle-0.8.1/main -I/tmp/pear/temp/parle -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/tmp/pear/temp/parle/lib/lexertl14 -I/lexertl14 -I/tmp/pear/temp/parle/lib/parsertl14 -I/parsertl14 -I/tmp/pear/temp/parle/lib/parle -I/parle -I/tmp/pear/temp/parle/lib -I/tmp/pear/temp/pear-build-rootesYSi9/parle-0.8.1/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/parle/parle.cpp  -fPIC -DPIC -o .libs/parle.o
/tmp/pear/temp/parle/parle.cpp: In function ‘int zm_startup_parle(int, int)’:
/tmp/pear/temp/parle/parle.cpp:2517:40: error: invalid conversion from ‘void (*)(zval*, zval*, zval*, void**) noexcept’ {aka ‘void (*)(_zval_struct*, _zval_struct*, _zval_struct*, void**)’} to ‘zend_object_write_property_t’ {aka ‘_zval_struct* (*)(_zval_struct*, _zval_struct*, _zval_struct*, void**)’} [-fpermissive]
 2517 |  parle_lexer_handlers.write_property = php_parle_lexer_write_property;
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                        |
      |                                        void (*)(zval*, zval*, zval*, void**) noexcept {aka void (*)(_zval_struct*, _zval_struct*, _zval_struct*, void**)}
/tmp/pear/temp/parle/parle.cpp:2532:41: error: invalid conversion from ‘void (*)(zval*, zval*, zval*, void**) noexcept’ {aka ‘void (*)(_zval_struct*, _zval_struct*, _zval_struct*, void**)’} to ‘zend_object_write_property_t’ {aka ‘_zval_struct* (*)(_zval_struct*, _zval_struct*, _zval_struct*, void**)’} [-fpermissive]
 2532 |  parle_rlexer_handlers.write_property = php_parle_rlexer_write_property;
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                         |
      |                                         void (*)(zval*, zval*, zval*, void**) noexcept {aka void (*)(_zval_struct*, _zval_struct*, _zval_struct*, void**)}
/tmp/pear/temp/parle/parle.cpp:2564:41: error: invalid conversion from ‘void (*)(zval*, zval*, zval*, void**) noexcept’ {aka ‘void (*)(_zval_struct*, _zval_struct*, _zval_struct*, void**)’} to ‘zend_object_write_property_t’ {aka ‘_zval_struct* (*)(_zval_struct*, _zval_struct*, _zval_struct*, void**)’} [-fpermissive]
 2564 |  parle_parser_handlers.write_property = php_parle_parser_write_property;
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                         |
      |                                         void (*)(zval*, zval*, zval*, void**) noexcept {aka void (*)(_zval_struct*, _zval_struct*, _zval_struct*, void**)}
/tmp/pear/temp/parle/parle.cpp:2579:42: error: invalid conversion from ‘void (*)(zval*, zval*, zval*, void**) noexcept’ {aka ‘void (*)(_zval_struct*, _zval_struct*, _zval_struct*, void**)’} to ‘zend_object_write_property_t’ {aka ‘_zval_struct* (*)(_zval_struct*, _zval_struct*, _zval_struct*, void**)’} [-fpermissive]
 2579 |  parle_rparser_handlers.write_property = php_parle_rparser_write_property;
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                          |
      |                                          void (*)(zval*, zval*, zval*, void**) noexcept {aka void (*)(_zval_struct*, _zval_struct*, _zval_struct*, void**)}
/tmp/pear/temp/parle/parle.cpp:2594:40: error: invalid conversion from ‘void (*)(zval*, zval*, zval*, void**) noexcept’ {aka ‘void (*)(_zval_struct*, _zval_struct*, _zval_struct*, void**)’} to ‘zend_object_write_property_t’ {aka ‘_zval_struct* (*)(_zval_struct*, _zval_struct*, _zval_struct*, void**)’} [-fpermissive]
 2594 |  parle_stack_handlers.write_property = php_parle_stack_write_property;
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                        |
      |                                        void (*)(zval*, zval*, zval*, void**) noexcept {aka void (*)(_zval_struct*, _zval_struct*, _zval_struct*, void**)}
make: *** [Makefile:192: parle.lo] Error 1
ERROR: `make' failed
PHPGuus commented 3 years ago

This is also true on $ pear version PEAR Version: 1.10.12 PHP Version: 7.4.13 Zend Engine Version: 3.4.0 Running on: Linux 5.9.11-100.fc32.x86_64 #1 SMP Tue Nov 24 19:16:53 UTC 2020 x86_64

PHPGuus commented 3 years ago

Compiling from the master branch works like a charm, though

weltling commented 3 years ago

Thanks for the reports. The 7.4 and 8.0 compatibility have been fixed in the recently issued release 0.8.2.

Thanks!