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

Wrong toolchain when using WSL #111

Closed
Dodecahedr0x opened this issue Jul 21, 2022 · 8 comments
Closed

Wrong toolchain when using WSL #111

Dodecahedr0x opened this issue Jul 21, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@Dodecahedr0x
Copy link

Hi,

I installed fuelup and forc today and managed to build and deploy a project.
After reopening a terminal, I'm now getting the following error:

/home/Dodecahedr0x/.fuelup/toolchains/latest-x86_64-unknown-linux-gnu/bin/forc: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/Dodecahedr0x/.fuelup/toolchains/latest-x86_64-unknown-linux-gnu/bin/forc)

I'm using the Windows Subsystem Linux (WSL) running a 18.04 Ubuntu.
I think this could be due to the default rustup toolchain being stable-x86_64-unknown-linux-gnu (default) instead of something x86_64-linux-gnu.

@mitchmindtree mitchmindtree transferred this issue from FuelLabs/sway Jul 22, 2022
@mitchmindtree mitchmindtree added the bug Something isn't working label Jul 22, 2022
@mitchmindtree
Copy link
Contributor

Thanks for the issue @Dodecahedr0x!

I've transferred this from the Sway repo over to the fuelup repo as I think it's likely more suited here.

After reopening a terminal, I'm now getting the following error

Interesting, this makes me wonder if the issue is PATH related. Before you re-opened the terminal, are you sure you were using the fuelup-installed forc instance? Is there a chance you might have been using an older forc instance installed via some other means like cargo install forc?

Would you mind also providing the exact command you used to produce the forc error? E.g. does it happen when you run forc --help? Or only when running a particular command?

@JoshuaBatty is also on WSL - he might have some insight?

@Dodecahedr0x
Copy link
Author

Thanks for your reply,

I have the path to ~/.fuelup/bin in my PATH, I ran cargo uninstall forc and checked that the .cargo/bin repo does not have anything named forc in it.

To produce this error I ran forc new my_project but i get the same error (3 times per command) when I type forc --help or any other command.

I installed a new Ubuntu 18.04 on the WSL1 however and it worked and keeps working so I guess it's caused by some of the differences in how WSL1 and WSL2 work...

@eightfilms
Copy link
Contributor

eightfilms commented Jul 22, 2022

I am able to reproduce it now on a Linode Ubuntu 18.04 instance, running into the same error. It seems like glibc_2.27 is the latest supported version on Ubuntu 18.04, and forc executable requires glibc_2.29, since it was compiled and distributed using Ubuntu 20.04. I think a quick fix would be to use Ubuntu >20.04 instead, but I will continue looking into this.

Does fuel-core work for you?

@carletex
Copy link

Hey there!

I'm having the same issue. I'm on Linux Mint 19.3 (Ubuntu 18.04 base).

forc --help returns:

/home/my-user/.fuelup/toolchains/latest-x86_64-unknown-linux-gnu/bin/forc: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/my-user/.fuelup/toolchains/latest-x86_64-unknown-linux-gnu/bin/forc)
/home/my-user/.fuelup/toolchains/latest-x86_64-unknown-linux-gnu/bin/forc: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.29' not found (required by /home/my-user/.fuelup/toolchains/latest-x86_64-unknown-linux-gnu/bin/forc)
/home/my-user/.fuelup/toolchains/latest-x86_64-unknown-linux-gnu/bin/forc: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /home/my-user/.fuelup/toolchains/latest-x86_64-unknown-linux-gnu/bin/forc)

fule-core --help returns:

/home/my-user/.fuelup/toolchains/latest-x86_64-unknown-linux-gnu/bin/fuel-core: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/my-user/.fuelup/toolchains/latest-x86_64-unknown-linux-gnu/bin/fuel-core)
/home/my-user/.fuelup/toolchains/latest-x86_64-unknown-linux-gnu/bin/fuel-core: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /home/my-user/.fuelup/toolchains/latest-x86_64-unknown-linux-gnu/bin/fuel-core)
/home/my-user/.fuelup/toolchains/latest-x86_64-unknown-linux-gnu/bin/fuel-core: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.30' not found (required by /home/my-user/.fuelup/toolchains/latest-x86_64-unknown-linux-gnu/bin/fuel-core)
/home/my-user/.fuelup/toolchains/latest-x86_64-unknown-linux-gnu/bin/fuel-core: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/my-user/.fuelup/toolchains/latest-x86_64-unknown-linux-gnu/bin/fuel-core)

There are some guides online on how to update to GLIBC_2.29 on Ubuntu 18.04, but seems like a dangerous update and it breaks the OS for some people.

I'm guessing this a tricky thing to fix on your side.

Thanks!

@eightfilms
Copy link
Contributor

eightfilms commented Oct 19, 2022

This issue is a result of our usage of GitHub runners to build and release our binaries, and they currently all run on ubuntu-latest which is ubuntu-20.04, which would use the glibc version available on the system. Unfortunately, since the binaries are dynamically linked, this means that the binaries try to also use the same glibc version even on an earlier Linux distro version, leading to the error you see. GitHub is also deprecating the ubuntu-18.04 runners soon, so we can't simply downgrade them :/

The immediate solution(s) to this issue would be to either:
a) upgrade to Ubuntu 20.04 if possible, or
b) clone the repos, compile and use both forc and fuel-core from source.

Both solutions aren't pretty 😅

I de-prioritized this issue for a bit to work on other things but I will start to actively find a workaround for this.

@carletex
Copy link

Thanks for the quick response @bingcicle !!

I was able to install fuelup & fuel-core from source.

To have the same setup for forc as in the quickstart guide:

This will install forc, forc-client, forc-fmt, forc-explore, forc-lsp

Which repos should I clone & compile? I see the forc-client and forc-explore repos, but not the other ones.

Thanks!

@eightfilms
Copy link
Contributor

Those should all be in the Sway repo. forc-client was going to be extracted out of that repo, but we abandoned that plan, and forc-explore is in the process of being extracted out. Most of what you need to develop should be available within the Sway repo itself!

@eightfilms
Copy link
Contributor

Closing due to inactivity - pleaes reopen if this is still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants