Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Viewing all articles
Browse latest Browse all 4628

C, nginx module compilation multiple definition error

$
0
0

I need to compile this https://github.com/rryqszq4/ngx_ruby as dynamic module, but i received error:

/usr/bin/ld: objs/addon/src/ngx_http_ruby_code.o:/usr/local/src/ngx_ruby-master/src/ngx_http_ruby_module.h:21: multiple definition of `ngx_ruby_request'; objs/addon/src/ngx_http_ruby_module.o:/usr/local/src/ngx_ruby-master/src/ngx_http_                                                                            ruby_module.h:21: first defined here/usr/bin/ld: objs/addon/src/ngx_http_ruby_directive.o:/usr/local/src/ngx_ruby-master/src/ngx_http_ruby_module.h:21: multiple definition of `ngx_ruby_request'; objs/addon/src/ngx_http_ruby_module.o:/usr/local/src/ngx_ruby-master/src/ngx_                                                                            http_ruby_module.h:21: first defined here/usr/bin/ld: objs/addon/src/ngx_http_ruby_handler.o:/usr/local/src/ngx_ruby-master/src/ngx_http_ruby_module.h:21: multiple definition of `ngx_ruby_request'; objs/addon/src/ngx_http_ruby_module.o:/usr/local/src/ngx_ruby-master/src/ngx_ht                                                                            tp_ruby_module.h:21: first defined here/usr/bin/ld: objs/addon/ruby/ruby_ngx.o:/usr/local/src/ngx_ruby-master/src/ruby/../ngx_http_ruby_module.h:21: multiple definition of `ngx_ruby_request'; objs/addon/src/ngx_http_ruby_module.o:/usr/local/src/ngx_ruby-master/src/ngx_http_r                                                                            uby_module.h:21: first defined here

nginx V 1.26.1ruby V 2.3.8OS Ubuntu 24.04 LTS

How can i fix this?

I tried made header file like this:

#ifndef NGX_HTTP_RUBY_REQUEST_H#define NGX_HTTP_RUBY_REQUEST_H#include <ngx_http.h>extern ngx_http_request_t *ngx_ruby_request;#endif

but i'm not strong at C and сouldn't fix it


Viewing all articles
Browse latest Browse all 4628

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>