#1736 closed defect (invalid)
Cannot build dynamic modules: "Can't open auto/module"
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | blocker | Milestone: | |
Component: | nginx-module | Version: | 1.14.x |
Keywords: | dynamic, module, nginx, configure, compile, dynamic module | Cc: | |
uname -a: | Linux ubuntu 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux | ||
nginx -V: | N/A; I am trying to build a nginx dynamic module |
Description
I have a simple dynamic module config script like so:
ngx_module_type="HTTP" ngx_module_name="ngx_http_my_module" ngx_module_srcs="$ngx_addon_dir/ngx_http_my_module.c" . auto/config ngx_addon_name="ngx_http_my_module"
I run sudo -H ./configure --with-compat --add-dynamic-module=../ngx_http_my_module
from within the nginx source (~/Desktop/nginx-1.14.2). However, I get the following error:
configuring additional dynamic modules adding module in ../ngx_http_remote_attestation_module ./configure: 4: .: Can't open auto/module
I have checked that this auto/module is present and readable. I have been following the guides on the Nginx site, so I don't know why it would error like this. Any ideas?
Change History (5)
comment:1 by , 6 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 6 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Hi mdounin,
This was a copy-paste error as I was trying to change some stuff for this report.
The config is:
ngx_module_type="HTTP" ngx_module_name="ngx_http_my_module" ngx_module_srcs="$ngx_addon_dir/ngx_http_my_module.c" . auto/module ngx_addon_name="ngx_http_my_module"
The output is:
configuring additional dynamic modules adding module in ../ngx_http_my_module ./configure: 4: .: Can't open auto/module
It doesn't look like a problem with the config script because it was copied from the Nginx blog regarding building your own dynamic module.
comment:3 by , 6 years ago
Please close this ticket, I have solved the issue.
Possibly some encoding problem when copy-pasting the code from the web.
I re-typed everything by hand for my config file and now it compiles successfully.
comment:4 by , 6 years ago
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
comment:5 by , 13 months ago
For anyone coming across this, check that your line endings are LF and not CRLF
In the provided
config
sample you use. auto/config
instead of correct. auto/module
. It is not expected to work and will complain thatauto/config
is not found.The configure output you've provided is clearly unrelated and refers to
ngx_http_remote_attestation_module
module instead, as well as complains aboutauto/module
. If theauto/module
complain is indeed correct, it may indicate that theconfig
script in question is broken and, for example, changes the current directory, so theauto/module
script cannot be found. Either way it doesn't looks like an nginx bug, but rather a problem in your moduleconfig
script.For further questions, please use mailing lists instead.