Skip to content

make conn_pool branch error (pgbench) #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
digoal opened this issue May 17, 2018 · 4 comments
Closed

make conn_pool branch error (pgbench) #3

digoal opened this issue May 17, 2018 · 4 comments

Comments

@digoal
Copy link

digoal commented May 17, 2018

make -C pgbench all
make[3]: Entering directory `/home/digoal/postgresql.builtin_pool/src/bin/pgbench'
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -I. -I. -I../../../src/interfaces/libpq -I../../../src/include  -D_GNU_SOURCE   -c -o pgbench.o pgbench.c
pgbench.c: In function ‘threadRun’:
pgbench.c:5208:24: warning: implicit declaration of function ‘alloc_socket_set’; did you mean ‘closesocket’? [-Wimplicit-function-declaration]
  socket_set *sockets = alloc_socket_set(nstate);
                        ^~~~~~~~~~~~~~~~
                        closesocket
pgbench.c:5208:24: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
pgbench.c:5252:4: warning: implicit declaration of function ‘set_socket’; did you mean ‘setsockopt’? [-Wimplicit-function-declaration]
    set_socket(sockets, PQsocket(state[i].con), i);
    ^~~~~~~~~~
    setsockopt
pgbench.c:5274:3: warning: implicit declaration of function ‘clear_socket_set’; did you mean ‘closesocket’? [-Wimplicit-function-declaration]
   clear_socket_set(sockets, nstate);
   ^~~~~~~~~~~~~~~~
   closesocket
pgbench.c:5372:15: warning: implicit declaration of function ‘wait_on_socket_set’ [-Wimplicit-function-declaration]
      nsocks = wait_on_socket_set(sockets, nstate, maxsock, min_usec);
               ^~~~~~~~~~~~~~~~~~
pgbench.c:5413:9: warning: implicit declaration of function ‘error_on_socket’; did you mean ‘ferror_unlocked’? [-Wimplicit-function-declaration]
     if (error_on_socket(sockets, i, st->con))
         ^~~~~~~~~~~~~~~
         ferror_unlocked
pgbench.c:5416:9: warning: implicit declaration of function ‘ignore_socket’; did you mean ‘closesocket’? [-Wimplicit-function-declaration]
     if (ignore_socket(sockets, i, st->con))
         ^~~~~~~~~~~~~
         closesocket
pgbench.c:5554:2: warning: implicit declaration of function ‘free_socket_set’ [-Wimplicit-function-declaration]
  free_socket_set(sockets);
  ^~~~~~~~~~~~~~~
pgbench.c: At top level:
pgbench.c:5561:1: error: conflicting types for ‘alloc_socket_set’
 alloc_socket_set(int count)
 ^~~~~~~~~~~~~~~~
pgbench.c:5208:24: note: previous implicit declaration of ‘alloc_socket_set’ was here
  socket_set *sockets = alloc_socket_set(nstate);
                        ^~~~~~~~~~~~~~~~
pgbench.c:5567:1: warning: conflicting types for ‘free_socket_set’
 free_socket_set(socket_set *sa)
 ^~~~~~~~~~~~~~~
pgbench.c:5567:1: error: static declaration of ‘free_socket_set’ follows non-static declaration
pgbench.c:5554:2: note: previous implicit declaration of ‘free_socket_set’ was here
  free_socket_set(sockets);
  ^~~~~~~~~~~~~~~
pgbench.c:5573:1: error: conflicting types for ‘error_on_socket’
 error_on_socket(socket_set *sa, int idx, PGconn *con)
 ^~~~~~~~~~~~~~~
pgbench.c:5413:9: note: previous implicit declaration of ‘error_on_socket’ was here
     if (error_on_socket(sockets, i, st->con))
         ^~~~~~~~~~~~~~~
pgbench.c:5581:1: error: conflicting types for ‘ignore_socket’
 ignore_socket(socket_set *sa, int idx, PGconn *con)
 ^~~~~~~~~~~~~
pgbench.c:5416:9: note: previous implicit declaration of ‘ignore_socket’ was here
     if (ignore_socket(sockets, i, st->con))
         ^~~~~~~~~~~~~
pgbench.c:5587:1: warning: conflicting types for ‘clear_socket_set’
 clear_socket_set(socket_set *sa, int count)
 ^~~~~~~~~~~~~~~~
pgbench.c:5587:1: error: static declaration of ‘clear_socket_set’ follows non-static declaration
pgbench.c:5274:3: note: previous implicit declaration of ‘clear_socket_set’ was here
   clear_socket_set(sockets, nstate);
   ^~~~~~~~~~~~~~~~
pgbench.c:5593:1: warning: conflicting types for ‘set_socket’
 set_socket(socket_set *sa, int fd, int idx)
 ^~~~~~~~~~
pgbench.c:5593:1: error: static declaration of ‘set_socket’ follows non-static declaration
pgbench.c:5252:4: note: previous implicit declaration of ‘set_socket’ was here
    set_socket(sockets, PQsocket(state[i].con), i);
    ^~~~~~~~~~
pgbench.c:5599:1: error: static declaration of ‘wait_on_socket_set’ follows non-static declaration
 wait_on_socket_set(socket_set *sa, int nstate, int maxsock, int64 usec)
 ^~~~~~~~~~~~~~~~~~
pgbench.c:5372:15: note: previous implicit declaration of ‘wait_on_socket_set’ was here
      nsocks = wait_on_socket_set(sockets, nstate, maxsock, min_usec);
               ^~~~~~~~~~~~~~~~~~
pgbench.c:5599:1: warning: ‘wait_on_socket_set’ defined but not used [-Wunused-function]
 wait_on_socket_set(socket_set *sa, int nstate, int maxsock, int64 usec)
 ^~~~~~~~~~~~~~~~~~
pgbench.c:5593:1: warning: ‘set_socket’ defined but not used [-Wunused-function]
 set_socket(socket_set *sa, int fd, int idx)
 ^~~~~~~~~~
pgbench.c:5587:1: warning: ‘clear_socket_set’ defined but not used [-Wunused-function]
 clear_socket_set(socket_set *sa, int count)
 ^~~~~~~~~~~~~~~~
pgbench.c:5581:1: warning: ‘ignore_socket’ defined but not used [-Wunused-function]
 ignore_socket(socket_set *sa, int idx, PGconn *con)
 ^~~~~~~~~~~~~
pgbench.c:5573:1: warning: ‘error_on_socket’ defined but not used [-Wunused-function]
 error_on_socket(socket_set *sa, int idx, PGconn *con)
 ^~~~~~~~~~~~~~~
pgbench.c:5567:1: warning: ‘free_socket_set’ defined but not used [-Wunused-function]
 free_socket_set(socket_set *sa)
 ^~~~~~~~~~~~~~~
pgbench.c:5561:1: warning: ‘alloc_socket_set’ defined but not used [-Wunused-function]
 alloc_socket_set(int count)
 ^~~~~~~~~~~~~~~~
make[3]: *** [pgbench.o] Error 1
make[3]: Leaving directory `/home/digoal/postgresql.builtin_pool/src/bin/pgbench'
make[2]: *** [all-pgbench-recurse] Error 2
make[2]: Leaving directory `/home/digoal/postgresql.builtin_pool/src/bin'
make[1]: *** [all-bin-recurse] Error 2
make[1]: Leaving directory `/home/digoal/postgresql.builtin_pool/src'
make: *** [all-src-recurse] Error 2
@knizhnik
Copy link

It is not my branch. Please double check which sources you have pulled.
You should clone the following repoistory:
https://github.com/postgrespro/postgresql.builtin_pool.git
and checkout use conn_pool branch.

@digoal
Copy link
Author

digoal commented May 17, 2018

yes , it's conn_pool branch

i use this command to change to conn_pool branch

git checkout conn_pool
git branch

  • conn_pool
    master

@knizhnik
Copy link

You can check it in Web interface at github that pgbench.c doesnэt contain any call to alloc_socket_set at line 5208. So you did something wrong...

@knizhnik knizhnik mentioned this issue May 17, 2018
@digoal
Copy link
Author

digoal commented May 21, 2018

it's my mistake, sorry.

@digoal digoal closed this as completed May 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants