Libc errors with Tokio and Nightly rust

Hi,

I’m trying to get a basic project to work in Repl.it. It uses Warp and Tokio. There are some dependencies which seem to require Rust Nightly, so I have set the project to use nightly, by installing rustup (tried using it, then accepted the installation via “nix”) and using it to override to nightly. However when I build the project I get these strange errors:

error: /nix/store/9bh3986bpragfjmr32gay8p95k91q4gy-glibc-2.33-47/lib/libc.so.6: version `GLIBC_2.34' not found (required by /home/runner/fairlyblack/target/debug/deps/libtokio_macros-a3810cc7b790978d.so)
   --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.2/src/lib.rs:602:13
    |
602 |     pub use tokio_macros::select_priv_declare_output_enum;
    |             ^^^^^^^^^^^^

error: /nix/store/9bh3986bpragfjmr32gay8p95k91q4gy-glibc-2.33-47/lib/libc.so.6: version `GLIBC_2.34' not found (required by /home/runner/fairlyblack/target/debug/deps/libtokio_macros-a3810cc7b790978d.so)
   --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.2/src/lib.rs:608:13
    |
608 |     pub use tokio_macros::select_priv_clean_pattern;
    |             ^^^^^^^^^^^^

error: /nix/store/9bh3986bpragfjmr32gay8p95k91q4gy-glibc-2.33-47/lib/libc.so.6: version `GLIBC_2.34' not found (required by /home/runner/fairlyblack/target/debug/deps/libtokio_macros-a3810cc7b790978d.so)
   --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.2/src/lib.rs:615:17
    |
615 |         pub use tokio_macros::main;
    |                 ^^^^^^^^^^^^

error: /nix/store/9bh3986bpragfjmr32gay8p95k91q4gy-glibc-2.33-47/lib/libc.so.6: version `GLIBC_2.34' not found (required by /home/runner/fairlyblack/target/debug/deps/libtokio_macros-a3810cc7b790978d.so)
   --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.2/src/lib.rs:620:17
    |
620 |         pub use tokio_macros::test;
    |                 ^^^^^^^^^^^^

   Compiling mime_guess v2.0.4
   Compiling thiserror-impl v1.0.37
error: could not compile `tokio` due to 4 previous errors

I did not get such errors with the same project (same version) on a real computer. What could be going on? I was excited by Repl.it and happily purchased a few cycles to boost my project and make it private, but didn’t expect to stumble upon a problem like this…

Would love some help!
Pierric.

Hi @Pierric. Thank you for your post.

In order for the community to suggest ideas to help you solve your code issue it would be useful to share a link to your Repl.

Hi @IanAtReplit ,

Thanks for replying. There goes the benefit of paying for private repos :smiley: I guess there’s nothing to hide from this code though, so I’ve made it public for now. Just don’t judge the code, this is my first Rust project and it’s very messy. It compiled fine in this state on a Fedora system a few weeks ago.

https://replit.com/@Pierric82/fairlyblack

Cheers
Pierric.

Hi again,

Today I came back to the repl, and even though it is set as always on, it told me nothing was set up, even cargo was no longer installed; however I still had rustup. I set up for nightly again with rustup, which downloaded again cargo etc.; then everything compiled fine… I’m not sure what happened, but would like to understand if someone has an idea.

Regards,
Pierric.

Hi @Pierric I had a look at your Repl, thank you for sharing. I couldn’t get it to run at all.

Just see the message:

image

Unfortunately I’ve no experience of using Rust / Cargo so hopefully someone else in the Ask community can chip in and help!