tauri
tauri copied to clipboard
[bug] error: linking with cc failed: exit status: 1 on fedora
Describe the bug
Hi,
I'm testing Tauri with a Vue frontend on fedora 40 but the app doesn't compile :(
I get this error output when running npm run tauri dev:
error: linking with cc failed: exit status: 1
[ALOT OF TEXT]
= note: /usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/14/../../../../lib64/libwebkit2gtk-4.0.so: undefined reference to g_once_init_leave_pointer' /usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/14/../../../../lib64/libwebkit2gtk-4.0.so: undefined reference to g_once_init_enter_pointer'
collect2: error: ld returned 1 exit status
= note: some extern functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the -l flag to specify native libraries to link
= note: use the cargo:rustc-link-lib directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib)
error: could not compile nout (bin "nout") due to 1 previous error
Reproduction
-> npm create tauri-app@latest example ✔ Choose which language to use for your frontend · TypeScript / JavaScript - (pnpm, yarn, npm, bun) ✔ Choose your package manager · npm ✔ Choose your UI template · Vue - (https://vuejs.org/) ✔ Choose your UI flavor · TypeScript -> cd example -> npm install -> npm run tauri dev
Expected behavior
App is build and runs fine
Full tauri info output
[✔] Environment
- OS: Fedora 40.0.0 X64
✔ webkit2gtk-4.0: 2.44.1
✔ rsvg2: 2.57.1
✔ rustc: 1.79.0 (129f3b996 2024-06-10)
✔ cargo: 1.79.0 (ffa9cf99a 2024-06-03)
✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
- node: 20.12.2
- pnpm: 9.4.0
- yarn: 1.22.22
- npm: 10.5.0
[-] Packages
- tauri [RUST]: 1.6.8
- tauri-build [RUST]: 1.5.2
- wry [RUST]: 0.24.10
- tao [RUST]: 0.16.9
- tauri-cli [RUST]: 1.5.14
- @tauri-apps/api [NPM]: 1.5.6
- @tauri-apps/cli [NPM]: 1.5.14
[-] App
- build-type: bundle
- CSP: unset
- distDir: ../dist
- devPath: http://localhost:1420/
- framework: Vue.js
- bundler: Vite
Stack trace
error: linking with cc failed: exit status: 1
...
...
...
= note: /usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/14/../../../../lib64/libwebkit2gtk-4.0.so: undefined reference to `g_once_init_leave_pointer'
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/14/../../../../lib64/libwebkit2gtk-4.0.so: undefined reference to `g_once_init_enter_pointer'
collect2: error: ld returned 1 exit status
= note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the `-l` flag to specify native libraries to link
= note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib)
error: could not compile `nout` (bin "nout") due to 1 previous error
Additional context
I followed the guide on: https://tauri.app/v1/guides/getting-started/prerequisites
I ran this command:
-> sudo dnf install webkit2gtk4.0-devel
openssl-devel
curl
wget
file
libappindicator-gtk3-devel
librsvg2-devel Output: Last metadata expiration check: 5:38:29 ago on Thu 27 Jun 2024 05:20:16 PM -03. Package webkit2gtk4.0-devel-2.44.1-2.fc40.x86_64 is already installed. Package openssl-devel-1:3.2.1-2.fc40.x86_64 is already installed. Package curl-8.6.0-8.fc40.x86_64 is already installed. Package wget2-wget-2.1.0-9.fc40.x86_64 is already installed. Package file-5.45-4.fc40.x86_64 is already installed. Package libappindicator-gtk3-devel-12.10.1-4.fc40.x86_64 is already installed. Package librsvg2-devel-2.57.1-6.fc40.x86_64 is already installed. Dependencies resolved. Nothing to do. Complete!
and this command:
-> sudo dnf group install "C Development Tools and Libraries" Output: Last metadata expiration check: 5:40:51 ago on Thu 27 Jun 2024 05:20:16 PM -03. Dependencies resolved. =================================================================================================== Package Architecture Version Repository Size =================================================================================================== Installing Groups: C Development Tools and Libraries
Transaction Summary
Is this ok [y/N]: y Complete!
But the app also doesn't compile