vjardin / bcgen

A bytecode generator (compiler) for PHP7
56 stars 19 forks source link

Compile error #21

Open Diego65 opened 1 year ago

Diego65 commented 1 year ago
/install/bc # uname -a
Linux 4.12.14-lp151.28.48-default #1 SMP Fri Apr 17 05:38:36 UTC 2020 (18849d1) x86_64 x86_64 x86_64 GNU/Linux

/install/bc # php -v
PHP 7.2.5 (cli) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

~/install/bc # phpize
Configuring for:
PHP Api Version:         20170718
Zend Module Api No:      20170718
Zend Extension Api No:   320170718

/install/bc # ./configure
configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /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 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-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib
checking for PHP extension directory... /usr/lib64/php7/extensions
checking for PHP installed headers prefix... /usr/include/php7
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 1.0.3 (ok)
checking for gawk... gawk
checking whether to enable Zend bcgen support... yes, shared
checking whether to enable file based caching... yes
checking whether to enable copying PHP CODE pages into HUGE PAGES... yes
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 for unistd.h... (cached) yes
checking sys/uio.h usability... yes
checking sys/uio.h presence... yes
checking for sys/uio.h... yes
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/x86_64-suse-linux/bin/ld
checking if the linker (/usr/x86_64-suse-linux/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/x86_64-suse-linux/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/x86_64-suse-linux/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
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands

`/root/install/bc # make
/root/install/bc/libtool --mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/install/bc -DPHP_ATOM_INC -I/root/install/bc/include -I/root/install/bc/main -I/root/install/bc -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /root/install/bc/ZendAccelerator.c -o ZendAccelerator.lo
libtool: compile:  cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/install/bc -DPHP_ATOM_INC -I/root/install/bc/include -I/root/install/bc/main -I/root/install/bc -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/install/bc/ZendAccelerator.c  -fPIC -DPIC -o .libs/ZendAccelerator.o
/root/install/bc/ZendAccelerator.c: In function 'cache_script_in_file_cache':
/root/install/bc/ZendAccelerator.c:167:29: error: 'ZEND_COMPILE_WITH_FILE_CACHE' undeclared (first use in this function); did you mean 'ZEND_EX_USE_RUN_TIME_CACHE'?
     CG(compiler_options) |= ZEND_COMPILE_WITH_FILE_CACHE;
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                             ZEND_EX_USE_RUN_TIME_CACHE
/root/install/bc/ZendAccelerator.c:167:29: note: each undeclared identifier is reported only once for each function it appears in
/root/install/bc/ZendAccelerator.c: In function 'bcgen_compile_file':
/root/install/bc/ZendAccelerator.c:279:33: error: 'ZEND_COMPILE_WITH_FILE_CACHE' undeclared (first use in this function); did you mean 'ZEND_EX_USE_RUN_TIME_CACHE'?
         CG(compiler_options) |= ZEND_COMPILE_WITH_FILE_CACHE;
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                 ZEND_EX_USE_RUN_TIME_CACHE
/root/install/bc/ZendAccelerator.c:310:31: error: 'ZEND_ACC_EARLY_BINDING' undeclared (first use in this function); did you mean 'ZEND_ACC_VARIADIC'?
         (op_array->fn_flags & ZEND_ACC_EARLY_BINDING) ?
                               ^~~~~~~~~~~~~~~~~~~~~~
                               ZEND_ACC_VARIADIC
/root/install/bc/ZendAccelerator.c:311:13: warning: implicit declaration of function 'zend_build_delayed_early_binding_list'; did you mean 'zend_do_delayed_early_binding'? [-Wimplicit-function-declaration]
             zend_build_delayed_early_binding_list(op_array) :
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             zend_do_delayed_early_binding
/root/install/bc/ZendAccelerator.c: In function 'accel_startup':
/root/install/bc/ZendAccelerator.c:704:28: error: 'zend_post_startup_cb' undeclared (first use in this function); did you mean 'zend_post_startup'?
     orig_post_startup_cb = zend_post_startup_cb;
                            ^~~~~~~~~~~~~~~~~~~~
                            zend_post_startup
/root/install/bc/ZendAccelerator.c: In function 'accel_post_startup':
/root/install/bc/ZendAccelerator.c:744:40: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
     accelerator_orig_zend_resolve_path = zend_resolve_path;
                                        ^
/root/install/bc/ZendAccelerator.c:745:23: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
     zend_resolve_path = persistent_zend_resolve_path;
                       ^
make: *** [Makefile:193: ZendAccelerator.lo] Error 1
`

What is wrong? Thank You!