You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compiling with NGX_VERSION=1.24.0 on Ubuntu 24.04 yields the following error:
Compiling ngx v0.5.0 (/root/ngx-rust)
error[E0432]: unresolved imports `crate::ffi::ngx_http_v2_module`, `crate::ffi::ngx_http_v2_srv_conf_t`
--> src/http/conf.rs:245:22
|
245 | use crate::ffi::{ngx_http_v2_module, ngx_http_v2_srv_conf_t};
| ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ no `ngx_http_v2_srv_conf_t` in `ffi`
| |
| no `ngx_http_v2_module` in `ffi`
|
help: a similar name exists in the module
|
245 - use crate::ffi::{ngx_http_v2_module, ngx_http_v2_srv_conf_t};
245 + use crate::ffi::{ngx_http_max_module, ngx_http_v2_srv_conf_t};
|
help: a similar name exists in the module
|
245 - use crate::ffi::{ngx_http_v2_module, ngx_http_v2_srv_conf_t};
245 + use crate::ffi::{ngx_http_v2_module, ngx_http_ssl_srv_conf_t};
|
To Reproduce
Install the dependencies in a fresh Ubuntu 24.04 environment
{
"$message_type": "diagnostic",
"message": "unresolved imports `crate::ffi::ngx_http_v2_module`, `crate::ffi::ngx_http_v2_srv_conf_t`",
"code": {
"code": "E0432",
"explanation": "An import was unresolved.\n\nErroneous code example:\n\n```compile_fail,E0432\nuse something::Foo; // error: unresolved import `something::Foo`.\n```\n\nIn Rust 2015, paths in `use` statements are relative to the crate root. To\nimport items relative to the current and parent modules, use the `self::` and\n`super::` prefixes, respectively.\n\nIn Rust 2018 or later, paths in `use` statements are relative to the current\nmodule unless they begin with the name of a crate or a literal `crate::`, in\nwhich case they start from the crate root. As in Rust 2015 code, the `self::`\nand `super::` prefixes refer to the current and parent modules respectively.\n\nAlso verify that you didn't misspell the import name and that the import exists\nin the module from where you tried to import it. Example:\n\n```\nuse self::something::Foo; // Ok.\n\nmod something {\n pub struct Foo;\n}\n# fn main() {}\n```\n\nIf you tried to use a module from an external crate and are using Rust 2015,\nyou may have missed the `extern crate` declaration (which is usually placed in\nthe crate root):\n\n```edition2015\nextern crate core; // Required to use the `core` crate in Rust 2015.\n\nuse core::any;\n# fn main() {}\n```\n\nSince Rust 2018 the `extern crate` declaration is not required and\nyou can instead just `use` it:\n\n```edition2018\nuse core::any; // No extern crate required in Rust 2018.\n# fn main() {}\n```\n"
},
"level": "error",
"spans": [
{
"file_name": "src/http/conf.rs",
"byte_start": 9362,
"byte_end": 9380,
"line_start": 245,
"line_end": 245,
"column_start": 22,
"column_end": 40,
"is_primary": true,
"text": [
{
"text": " use crate::ffi::{ngx_http_v2_module, ngx_http_v2_srv_conf_t};",
"highlight_start": 22,
"highlight_end": 40
}
],
"label": "no `ngx_http_v2_module` in `ffi`",
"suggested_replacement": null,
"suggestion_applicability": null,
"expansion": null
},
{
"file_name": "src/http/conf.rs",
"byte_start": 9382,
"byte_end": 9404,
"line_start": 245,
"line_end": 245,
"column_start": 42,
"column_end": 64,
"is_primary": true,
"text": [
{
"text": " use crate::ffi::{ngx_http_v2_module, ngx_http_v2_srv_conf_t};",
"highlight_start": 42,
"highlight_end": 64
}
],
"label": "no `ngx_http_v2_srv_conf_t` in `ffi`",
"suggested_replacement": null,
"suggestion_applicability": null,
"expansion": null
}
],
"children": [
{
"message": "a similar name exists in the module",
"code": null,
"level": "help",
"spans": [
{
"file_name": "src/http/conf.rs",
"byte_start": 9362,
"byte_end": 9380,
"line_start": 245,
"line_end": 245,
"column_start": 22,
"column_end": 40,
"is_primary": true,
"text": [
{
"text": " use crate::ffi::{ngx_http_v2_module, ngx_http_v2_srv_conf_t};",
"highlight_start": 22,
"highlight_end": 40
}
],
"label": null,
"suggested_replacement": "ngx_http_max_module",
"suggestion_applicability": "MaybeIncorrect",
"expansion": null
}
],
"children": [],
"rendered": null
},
{
"message": "a similar name exists in the module",
"code": null,
"level": "help",
"spans": [
{
"file_name": "src/http/conf.rs",
"byte_start": 9382,
"byte_end": 9404,
"line_start": 245,
"line_end": 245,
"column_start": 42,
"column_end": 64,
"is_primary": true,
"text": [
{
"text": " use crate::ffi::{ngx_http_v2_module, ngx_http_v2_srv_conf_t};",
"highlight_start": 42,
"highlight_end": 64
}
],
"label": null,
"suggested_replacement": "ngx_http_ssl_srv_conf_t",
"suggestion_applicability": "MaybeIncorrect",
"expansion": null
}
],
"children": [],
"rendered": null
}
],
"rendered": "\u001b[0m\u001b[1m\u001b[38;5;9merror[E0432]\u001b[0m\u001b[0m\u001b[1m: unresolved imports `crate::ffi::ngx_http_v2_module`, `crate::ffi::ngx_http_v2_srv_conf_t`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/http/conf.rs:245:22\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m245\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m use crate::ffi::{ngx_http_v2_module, ngx_http_v2_srv_conf_t};\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mno `ngx_http_v2_srv_conf_t` in `ffi`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mno `ngx_http_v2_module` in `ffi`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14mhelp\u001b[0m\u001b[0m: a similar name exists in the module\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m245\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;9m- \u001b[0m\u001b[0m use crate::ffi::{\u001b[0m\u001b[0m\u001b[38;5;9mngx_http_v2_module\u001b[0m\u001b[0m, ngx_http_v2_srv_conf_t};\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m245\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;10m+ \u001b[0m\u001b[0m use crate::ffi::{\u001b[0m\u001b[0m\u001b[38;5;10mngx_http_max_module\u001b[0m\u001b[0m, ngx_http_v2_srv_conf_t};\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14mhelp\u001b[0m\u001b[0m: a similar name exists in the module\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m245\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;9m- \u001b[0m\u001b[0m use crate::ffi::{ngx_http_v2_module, \u001b[0m\u001b[0m\u001b[38;5;9mngx_http_v2_srv_conf_t\u001b[0m\u001b[0m};\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m245\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[38;5;10m+ \u001b[0m\u001b[0m use crate::ffi::{ngx_http_v2_module, \u001b[0m\u001b[0m\u001b[38;5;10mngx_http_ssl_srv_conf_t\u001b[0m\u001b[0m};\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\n"
}
{
"$message_type": "diagnostic",
"message": "aborting due to 1 previous error",
"code": null,
"level": "error",
"spans": [],
"children": [],
"rendered": "\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: aborting due to 1 previous error\u001b[0m\n\n"
}
{
"$message_type": "diagnostic",
"message": "For more information about this error, try `rustc --explain E0432`.",
"code": null,
"level": "failure-note",
"spans": [],
"children": [],
"rendered": "\u001b[0m\u001b[1mFor more information about this error, try `rustc --explain E0432`.\u001b[0m\n"
}
The text was updated successfully, but these errors were encountered:
DanielDewberry
changed the title
unresolved imports crate::ffi::ngx_http_v2_module, crate::ffi::ngx_http_v2_srv_conf_t
NGX_VERSION=1.24.0: unresolved imports crate::ffi::ngx_http_v2_module, crate::ffi::ngx_http_v2_srv_conf_tApr 3, 2025
Compiling with
NGX_VERSION=1.24.0
on Ubuntu 24.04 yields the following error:To Reproduce
NGX_VERSION=1.24.0
Expected behavior
Successful build, for NGINX 1.24.0 (the version available in the Ubuntu 24.04 archive).
Your environment
Additional context
The examples build when NGX_VERSION=1.26.0
Pertinent build artefact
/root/ngx-rust/target/release/.fingerprint/ngx-04e72e0095884a4e/output-lib-ngx
:The text was updated successfully, but these errors were encountered: