-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
/usr/lib/libc.so.6: version `GLIBC_2.33' not found #1355
Comments
If this happens with the dev branch, then please reopen this issue. For more information, see: #1253 |
It should not be closed, I got the same issue and found no solution here! It's not cross-platform at all! |
Can you confirm this is still happening on Dev / beta @pansila ? |
FYI - the reason it was closed is because of our policy not treating issues apparently related to the alpha (and webview/webview) version of Tauri. |
Our research has shown that we might have to resort to "rust compiler tricks" because for whatever reason older versions of GCC are forwards compatible, but newer ones are not backwards compatible. I had hoped that things had "fixed themselves" recently, but will reopen to be on the safe side. |
I'm using |
that is not latest. can you try |
It's not GCC compatibility issue, but the glibc version mismatch on different machines. I'm now trying to build the tauri app targeting at |
sorry, I meant glibc not gcc |
I managed to use the Cross to build the tauri app. Just need to build a new docker image based on the Cross docker image Dockerfile:
|
I also need to replace
Put it in the path Add
|
awesome work and insight |
But failed to run if target machines's glibc version is lower than GLIBC_2.18. How can I compile a Rust program so it doesn't use __cxa_thread_atexit_impl? |
|
Can you see if compiling with this env variable fixes the issue? |
I get that, but at some point we just have to cut our losses and admit that if a user is not keeping fundamental libs up to date then there isn't much we can do about it - other than perhaps informing them to join the 21st century. :P |
Jokes aside, 2.18 was released in 2013 - and only RHEL considers it still useful. Please compare: |
Thanks, didn't work though.
|
Hmm this is tricky. I also found out that statically linking glibc is highly discouraged. So if we want to share Tauri apps with older machines, we need to compile with an older glibc version too :/ |
I hit this issue trying to release to centos 7 having built on ubuntu. The workaround is to create a docker image for the environment you are releasing to, or use a tool like rust embedded cross build that does this automatically for you (I haven't used that tool yet). so the trick is you also need to build tauri and build your app with that version (not the downloaded node package) Here's the important steps at tleast for centos 7 (for example):
|
Btw I've changed the CLI binary build CI to run on ubuntu-18.04 (that's the lowest available ubuntu on github actions :/) so maybe you won't need to build the CLI by yourself on the next release. |
@lucasfernog thanks, and actually appimage has documented the best practice for this exact issue:
If I build my appimage on centos7 it does not run on ubuntu 18.04, but there is an issue in AppImage about this as well:
|
Yeah we still need to take care of copying shared libraries to the appimage. |
had similar issue with lastpass-cli, compiled and ran fine on laptop using "ubuntu 21.04" but trying to execute that binary in an azure devops pipeline with hosted agent using "ubuntu 20.04" got error "GLIBC_2.33 not found", workaround was to build it in the pipeline |
I'll close this since we fixed the AppImage issues and there's nothing we can do regarding the glibc version. This will be documented. |
Is there an equivalent to this for (K)ubuntu? |
@siauderman I'd recommend using github actions for this since it supports ubuntu 18.04 too and you could build for mac and windows at the same time. Alternatively we added support for cross quite some time which should make this pretty straight forward too. If you still want to use the docker script you need to
|
I have the same errors when using |
I have successfully built and run a Tauri app on CentOS/RHEL 7. I found the information in this thread helpful (#1355 (comment) in particular) but incomplete. I modified the Dockerfile provided above and add step-by-step instructions to build Tauri apps that will work on CentOS/RHEL 7 (glibc 2.17) and newer. I've captured this at https://github.com/rfdonnelly/tauri-builders but I've also copied and pasted the relevant information below: Dockerfile# Adapted from: https://github.com/tauri-apps/tauri/issues/1355#issuecomment-896434917
FROM centos:centos7.9.2009
# Install dependencies
RUN \
yum install -y \
# notice I'm using an old version of webkit. It works!
webkitgtk4-devel \
openssl-devel \
curl \
wget \
squashfs-tools \
gcc \
gcc-c++ \
make \
file \
librsvg2-devel
# Install NVM
RUN \
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash \
&& source $HOME/.nvm/nvm.sh \
&& nvm install 14 --latest-npm \
&& nvm use node
# Install Rust
RUN \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
# Install Tauri CLI
RUN \
source $HOME/.cargo/env \
# do not use downloaded packages of tauri - you must build it yourself in this environment for correct GLIBC version
&& cargo install tauri-cli --vers 1.0.4
# NOTE: tauri-macros has nothing to install (no binaries) so this isn't needed
# && cargo install tauri-macros --vers 1.0.4
ENV PATH=/root/.nvm/versions/node/v14.20.0/bin:$PATH
ENV PATH=/root/.cargo/bin:$PATH
# now instead you build your appimage like:
# cargo tauri build --debug --verbose InstructionsCreate a Tauri app # Select the default for all prompts (just keeping pressing Enter)
npm create tauri-app Install the dependencies cd tauri-app
npm install Modify the Tauri bundle identifier # Edit src-tauri/tauri.conf.json and change the value of tauri.bundle.identifier to "test"
vim src-tauri/tauri.conf.json Build the CentOS 7 Tauri build image docker build -t tauri:centos7 . Build the Tauri app docker run -it --rm \
-v $PWD:/src \
-w /src \
tauri:centos7 \
/bin/bash -c "cargo tauri build --debug" Run the Tauri app src-tauri/target/debug/bundle/appimage/tauri-app_0.1.0_amd64.AppImage VideoThe following video shows a Tauri app being built in a CentOS 7 Docker container and being run on Ubuntu 22.10 under WSL 2. tauri-centos7.mp4 |
In my case, running |
Has anybody figured this out for tauri-v2-beta yet? I'm trying to get an appImage that will work on Centos Stream 9, but haven't found an OS that will build for me yet. It appears we need an OS with GLIBC <= 2.34 (to support CentOS Stream 9) and a gnome glib >= 2.70 (which is what it appears that Tauri needs). Am I just going to have to build gnome from source? |
Just built on arch based system and tried to run the Appimage on debian. |
Not sure if this would be helpful, but I've encountered the same issue, and I used zig cc to link against an older glibc version. Though my repo is for cross compiling to arm64, you can just ignore the cc stuff(if compiling for the same arch), and change the config(.cargo/config.toml) accordingly. REPO In short: you can(?) compile for older systems with a newer glibc on the host machine. |
Describe the bug
I build my application on one machine, then I have a friend who tries to launch the appimage on another machine using another glibc version. They get the following error:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect the appimage to "just work", since as far as I know appimages should have static libraries and therefore launch on any machine.
Are there any solutions to this?
Platform and Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: