Code Monkey home page Code Monkey logo

Comments (5)

Yanghsuanming avatar Yanghsuanming commented on June 2, 2024

無法編譯
環境:
woole: 4.5.3
pgsql: 12.4

# 修改 vi swoole_postgresql_coro.h
#ifdef __linux__
#include "/usr/pgsql-12/include/libpq-fe.h"
#endif
/tmp/ext-postgresql-master/swoole_postgresql_coro.h:54:5: error: 'swTimer_node' does not name a type
     swTimer_node *timer;
     ^
/tmp/ext-postgresql-master/swoole_postgresql_coro.cc:72:5: error: 'php_coro_context' does not name a type
     php_coro_context context;
     ^
/tmp/ext-postgresql-master/swoole_postgresql_coro.cc:84:18: error: 'php_coro_context' does not name a type
 static sw_inline php_coro_context *php_swoole_postgresql_coro_get_context(zval *zobject) {
                  ^
/tmp/ext-postgresql-master/swoole_postgresql_coro.cc:142:57: error: 'swTimer_node' has not been declared
 static void swoole_pgsql_coro_onTimeout(swTimer *timer, swTimer_node *tnode);
                                                         ^
/tmp/ext-postgresql-master/swoole_postgresql_coro.cc: In function 'void zim_swoole_postgresql_coro_connect(zend_execute_data*, zval*)':
/tmp/ext-postgresql-master/swoole_postgresql_coro.cc:328:5: error: 'php_coro_context' was not declared in this scope
     php_coro_context *context = php_swoole_postgresql_coro_get_context(ZEND_THIS);
     ^
/tmp/ext-postgresql-master/swoole_postgresql_coro.cc:328:23: error: 'context' was not declared in this scope
     php_coro_context *context = php_swoole_postgresql_coro_get_context(ZEND_THIS);

from ext-postgresql.

codercms avatar codercms commented on June 2, 2024

@Xuan-Goldenf @linjuchen Please try to build this extension from master branch with Swoole v4.5.4

from ext-postgresql.

Yanghsuanming avatar Yanghsuanming commented on June 2, 2024

無法編譯
Env:
swoole: 4.5.4
pgsql: 12.4

make && make install
/bin/sh /tmp/ext-postgresql-master/libtool --mode=link g++ -DPHP_ATOM_INC -I/tmp/ext-postgresql-master/include -I/tmp/ext-postgresql-master/main -I/tmp/ext-postgresql-master -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/tmp/ext-postgresql-master -I/tmp/ext-postgresql-master/include -I/usr/include/php/ext/swoole -I/usr/include/php/ext/swoole/include  -DHAVE_CONFIG_H  -Wall -pthread -g -O2  -lpthread  -o swoole_postgresql.la -export-dynamic -avoid-version -prefer-pic -module -rpath /tmp/ext-postgresql-master/modules  swoole_postgresql_coro.lo -lpq
libtool: link: g++  -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbeginS.o  .libs/swoole_postgresql_coro.o   -lpthread -lpq -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crtn.o  -pthread -O2   -pthread -Wl,-soname -Wl,swoole_postgresql.so -o .libs/swoole_postgresql.so
/usr/bin/ld: cannot find -lpq
collect2: error: ld returned 1 exit status
make: *** [swoole_postgresql.la] Error 1

from ext-postgresql.

Yanghsuanming avatar Yanghsuanming commented on June 2, 2024

安裝libpq 已經成功編譯了

from ext-postgresql.

codercms avatar codercms commented on June 2, 2024

@Xuan-Goldenf good to know you have successfully compiled this extension

from ext-postgresql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.