nginx-upload-module icon indicating copy to clipboard operation
nginx-upload-module copied to clipboard

unable to build with nginx

Open devkdas opened this issue 2 years ago • 2 comments

Hi @vkholodkov @fdintino

while building nginx with this module below error is seen /root/nginx-upload-module//ngx_http_upload_module.c:15:19: error: conflicting types for ‘MD5_CTX’; have ‘ngx_md5_t’ 15 | typedef ngx_md5_t MD5_CTX; | ^~~~~~~ In file included from /src/boringssl/include/openssl/ssl.h:145, from src/event/ngx_event_openssl.h:17, from src/core/ngx_core.h:85, from /root/nginx-upload-module//ngx_http_upload_module.c:7: /src/boringssl/include/openssl/base.h:428:29: note: previous declaration of ‘MD5_CTX’ with type ‘MD5_CTX’ {aka ‘struct md5_state_st’} 428 | typedef struct md5_state_st MD5_CTX; | ^~~~~~~ make[1]: *** [objs/Makefile:1676: objs/addon/nginx-upload-module/ngx_http_upload_module.o] Error 1 make[1]: Leaving directory '/src/nginx-quic' make: *** [Makefile:10: build] Error 2

nginx conf:- auto/configure nginx -V 2>&1 | sed "s/ \-\-/ \\\ \n\t--/g" | grep -v -e 'http-geoip2' | grep "\-\-" | grep -ve opt= -e param= -e build= --build=nginx-quic --with-debug --add-module=/root/nginx-upload-module/ --with-http_v3_module --with-stream_quic_module --with-cc-opt="-I/src/boringssl/include" --with-ld-opt="-L/src/boringssl/build/ssl -L/src/boringssl/build/crypto"

devkdas avatar Mar 01 '23 15:03 devkdas

hello, maybe this will help,same problem here and work around:

ini ngx_http_upload_module.c:

== around line 15 or 16:

find:

typedef ngx_md5_t MD5_CTX;

change to:

typedef ngx_md5_t MD5_CTX1;

== around line 191 or 192

find:

MD5_CTX     md5;

replace to:

MD5_CTX1     md5;

amlan-sw avatar Mar 05 '23 12:03 amlan-sw

Thank you @amlan-sw

devkdas avatar Mar 05 '23 17:03 devkdas