Opened 4 years ago
Closed 4 years ago
#1736 closed defect (invalid)
Cannot build dynamic modules: "Can't open auto/module"
|Reported by:||Owned by:|
|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|
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"
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 (4)
comment:1 by , 4 years ago
|Status:||new → closed|
comment:2 by , 4 years ago
|Status:||closed → reopened|
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 , 4 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 , 4 years ago
|Status:||reopened → closed|
In the provided
configsample you use
. auto/configinstead of correct
. auto/module. It is not expected to work and will complain that
auto/configis not found.
The configure output you've provided is clearly unrelated and refers to
ngx_http_remote_attestation_modulemodule instead, as well as complains about
auto/module. If the
auto/modulecomplain is indeed correct, it may indicate that the
configscript in question is broken and, for example, changes the current directory, so the
auto/modulescript cannot be found. Either way it doesn't looks like an nginx bug, but rather a problem in your module
For further questions, please use mailing lists instead.