Repository: slint-ui/slint (language: rust)

Issue:
slint-lsp _ZN7QObject10timerEventEP11QTimerEvent: /usr/lib/libQt6Core.so.6: error due to GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS
### Bug Description

error when run slint-lsp v1.9.0 on linux

### Reproducible Code (if applicable)

_No response_

### Environment Details

- Slint Version: 1.9.0
- Platform/OS: Manjaro linux
- Programming Language: -
- Backend/Renderer: -


### Product Impact

_No response_


Discussion / hints:
- Is this the package downloaded from our github release page?
- Do you have Qt installed, what version?
yes

```
qt5-base 5.15.16+kde+r130-3
qt5-declarative 5.15.16+kde+r22-3
qt5-graphicaleffects 5.15.16-3
qt5-imageformats 5.15.16+kde+r2-3
qt5-location 5.15.16+kde+r7-3
qt5-multimedia 5.15.16+kde+r2-3
qt5-quickcontrols 5.15.16-3
qt5-quickcontrols2 5.15.16+kde+r5-3
qt5-sensors 5.15.16-3
qt5-speech 5.15.16+kde+r1-3
qt5-svg 5.15.16+kde+r5-3
qt5-tools 5.15.16+kde+r3-3
qt5-translations 5.15.16-3
qt5-virtualkeyboard 5.15.16-3
qt5-wayland 5.15.16+kde+r59-3
qt5-webchannel 5.15.16+kde+r3-3
qt5-webengine 5.15.18-5
qt5-x11extras 5.15.16-3
qt5pas 1:1.2.15-1
qt6-5compat 6.8.1-1
qt6-base 6.8.1-1
qt6-charts 6.8.1-1
qt6-connectivity 6.8.1-1
qt6-declarative 6.8.1-1
qt6-imageformats 6.8.1-1
qt6-multimedia 6.8.1-1
qt6-multimedia-ffmpeg 6.8.1-1
qt6-positioning 6.8.1-1
qt6-quick3d 6.8.1-1
qt6-quicktimeline 6.8.1-1
qt6-sensors 6.8.1-1
qt6-serialport 6.8.1-1
qt6-shadertools 6.8.1-1
qt6-speech 6.8.1-1
qt6-svg 6.8.1-1
qt6-tools 6.8.1-1
qt6-translations 6.8.1-1
qt6-virtualkeyboard 6.8.1-1
qt6-wayland 6.8.1-1
qt6-webchannel 6.8.1-1
qt6-webengine 6.8.1-1
qt6-websockets 6.8.1-1
qtcreator 15.0.0-1
```
Faced the same issue

- Slint LSP verison 1.9.1
- Platform/OS: Cachyos (Arch based)
It seems the problem only related to Arch users (or arch-based distros)

Plasma launcher had the same [issue](https://github.com/PrismLauncher/PrismLauncher/issues/991)

Thanks to [comment](https://github.com/PrismLauncher/PrismLauncher/issues/991#issuecomment-1509943295) of @Scrumplex, the problem in the [commit](https://github.com/archlinux/svntogit-packages/commit/395c189970fe5b20e7f84ecd60a3bf57c34ac7d9) in Arch repo of qt6-base

So to fix the problem you can build qt6-base from source
1. Clone the repo https://gitlab.archlinux.org/archlinux/packaging/packages/qt6-base
2. In PKGBUILD find `-DFEATURE_no_direct_extern_access=ON` and change it to `-DFEATURE_no_direct_extern_access=OFF`
3. Run `makepkg -si`

After this steps `slint-lsp` works fine!
Another way to solve this issue is install slint-lsp using `cargo install` and compiling it from source.

```
cargo install slint-lsp
```

and then prepend `$HOME/.cargo/bin` to your `$PATH`.

It is more simple and do not break system Qt package.

I'm using neovim for developing slint app now, I configured `mason.nvim` to use slint-lsp from cargo instead of downloaded one from mason:

```
  {
    "williamboman/mason.nvim",
    opts = {
      PATH = "append", # append mason-downloaded binaries to the end of $PATH 
    },
  },
```

VSCode or other IDEs may have similar options.
Searching for the error on google returns https://bugreports.qt.io/browse/QTBUG-115261
It looks like this is caused by some binary incompatibility with Archlinux (and maybe other) packages, as they compile Qt with compilation flags that are not compatible with the ones used by Ubuntu on our build machine.

Fix patch:
diff --git a/.github/workflows/slint_tool_binary.yaml b/.github/workflows/slint_tool_binary.yaml
index 3074894b5da..800881d3565 100644
--- a/.github/workflows/slint_tool_binary.yaml
+++ b/.github/workflows/slint_tool_binary.yaml
@@ -95,16 +95,11 @@ jobs:
             - uses: ./.github/actions/setup-rust
               with:
                   target: x86_64-unknown-linux-gnu
-            - name: Install Qt
-              uses: jurplel/install-qt-action@v4
-              with:
-                  version: 6.2.2
-                  cache: true
             - uses: baptiste0928/cargo-install@v3
               with:
                   crate: cargo-about
             - name: Build
-              run: cargo build --verbose --no-default-features --features backend-qt,${{ github.event.inputs.features || inputs.features }} --release -p slint-${{ github.event.inputs.program || inputs.program }}
+              run: cargo build --verbose --no-default-features --features ${{ github.event.inputs.features || inputs.features }} --release -p slint-${{ github.event.inputs.program || inputs.program }}
             - name: Create artifact directory
               run: |
                   mkdir -p slint-${{ github.event.inputs.program || inputs.program }}


Test patch: