not compile nginx-1.11.2

Issue #26 new
Kent Yeh created an issue

Hello, I got a error

ngx_http_sticky_misc.c: In function ngx_http_sticky_misc_md5:
ngx_http_sticky_misc.c:152:15: ERROR:「MD5_DIGEST_LENGTH undeclared (first use in this function)
   u_char hash[MD5_DIGEST_LENGTH];

I hope it will be resolved, Thanks.

Comments (7)

  1. Gnought

    Changes with nginx 1.11.2 05 Jul 2016

    *) Change: now nginx always uses internal MD5 and SHA1 implementations;
       the --with-md5 and --with-sha1 configure options were canceled.
    

    As the nginx v1.11.2 changes, it is easy to fix the issue by including <openssl/sha.h> and <openssl/md5.h> in ngx_http_sticky_misc.c

    #include <nginx.h>
    #include <ngx_config.h>
    #include <ngx_core.h>
    #include <ngx_http.h>
    #include <ngx_md5.h>
    #include <ngx_sha1.h>
    #include <openssl/sha.h>
    #include <openssl/md5.h>
    
    #include "ngx_http_sticky_misc.h"
    
  2. Michael March

    Hey @gnought , should the:

    #include <openssl/sha.h>
    #include <openssl/md5.h>
    

    in the code now? I don't see it in the pull request.

  3. Evanilson Abril

    I was having the same problem, after adding the missing libraries it compiled. My problem now is to add on nginx.conf file with the directive load_module I am doing load_module "modules/ngx_http_sticky_module.o"; but it is saying :

    nginx: [emerg] dlopen() "/etc/nginx/modules/ngx_http_sticky_module.o" failed (/etc/nginx/modules/ngx_http_sticky_module.o: only ET_DYN and ET_EXEC can be loaded) in /etc/nginx/nginx.conf:6

  4. Yiğit BAŞALMA

    i was having same issue on nginx version 1.12.1-1 and i was try this solution.It woks.Will you release the version with this patch?

  5. Log in to comment