Actix_web crate compiler warning

I'm trying out the actix_web crate and getting a compiler warning shown below.

Does anyone have a suggestion on how to deal with this?

fwiw/ The error appears to be benign because various sample programs appear to run despite this warning. However I'm dubious about whether to ignore it.

The steps to reproduce are:

cargo new actix_web_test
cd actix_web_test
echo 'actix-web = "3.3.3"' >> Cargo.toml
cargo build

Many dependencies compile fine and then the following warning occurs while compiling the actix-codec dependency.

   Compiling actix-codec v0.3.0
WARN rustc_metadata::locator no metadata found: failed to mmap file '/home/chris/tmp/actix_web_test/target/debug/deps/libpin_project_internal-07394887e7c37526.    so': memory map must have a non-zero length

Can you try with version 3.3.2 and see if it compiles for you?

This is a harmless warning that the mentioned file is empty. This warning should now be supressed on nightly. I'm not sure if it has hit stable yet. By the way it should only show up.if you have RUSTC_LOG set. Which rustc version are you using?

Thank you for the message. It's good that it's a harmless warning.

I believe I have the latest as I did a rustup update today.

Here's the version:

rustc --version
rustc 1.57.0 (f1edd0429 2021-11-29)

fwiw/ I do not have any environment variables set with RUST in the name:

$ env | grep RUST
$ cargo build
WARN rustc_metadata::locator no metadata found: failed to mmap file '/home/chris/projects/rust/rest/target/debug/deps/libpin_project_internal-a36d7e36731ad138.so': memory map must have a non-zero length

Found the PR supressing these warnings: https://github.com/rust-lang/rust/pull/88368 It will land in 1.58.0.

1 Like

That's great. Thank you very much for the information!

I'll be looking for version 1.58.0 when I get it I will post my results here.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.