DioxusLabs / DioxusLabs/dioxus

Linked error with libwebkit2gtk

Open
#3,941 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
39.1k
Forks
1.9k
Avg merge
4d 10h
Merged PRs (30d)
4

Description

**Problem**

I wanted to try dioxus for my curiosity so I followed the getting started, installed the dependencies, and tried to build a fresh dioxus **desktop app**.
The linked seems to find the `.so` file but does not contains the expected functions. I have checked if the libwebkit is installed, and yes it is.

**Steps To Reproduce**

- `dx new dioxus_sandbox` config as in the getting started but default to desktop
- `cd dioxus_sandbox`
- `dx build`

**Logs**

```
❯ dx build
[...]
= note: some arguments are omitted. use `--verbose` to show all linker arguments
= note: /usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../lib/libwebkit2gtk-4.1.so: undefined reference to `gst_structure_foreach_id_str'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../lib/libwebkit2gtk-4.1.so: undefined reference to `gst_id_str_as_str'
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)

7.597s ERROR error: could not compile `diuxus_sandbox` (bin "diuxus_sandbox") due to 1 previous error
7.632s ERROR Caused by:
7.661s ERROR err=Other(Cargo build failed, signaled by the compiler. Toggle tracing mode (press `t`) for more information.)
7.665s ERROR err=Other(Cargo build failed, signaled by the compiler. Toggle tracing mode (press `t`) for more information.)
```

**Environment:**

- Dioxus version: `0.6.3` from crates.io
- Rust version: `1.85.0`
- OS info: Manjaro
- App platform: Desktop

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the fresh app from the getting-started flow with `dx new` and `dx build --verbose`; inspect the desktop dependency and linker arguments around libwebkit2gtk-4.1 and the missing GStreamer symbols. Done means a default Dioxus desktop app builds successfully on the reported Manjaro environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.