swoole/ext-postgresql

make ext-postgresql report errors

zhangwuqiao opened this issue · 0 comments

ubuntu 20.04 linux
git swoole-src install success.

图片

git clone ext-postgresql.
phpize
./configure
make times wrong:

/bin/bash /home/c04/ext-postgresql/libtool --mode=compile g++ -I. -I/home/c04/ext-postgresql -DPHP_ATOM_INC -I/home/c04/ext-postgresql/include -I/home/c04/ext-postgresql/main -I/home/c04/ext-postgresql -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/home/c04/ext-postgresql -I/home/c04/ext-postgresql/include -I/usr/include/php/20190902/ext/swoole -I/usr/include/php/20190902/ext/swoole/include -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -c /home/c04/ext-postgresql/swoole_postgresql_coro.cc -o swoole_postgresql_coro.lo
mkdir .libs
g++ -I. -I/home/c04/ext-postgresql -DPHP_ATOM_INC -I/home/c04/ext-postgresql/include -I/home/c04/ext-postgresql/main -I/home/c04/ext-postgresql -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/home/c04/ext-postgresql -I/home/c04/ext-postgresql/include -I/usr/include/php/20190902/ext/swoole -I/usr/include/php/20190902/ext/swoole/include -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -c /home/c04/ext-postgresql/swoole_postgresql_coro.cc -fPIC -DPIC -o .libs/swoole_postgresql_coro.o
/home/c04/ext-postgresql/swoole_postgresql_coro.cc: In function ‘void zim_swoole_postgresql_coro_connect(zend_execute_data*, zval*)’:
/home/c04/ext-postgresql/swoole_postgresql_coro.cc:351:44: error: use of enum ‘swFd_type’ without previous declaration
351 | object->socket = make_socket(fd, (enum swFd_type) PHP_SWOOLE_FD_POSTGRESQL);
| ^~~~~~~~~
/home/c04/ext-postgresql/swoole_postgresql_coro.cc:367:9: error: ‘swWarn’ was not declared in this scope
367 | swWarn("Unable to connect to PostgreSQL server: [%s]", PQhost(pgsql));
| ^~~~~~
/home/c04/ext-postgresql/swoole_postgresql_coro.cc: In function ‘void swoole_pgsql_coro_onTimeout(swoole::Timer*, swoole::TimerNode*)’:
/home/c04/ext-postgresql/swoole_postgresql_coro.cc:417:9: error: ‘swWarn’ was not declared in this scope
417 | swWarn(" [%s, %s] ", feedback, err_msg);
| ^~~~~~
/home/c04/ext-postgresql/swoole_postgresql_coro.cc: In function ‘void connect_callback(pg_object*, swoole::Reactor*, swoole::Event*)’:
/home/c04/ext-postgresql/swoole_postgresql_coro.cc:455:13: error: ‘swWarn’ was not declared in this scope
455 | swWarn("PQconnectPoll unexpected status");
| ^~~~~~
/home/c04/ext-postgresql/swoole_postgresql_coro.cc: In function ‘void zim_swoole_postgresql_coro_metaData(zend_execute_data*, zval*)’:
/home/c04/ext-postgresql/swoole_postgresql_coro.cc:1251:9: error: ‘swWarn’ was not declared in this scope
1251 | swWarn("error:[%s]", err_msg);
| ^~~~~~
make: *** [Makefile:192: swoole_postgresql_coro.lo] Error 1