fdintino / nginx-upload-module

A module for nginx web server for handling file uploads using multipart/form-data encoding (RFC 1867).
http://www.grid.net.ru/nginx/upload.en.html
Other
981 stars 388 forks source link

unable to build with nginx #146

Open Karthikdasari0423 opened 1 year ago

Karthikdasari0423 commented 1 year ago

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"

amlan-sw commented 1 year ago

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;
Karthikdasari0423 commented 1 year ago

Thank you @amlan-sw