Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest Xtensa Rust (1.75) does not work under Ubuntu 20.04, GLIBC version error #252

Closed
jobafr opened this issue Jan 22, 2024 · 13 comments
Closed

Comments

@jobafr
Copy link

jobafr commented Jan 22, 2024

Bug description

After using espup install under Ubuntu 20.04 (aarch64, NVidia Jetson AGX Xavier), running the cargo binary produces a linker error.

$ ~/.rustup/toolchains/esp/bin/cargo
/home/me/.rustup/toolchains/esp/bin/cargo: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/me/.rustup/toolchains/esp/bin/cargo)
/home/me/.rustup/toolchains/esp/bin/cargo: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /home/me/.rustup/toolchains/esp/bin/cargo)
/home/me/.rustup/toolchains/esp/bin/cargo: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/me/.rustup/toolchains/esp/bin/cargo)
  • Would you like to work on a fix? [y/n]

n

To Reproduce

Steps to reproduce the behavior:

  1. run espup install on Ubuntu 20.04 aarch64
  2. try to run cargo

Expected behavior

Cargo works and compiles my project

Environment

$ cat /etc/issue
Ubuntu 20.04.6 LTS \n \l

$ uname -a
Linux aql57 5.10.104-tegra esp-rs/espup#1 SMP PREEMPT Wed Aug 10 20:17:07 PDT 2022 aarch64 aarch64 aarch64 GNU/Linux

$ espup --version
espup 0.10.0

Additional context

This looks similar to this issue in espflash from last year.

I tried to provide the cargo version as well, but /home/me/.rustup/toolchains/esp/bin/cargo --version does of course fail with the same linker error.

@jobafr jobafr added the bug Something isn't working label Jan 22, 2024
@SergioGasquez
Copy link
Member

Hi! This does not really belong to espup repo, as the artifacts which contain the Xtensa Rust are produced in rust-build, so I'll move the issue there

@SergioGasquez
Copy link
Member

SergioGasquez commented Jan 22, 2024

We moved our builders to ubuntu 22.04 in latest release (1.75) since there was an issue with the CMake version, hence this error when using ubuntu 20.04.

@georgik can provide more details

The only workaround at the moment is to build the toolchain using ubuntu 20.04, but I'll discuss this issue tomorrow with @georgik

@SergioGasquez SergioGasquez transferred this issue from esp-rs/espup Jan 22, 2024
@SergioGasquez SergioGasquez changed the title Toolchain installed by espup does not work under Ubuntu 20.04, GLIBC version error Latest Xtensa Rust (1.75) does not work under Ubuntu 20.04, GLIBC version error Jan 22, 2024
@jobafr
Copy link
Author

jobafr commented Jan 22, 2024

Hi, thank you for the quick response! As a quick fix, is it possible to intentionally install an older rust release that's compatible with 20.04 using espup?

@SergioGasquez
Copy link
Member

Hi, thank you for the quick response! As a quick fix, is it possible to intentionally install an older rust release that's compatible with 20.04 using espup?

Yes, using espup install -v 1.74.0.1 should work

@georgik georgik added 3rd party limitation and removed bug Something isn't working labels Feb 12, 2024
@georgik
Copy link
Collaborator

georgik commented Feb 12, 2024

Marked as Third Party limitation, since Ubuntu 20 does not support build of latest toolchains.
@SergioGasquez : Would it be possible to add warning to espup, that distribution is not supported?

If somebody finds a solution how to handle such build, we might consider adding it. Otherwise, please upgrade to newer Ubuntu or use container.

@jesper-adolfsson-001
Copy link

If you do espup install -v 1.74.0.1 then the default esp-idf template doesn't compile.... Is there no way around this?

@Vollbrecht
Copy link

If you do espup install -v 1.74.0.1 then the default esp-idf template doesn't compile.... Is there no way around this?

how is this related to this issue? Please don't hijack issues if you have a new issue and if so please give a full error report!

@jesper-adolfsson-001
Copy link

jesper-adolfsson-001 commented Aug 8, 2024

If you do espup install -v 1.74.0.1 then the default esp-idf template doesn't compile.... Is there no way around this?

how is this related to this issue? Please don't hijack issues if you have a new issue and if so please give a full error report!

Sorry for breaking some fancy hijacking etiquette here... I was just trying to help beginners like me who has spent 3 days now trying to get this to work with some additional info. It is a bit frustrating but I don't give up :)

@SergioGasquez
Copy link
Member

I assume MSRV of the esp-idf-template is greater than 1.74.0.1, which is the latest version using the GLIBC that Ubuntu 20.04 support.

Is there any reason not to update to a recent Ubuntu version?

@jesper-adolfsson-001
Copy link

I assume MSRV of the esp-idf-template is greater than 1.74.0.1, which is the latest version using the GLIBC that Ubuntu 20.04 support.

Is there any reason not to update to a recent Ubuntu version?

Thanks for answering and I apologize in advance if I provide non-relevant info now and ask stupid questions but I'm a bit new to this.

I installed WSL Ubuntu in Windows today and it says it is version 20.04 "Focal" which I now understand is an old version. I will try to upgrade it and see what happens.

@SergioGasquez
Copy link
Member

You don't need to apologize, or be defensive about our comments. Both, @Vollbrecht and I were trying to help you, also for questions I would recommend using our matrix channel https://matrix.to/#/#esp-rs:matrix.org

@Vollbrecht
Copy link

i am not using windows that much these days though you can get ubuntu 22 directly for wsl i think if you follow for exmaple this

@jesper-adolfsson-001
Copy link

You don't need to apologize, or be defensive about our comments. Both, @Vollbrecht and I were trying to help you, also for questions I would recommend using our matrix channel https://matrix.to/#/#esp-rs:matrix.org

I appreciate that, I really do :)

I did what you recommended and installed WSL Ubuntu 24.04 and it sort of worked. Still have some issues that I don't understand but I will reach out in the matrix.org chat if I need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

6 participants