patrickallaert / php-apm

PHP APM (Alternative PHP Monitor)
http://pecl.php.net/package/APM
Other
310 stars 101 forks source link

Unable to compile #76

Open marinhekman opened 2 years ago

marinhekman commented 2 years ago

I would still like to use php-apm. Tried both pecl and compiling without sqllite3, see errors. Using Unbuntu 20.04 LTS with php 7.4 and mysql8

Needs fixing I guess

Pecl:

# pecl install apm
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading APM-2.1.3.tgz ...
Starting to download APM-2.1.3.tgz (33,188 bytes)
.........done: 33,188 bytes
14 source files, building
running: phpize
Configuring for:
PHP Api Version:         20190902
Zend Module Api No:      20190902
Zend Extension Api No:   320190902
Enable Sqlite3 support [yes] :
Enable MariaDB/MySQL support [yes] : ^C
root@DESKTOP-U6O60I2:/mnt/d/BUAS/code/php-apm# pecl install apm
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading APM-2.1.3.tgz ...
Starting to download APM-2.1.3.tgz (33,188 bytes)
.........done: 33,188 bytes
14 source files, building
running: phpize
Configuring for:
PHP Api Version:         20190902
Zend Module Api No:      20190902
Zend Extension Api No:   320190902
Enable Sqlite3 support [yes] : no
Enable MariaDB/MySQL support [yes] : yes
Enable Socket support [yes] : yes
Enable Statsd support [yes] : yes
building in /tmp/pear/temp/pear-build-root19WaoW/APM-2.1.3
running: /tmp/pear/temp/APM/configure --with-php-config=/usr/bin/php-config --with-sqlite3=no --with-mysql --enable-socket=yes --enable-statsd=yes
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 apm support... yes, shared
checking enable support for sqlite3... no
checking enable support for MySQL... yes
checking enable support for statsd... yes
checking enable support for socket... yes
checking enable the debug file... no
checking set default sqlite3 default DB path... no
checking for the location of libz... no
checking for mysql_close in -lmysqlclient... yes
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 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
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/bash /tmp/pear/temp/pear-build-root19WaoW/APM-2.1.3/libtool --mode=compile cc  -I. -I/tmp/pear/temp/APM -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root19WaoW/APM-2.1.3/include -I/tmp/pear/temp/pear-build-root19WaoW/APM-2.1.3/main -I/tmp/pear/temp/APM -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/usr/include/mysql  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/APM/apm.c -o apm.lo
mkdir .libs
 cc -I. -I/tmp/pear/temp/APM -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root19WaoW/APM-2.1.3/include -I/tmp/pear/temp/pear-build-root19WaoW/APM-2.1.3/main -I/tmp/pear/temp/APM -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/usr/include/mysql -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/APM/apm.c  -fPIC -DPIC -o .libs/apm.o
/bin/bash /tmp/pear/temp/pear-build-root19WaoW/APM-2.1.3/libtool --mode=compile cc  -I. -I/tmp/pear/temp/APM -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root19WaoW/APM-2.1.3/include -I/tmp/pear/temp/pear-build-root19WaoW/APM-2.1.3/main -I/tmp/pear/temp/APM -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/usr/include/mysql  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/APM/backtrace.c -o backtrace.lo
 cc -I. -I/tmp/pear/temp/APM -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root19WaoW/APM-2.1.3/include -I/tmp/pear/temp/pear-build-root19WaoW/APM-2.1.3/main -I/tmp/pear/temp/APM -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/usr/include/mysql -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/APM/backtrace.c  -fPIC -DPIC -o .libs/backtrace.o
