ยง2023-04-11
- git clone
$ git clone https://github.com/jbfavre/ngx-markdown-module.git
- get nginx source
$ wget http://nginx.org/download/nginx-1.23.1.tar.gz
$ cd ..
$ tar xvf src/nginx-1.23.1.tar.gz
$ cd nginx-1.23.1.tar.gz
$ ./configure --add-module=../ngx-markdown-module/ngx-md-handler-module --add-module=../ngx-markdown-module/ngx-md-filter-module
...
creating objs/Makefile
Configuration summary
+ using system PCRE2 library
+ OpenSSL library is not used
+ using system zlib library
nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/nginx/sbin/nginx"
nginx modules path: "/usr/local/nginx/modules"
nginx configuration prefix: "/usr/local/nginx/conf"
nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
nginx pid file: "/usr/local/nginx/logs/nginx.pid"
nginx error log file: "/usr/local/nginx/logs/error.log"
nginx http access log file: "/usr/local/nginx/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"
$ make -j6
...
In file included from ../ngx-markdown-module/ngx-md-handler-module/src/ngx_http_markdown_handler_module.c:22:
../ngx-markdown-module/ngx-md-handler-module/src/ngx_http_markdown_handler_module.c: In function 'ngx_http_mdhandler_init':
src/core/ngx_core.h:38:25: error: returning 'int' from a function with return type 'char *' makes pointer from integer without a cast [-Werror=int-conversion]
38 | #define NGX_ERROR -1
| ^
../ngx-markdown-module/ngx-md-handler-module/src/ngx_http_markdown_handler_module.c:242:16: note: in expansion of macro 'NGX_ERROR'
242 | return NGX_ERROR;
| ^~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [objs/Makefile:1206: objs/addon/src/ngx_http_markdown_handler_module.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/alexlai/build/nginx-1.23.1'
make: *** [Makefile:10: build] Error 2