Welcome! Log In Create A New Profile

Advanced

[nginx] hello world module build trouble

Robert Paprocki
December 12, 2014 12:44AM
Hello,

I am trying to build a simple nginx module to learn more about nginx's
internals. I have copied several hello world examples into my own
module: http://pastebin.com/esHFtaMw

And the config file: http://pastebin.com/t1fpEPe6

I've downloaded nginx 1.7.8 onto a vanilla Ubuntu 14.04 install. I run
configure with the following:

root@dev:/usr/local/src/nginx-1.7.8# ./configure --with-debug
--add-module=/usr/local/src/ngx_hello_dolly

I see that configure adds it in properly:

[... snip ...]
adding module in /usr/local/src/ngx_hello_dolly
+ ngx_http_hello_dolly was configured
[... snip ...]

But when I run make I receive the following error:

objs/addon/ngx_hello_dolly/ngx_http_hello_dolly.o \
objs/ngx_modules.o \
-lpthread -lcrypt -lpcre -lcrypto -lcrypto -lz
objs/ngx_modules.o:(.data+0x110): undefined reference to
`ngx_http_hello_dolly'
collect2: error: ld returned 1 exit status
make[1]: *** [objs/nginx] Error 1
make[1]: Leaving directory `/usr/local/src/nginx-1.7.8'
make: *** [build] Error 2


Fule make output is at: http://pastebin.com/DD42e4N9

Can anyone point me in the direction of what I'm doing wrong? I don't
understand why the build process errors out with undefined reference to
`ngx_http_hello_dolly'. Have I mistyped something in my module? I cannot
see any discrepancy between this and something such as
(http://blog.zhuzhaoyuan.com/2009/08/creating-a-hello-world-nginx-module/).
Much appreciated if anyone can point me in the right direction!

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

[nginx] hello world module build trouble

Robert Paprocki December 12, 2014 12:44AM

Re: [nginx] hello world module build trouble

cubicdaiya December 12, 2014 02:12AM

Re: [nginx] hello world module build trouble

Robert Paprocki December 12, 2014 01:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 323
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready