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

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

Closed
zhuyu4839 opened this issue Dec 19, 2024 · 6 comments · Fixed by #7259
Labels
bug Something isn't working packaging Packaging and ease of downloading/obtaining Slint
Milestone

Comments

@zhuyu4839
Copy link

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

@zhuyu4839 zhuyu4839 added bug Something isn't working need triaging Issue that the owner of the area still need to triage labels Dec 19, 2024
@ogoffart
Copy link
Member

  • Is this the package downloaded from our github release page?
  • Do you have Qt installed, what version?

@zhuyu4839
Copy link
Author

zhuyu4839 commented Dec 20, 2024

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

@Vaider7
Copy link

Vaider7 commented Dec 25, 2024

Faced the same issue

  • Slint LSP verison 1.9.1
  • Platform/OS: Cachyos (Arch based)

@Vaider7
Copy link

Vaider7 commented Dec 25, 2024

It seems the problem only related to Arch users (or arch-based distros)

Plasma launcher had the same issue

Thanks to comment of @Scrumplex, the problem in the commit 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!

@Reverier-Xu
Copy link

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.

@ogoffart
Copy link
Member

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.

@ogoffart ogoffart added the packaging Packaging and ease of downloading/obtaining Slint label Jan 2, 2025
@ogoffart ogoffart added this to the 1.9.2 milestone Jan 2, 2025
@ogoffart ogoffart removed the need triaging Issue that the owner of the area still need to triage label Jan 2, 2025
ogoffart added a commit that referenced this issue Jan 2, 2025
Don't link against Qt in our binary because it might not be binary
compatible with all distributions.
Eg, archlinux shows this error:
`error due to GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS`

We also don't enable the Qt backend in our vscode extension

Fixes #7174
ogoffart added a commit that referenced this issue Jan 2, 2025
Don't link against Qt in our binary because it might not be binary
compatible with all distributions.
Eg, archlinux shows this error:
`error due to GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS`

We also don't enable the Qt backend in our vscode extension

Fixes #7174
ogoffart added a commit that referenced this issue Jan 2, 2025
Don't link against Qt in our binary because it might not be binary
compatible with all distributions.
Eg, archlinux shows this error:
`error due to GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS`

We also don't enable the Qt backend in our vscode extension

Fixes #7174
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working packaging Packaging and ease of downloading/obtaining Slint
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants