Skip to content
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

Compilation error with Nginx 1.8.1 #46

Open
AlexanderMatveev opened this issue Feb 20, 2016 · 3 comments
Open

Compilation error with Nginx 1.8.1 #46

AlexanderMatveev opened this issue Feb 20, 2016 · 3 comments

Comments

@AlexanderMatveev
Copy link

In file included from /usr/include/time.h:37:0,
                 from src/os/unix/ngx_linux_config.h:51,
                 from src/core/ngx_config.h:26,
                 from src/core/ngx_core.h:12,
                 from /opt/ngx_postgres/ngx_postgres-0.9/src/ngx_postgres_ddebug.h:32,
                 from /opt/ngx_postgres/ngx_postgres-0.9/src/ngx_postgres_upstream.c:33:
src/core/ngx_inet.h:28:51: warning: passing argument 3 of ‘ngx_sock_ntop’ makes pointer from integer without a cast [enabled by default]
     (sizeof(struct sockaddr_un) - offsetof(struct sockaddr_un, sun_path))
                                                   ^
src/core/ngx_inet.h:31:54: note: in expansion of macro ‘NGX_UNIX_ADDRSTRLEN’
 #define NGX_SOCKADDR_STRLEN   (sizeof("unix:") - 1 + NGX_UNIX_ADDRSTRLEN)
                                                      ^
/opt/ngx_postgres/ngx_postgres-0.9/src/ngx_postgres_upstream.c:106:43: note: in expansion of macro ‘NGX_SOCKADDR_STRLEN’
                                           NGX_SOCKADDR_STRLEN, 0);
                                           ^
In file included from src/core/ngx_core.h:76:0,
                 from /opt/ngx_postgres/ngx_postgres-0.9/src/ngx_postgres_ddebug.h:32,
                 from /opt/ngx_postgres/ngx_postgres-0.9/src/ngx_postgres_upstream.c:33:
src/core/ngx_inet.h:110:8: note: expected ‘u_char *’ but argument is of type ‘long unsigned int’
 size_t ngx_sock_ntop(struct sockaddr *sa, socklen_t socklen, u_char *text,
        ^
In file included from /usr/include/time.h:37:0,
                 from src/os/unix/ngx_linux_config.h:51,
                 from src/core/ngx_config.h:26,
                 from src/core/ngx_core.h:12,
                 from /opt/ngx_postgres/ngx_postgres-0.9/src/ngx_postgres_ddebug.h:32,
                 from /opt/ngx_postgres/ngx_postgres-0.9/src/ngx_postgres_upstream.c:33:
src/core/ngx_inet.h:28:51: error: too few arguments to function ‘ngx_sock_ntop’
     (sizeof(struct sockaddr_un) - offsetof(struct sockaddr_un, sun_path))
                                                   ^
src/core/ngx_inet.h:31:54: note: in expansion of macro ‘NGX_UNIX_ADDRSTRLEN’
 #define NGX_SOCKADDR_STRLEN   (sizeof("unix:") - 1 + NGX_UNIX_ADDRSTRLEN)
                                                      ^
/opt/ngx_postgres/ngx_postgres-0.9/src/ngx_postgres_upstream.c:106:43: note: in expansion of macro ‘NGX_SOCKADDR_STRLEN’
                                           NGX_SOCKADDR_STRLEN, 0);
                                           ^
In file included from src/core/ngx_core.h:76:0,
                 from /opt/ngx_postgres/ngx_postgres-0.9/src/ngx_postgres_ddebug.h:32,
                 from /opt/ngx_postgres/ngx_postgres-0.9/src/ngx_postgres_upstream.c:33:
src/core/ngx_inet.h:110:8: note: declared here
 size_t ngx_sock_ntop(struct sockaddr *sa, socklen_t socklen, u_char *text,
        ^
/opt/ngx_postgres/ngx_postgres-0.9/src/ngx_postgres_upstream.c: In function ‘ngx_postgres_upstream_free_connection’:
/opt/ngx_postgres/ngx_postgres-0.9/src/ngx_postgres_upstream.c:556:16: error: ‘ngx_event_t’ has no member named ‘prev’
         if (rev->prev) {
                ^
/opt/ngx_postgres/ngx_postgres-0.9/src/ngx_postgres_upstream.c:560:16: error: ‘ngx_event_t’ has no member named ‘prev’
         if (wev->prev) {
                ^
make[3]: *** [objs/addon/src/ngx_postgres_upstream.o] Error 1
make[3]: Leaving directory `/opt/rebuildnginx/nginx-1.8.1/debian/build-full'
make[2]: *** [build] Error 2
make[2]: Leaving directory `/opt/rebuildnginx/nginx-1.8.1/debian/build-full'
make[1]: *** [build.arch.full] Error 2
make[1]: Leaving directory `/opt/rebuildnginx/nginx-1.8.1'
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

@agentzh
Copy link
Contributor

agentzh commented Feb 20, 2016

@alexmatveev You need to use the latest git master or the latest git tag for it. 0.9 is antient.

@AlexanderMatveev
Copy link
Author

@agentzh Would you please create an installation docs?

@agentzh
Copy link
Contributor

agentzh commented Feb 21, 2016

@alexmatveev The simplest way is to use the OpenResty bundle which has the latest version of this ngx_postgres module by default: https://openresty.org.

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