/tmp/pear/temp/APM/backtrace.c: In function ‘append_flat_zval_r’:
/tmp/pear/temp/APM/backtrace.c:391:8: warning: implicit declaration of function ‘ZEND_HASH_APPLY_PROTECTION’; did you mean ‘ZEND_HASH_APPLY_REMOVE’? [-Wimplicit-function-declaration]
  391 |    if (ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(expr)) && ++Z_ARRVAL_P(expr)->u.v.nApplyCount>1) {
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |        ZEND_HASH_APPLY_REMOVE
/tmp/pear/temp/APM/backtrace.c:391:79: error: ‘struct <anonymous>’ has no member named ‘nApplyCount’
  391 |    if (ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(expr)) && ++Z_ARRVAL_P(expr)->u.v.nApplyCount>1) {
      |                                                                               ^
/tmp/pear/temp/APM/backtrace.c:397:26: error: ‘struct <anonymous>’ has no member named ‘nApplyCount’
  397 |     Z_ARRVAL_P(expr)->u.v.nApplyCount--;
      |                          ^
/tmp/pear/temp/APM/backtrace.c:407:26: error: ‘struct <anonymous>’ has no member named ‘nApplyCount’
  407 |     Z_ARRVAL_P(expr)->u.v.nApplyCount--;
      |                          ^
/tmp/pear/temp/APM/backtrace.c:422:8: warning: implicit declaration of function ‘Z_OBJ_APPLY_COUNT_P’ [-Wimplicit-function-declaration]
  422 |    if (Z_OBJ_APPLY_COUNT_P(expr) > 0) {
      |        ^~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/APM/backtrace.c:447:5: warning: implicit declaration of function ‘Z_OBJ_INC_APPLY_COUNT_P’ [-Wimplicit-function-declaration]
  447 |     Z_OBJ_INC_APPLY_COUNT_P(expr);
      |     ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/APM/backtrace.c:457:5: warning: implicit declaration of function ‘Z_OBJ_DEC_APPLY_COUNT_P’ [-Wimplicit-function-declaration]
  457 |     Z_OBJ_DEC_APPLY_COUNT_P(expr);
      |     ^~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:197: backtrace.lo] Error 1
ERROR: `make' failed

Compiling:

php-apm# ./configure --without-sqlite3 --with-mysql=/usr/include/mysql
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 apm support... yes, shared
checking enable support for sqlite3... no
checking enable support for MySQL... /usr/include/mysql
checking enable support for statsd... yes
checking enable support for socket... yes
checking enable the debug file... no
checking set default sqlite3 default DB path... no
checking for the location of libz... no
checking for mysql_close in -lmysqlclient... yes
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 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
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
root@DESKTOP-U6O60I2:/mnt/d/BUAS/code/php-apm# make
/bin/bash /mnt/d/BUAS/code/php-apm/libtool --mode=compile cc  -I. -I/mnt/d/BUAS/code/php-apm -DPHP_ATOM_INC -I/mnt/d/BUAS/code/php-apm/include -I/mnt/d/BUAS/code/php-apm/main -I/mnt/d/BUAS/code/php-apm -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/usr/include/mysql  -DHAVE_CONFIG_H  -g -O2   -c /mnt/d/BUAS/code/php-apm/apm.c -o apm.lo
mkdir .libs
 cc -I. -I/mnt/d/BUAS/code/php-apm -DPHP_ATOM_INC -I/mnt/d/BUAS/code/php-apm/include -I/mnt/d/BUAS/code/php-apm/main -I/mnt/d/BUAS/code/php-apm -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/usr/include/mysql -DHAVE_CONFIG_H -g -O2 -c /mnt/d/BUAS/code/php-apm/apm.c  -fPIC -DPIC -o .libs/apm.o
/bin/bash /mnt/d/BUAS/code/php-apm/libtool --mode=compile cc  -I. -I/mnt/d/BUAS/code/php-apm -DPHP_ATOM_INC -I/mnt/d/BUAS/code/php-apm/include -I/mnt/d/BUAS/code/php-apm/main -I/mnt/d/BUAS/code/php-apm -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/usr/include/mysql  -DHAVE_CONFIG_H  -g -O2   -c /mnt/d/BUAS/code/php-apm/backtrace.c -o backtrace.lo
 cc -I. -I/mnt/d/BUAS/code/php-apm -DPHP_ATOM_INC -I/mnt/d/BUAS/code/php-apm/include -I/mnt/d/BUAS/code/php-apm/main -I/mnt/d/BUAS/code/php-apm -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/usr/include/mysql -DHAVE_CONFIG_H -g -O2 -c /mnt/d/BUAS/code/php-apm/backtrace.c  -fPIC -DPIC -o .libs/backtrace.o
/mnt/d/BUAS/code/php-apm/backtrace.c: In function ‘append_flat_zval_r’:
/mnt/d/BUAS/code/php-apm/backtrace.c:391:8: warning: implicit declaration of function ‘ZEND_HASH_APPLY_PROTECTION’; did you mean ‘ZEND_HASH_APPLY_REMOVE’? [-Wimplicit-function-declaration]
  391 |    if (ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(expr)) && ++Z_ARRVAL_P(expr)->u.v.nApplyCount>1) {
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |        ZEND_HASH_APPLY_REMOVE
/mnt/d/BUAS/code/php-apm/backtrace.c:391:79: error: ‘struct <anonymous>’ has no member named ‘nApplyCount’
  391 |    if (ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(expr)) && ++Z_ARRVAL_P(expr)->u.v.nApplyCount>1) {
      |                                                                               ^
/mnt/d/BUAS/code/php-apm/backtrace.c:397:26: error: ‘struct <anonymous>’ has no member named ‘nApplyCount’
  397 |     Z_ARRVAL_P(expr)->u.v.nApplyCount--;
      |                          ^
/mnt/d/BUAS/code/php-apm/backtrace.c:407:26: error: ‘struct <anonymous>’ has no member named ‘nApplyCount’
  407 |     Z_ARRVAL_P(expr)->u.v.nApplyCount--;
      |                          ^
/mnt/d/BUAS/code/php-apm/backtrace.c:422:8: warning: implicit declaration of function ‘Z_OBJ_APPLY_COUNT_P’ [-Wimplicit-function-declaration]
  422 |    if (Z_OBJ_APPLY_COUNT_P(expr) > 0) {
      |        ^~~~~~~~~~~~~~~~~~~
/mnt/d/BUAS/code/php-apm/backtrace.c:447:5: warning: implicit declaration of function ‘Z_OBJ_INC_APPLY_COUNT_P’ [-Wimplicit-function-declaration]
  447 |     Z_OBJ_INC_APPLY_COUNT_P(expr);
      |     ^~~~~~~~~~~~~~~~~~~~~~~
/mnt/d/BUAS/code/php-apm/backtrace.c:457:5: warning: implicit declaration of function ‘Z_OBJ_DEC_APPLY_COUNT_P’ [-Wimplicit-function-declaration]
  457 |     Z_OBJ_DEC_APPLY_COUNT_P(expr);
      |     ^~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:197: backtrace.lo] Error 1
marinhekman commented 2 years ago

I guess it is related to this Pull request https://github.com/patrickallaert/php-apm/pull/74

So, tried this fork: https://github.com/VHDev/php-apm/tree/php7.3

Still 1 error left:

php-apm# ./configure --without-sqlite3 --with-mysql=/usr/include/mysql
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 apm support... yes, shared
checking enable support for sqlite3... no
checking enable support for MySQL... /usr/include/mysql
checking enable support for statsd... yes
checking enable support for socket... yes
checking enable the debug file... no
checking set default sqlite3 default DB path... no
checking for the location of libz... no
checking for mysql_close in -lmysqlclient... yes
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 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
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged
root@DESKTOP-U6O60I2:/mnt/d/BUAS/code/php-apm# make
/bin/bash /mnt/d/BUAS/code/php-apm/libtool --mode=compile cc  -I. -I/mnt/d/BUAS/code/php-apm -DPHP_ATOM_INC -I/mnt/d/BUAS/code/php-apm/include -I/mnt/d/BUAS/code/php-apm/main -I/mnt/d/BUAS/code/php-apm -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/usr/include/mysql  -DHAVE_CONFIG_H  -g -O2   -c /mnt/d/BUAS/code/php-apm/backtrace.c -o backtrace.lo
 cc -I. -I/mnt/d/BUAS/code/php-apm -DPHP_ATOM_INC -I/mnt/d/BUAS/code/php-apm/include -I/mnt/d/BUAS/code/php-apm/main -I/mnt/d/BUAS/code/php-apm -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/usr/include/mysql -DHAVE_CONFIG_H -g -O2 -c /mnt/d/BUAS/code/php-apm/backtrace.c  -fPIC -DPIC -o .libs/backtrace.o
/bin/bash /mnt/d/BUAS/code/php-apm/libtool --mode=compile cc  -I. -I/mnt/d/BUAS/code/php-apm -DPHP_ATOM_INC -I/mnt/d/BUAS/code/php-apm/include -I/mnt/d/BUAS/code/php-apm/main -I/mnt/d/BUAS/code/php-apm -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/usr/include/mysql  -DHAVE_CONFIG_H  -g -O2   -c /mnt/d/BUAS/code/php-apm/driver_mysql.c -o driver_mysql.lo
 cc -I. -I/mnt/d/BUAS/code/php-apm -DPHP_ATOM_INC -I/mnt/d/BUAS/code/php-apm/include -I/mnt/d/BUAS/code/php-apm/main -I/mnt/d/BUAS/code/php-apm -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/usr/include/mysql -DHAVE_CONFIG_H -g -O2 -c /mnt/d/BUAS/code/php-apm/driver_mysql.c  -fPIC -DPIC -o .libs/driver_mysql.o
/mnt/d/BUAS/code/php-apm/driver_mysql.c: In function ‘mysql_get_instance’:
/mnt/d/BUAS/code/php-apm/driver_mysql.c:45:2: error: unknown type name ‘my_bool’; did you mean ‘bool’?
   45 |  my_bool reconnect = 1;
      |  ^~~~~~~
      |  bool
make: *** [Makefile:199: driver_mysql.lo] Error 1

which is related to mysql 8 see: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-1.html#mysqld-8-0-1-compiling "The change from my_bool to bool means that the mysql.h header file now requires a C++ or C99 compiler to compile."

I will try that..

marinhekman commented 2 years ago

So changed this, and now it compiles.

php-apm# git diff
diff --git a/driver_mysql.c b/driver_mysql.c
index 6db8ee0..f52e388 100644
--- a/driver_mysql.c
+++ b/driver_mysql.c
@@ -42,7 +42,7 @@ static void mysql_destroy(TSRMLS_D) {

 /* Returns the MYSQL instance (singleton) */
 MYSQL * mysql_get_instance(TSRMLS_D) {
-       my_bool reconnect = 1;
+       bool reconnect = 1;
        if (APM_G(mysql_event_db) == NULL) {
                mysql_library_init(0, NULL, NULL);
                APM_G(mysql_event_db) = malloc(sizeof(MYSQL));

great.

marinhekman commented 2 years ago

So I guess you need to merge that PR and fix the my_bool thing for mysql8...