hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
21.44k stars 897 forks source link

Hyprland: undefined symbol: wlr_tearing_control_manager_v1_create #3837

Closed d3cryptofc closed 8 months ago

d3cryptofc commented 12 months ago

Hyprland Version

Hyprland, built from branch HEAD at commit eab279984285250bd544de40868888186a8edeb7 (props: bump ver to 0.32.2).

Bug or Regression?

Bug

Description

When I try to run Hyprland, either through sddm or tty, it crashes with the following error:

λ cat .local/share/sddm/wayland-session.log 
Hyprland: symbol lookup error: Hyprland: undefined symbol: wlr_tearing_control_manager_v1_create

It happens when I rename or delete the hyprland-source folder, the same that I used to compile the Hyprland, but maybe I must be doing it wrong.

Should I really delete that folder? or just put it in /usr/share?

I don't think so because I am following like the docs steps: https://wiki.hyprland.org/Getting-Started/Installation/#cmake-recommended.

How to reproduce

wget https://github.com/hyprwm/Hyprland/releases/download/v0.32.2/source-v0.32.2.tar.gz
tar -xvzf source-v0.32.2.tar.gz && cd hyprland-source
make all && sudo make install

Crash reports, logs, images, videos

Welcome to Hyprland!
[LOG] Instance Signature: eab279984285250bd544de40868888186a8edeb7_1699756046
[LOG] Hyprland PID: 16556
[LOG] ===== SYSTEM INFO: =====
[LOG] System name: Linux
[LOG] Node name: d3cryptofc
[LOG] Release: 6.6.1-arch1-1
[LOG] Version: #1 SMP PREEMPT_DYNAMIC Wed, 08 Nov 2023 16:05:38 +0000

[LOG] GPU information:
00:02.0 VGA compatible controller [0300]: Intel Corporation WhiskeyLake-U GT2 [UHD Graphics 620] [8086:3ea0] (rev 02) (prog-if 00 [VGA controller])

[LOG] os-release:
NAME="Archcraft"
PRETTY_NAME="Archcraft"
ID=archcraft
ID_LIKE=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archcraft.io"
DOCUMENTATION_URL="https://wiki.archcraft.io"
SUPPORT_URL="https://www.reddit.com/r/archcraft"
BUG_REPORT_URL="https://github.com/archcraft-os/archcraft/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archcraft

[LOG] ========================

[INFO] If you are crashing, or encounter any bugs, please consult https://wiki.hyprland.org/Crashes-and-Bugs/

[LOG] 
Current splash: Woo, animations!

[LOG] Creating the HookSystem!
[LOG] Creating the KeybindManager!
[LOG] [hookSystem] New hook event registered: configReloaded
[LOG] Creating the AnimationManager!
[LOG] Created a bezier curve, baked 255 points, mem usage: 4.08kB, time to bake: 33.13µs. Estimated average calc time: 0.00µs.
[LOG] Creating the ConfigManager!
[LOG] Creating the CHyprError!
[LOG] [hookSystem] New hook event registered: focusedMon
[LOG] [hookSystem] New hook event registered: preRender
[LOG] Creating the LayoutManager!
[LOG] [hookSystem] New hook event registered: preConfigReload
[LOG] Reloading the config!
[LOG] Created a bezier curve, baked 255 points, mem usage: 4.08kB, time to bake: 17.78µs. Estimated average calc time: 0.01µs.
[LOG] Using config: /home/lelzin/.config/hypr/hyprland.conf
[LOG] Created a bezier curve, baked 255 points, mem usage: 4.08kB, time to bake: 18.08µs. Estimated average calc time: 0.00µs.
[LOG] Registered dynamic var "$mainMod" -> SUPER
Hyprland: symbol lookup error: Hyprland: undefined symbol: wlr_tearing_control_manager_v1_create
vaxerski commented 11 months ago

this suggests a version mismatch between wlroots and hyprland. Hyprland relies on a very specific commit. Maybe something went wrong with the tarball? Though it's been working forever, so I'd rather say it's something on your end.

d3cryptofc commented 11 months ago

The version of libwlroots that I am using is the same from Makefile

λ ls /usr/local/lib/libwlroots* /usr/lib/libwlroots* /usr/lib64/libwlroots*

/usr/lib64/libwlroots.so.12032 
/usr/local/lib/libwlroots.so.12032
/usr/lib/libwlroots.so.12032

λ cat Makefile | grep -Po "\Klibwlroots\.so\.\d+"
libwlroots.so.12032
libwlroots.so.12032

I will run the steps again to look it closely and put here the log, wait a moment please.

d3cryptofc commented 11 months ago

λ sudo make uninstall

rm -f /usr/local/share/wayland-sessions/hyprland.desktop
rm -f /usr/local/bin/Hyprland
rm -f /usr/local/bin/hyprctl
rm -f /usr/local/lib/libwlroots.so.12032
rm -rf /usr/local/share/hyprland
rm -f /usr/local/share/man/man1/Hyprland.1
rm -f /usr/local/share/man/man1/hyprctl.1

λ make all https://gist.github.com/d3cryptofc/e7cad5e5ebb3b81b4fedd4ab7cb918bc

λ sudo make install

!NOTE: Please note make install does not compile Hyprland and only installs the already built files.mkdir -p /usr/local/share/wayland-sessions
mkdir -p /usr/local/bin
cp -f ./build/Hyprland /usr/local/bin
cp -f ./build/hyprctl/hyprctl /usr/local/bin
chmod 755 /usr/local/bin/Hyprland
chmod 755 /usr/local/bin/hyprctl
if [ ! -f /usr/local/share/wayland-sessions/hyprland.desktop ]; then cp ./example/hyprland.desktop /usr/local/share/wayland-sessions; fi
mkdir -p /usr/local/share/hyprland
cp ./assets/wall_* /usr/local/share/hyprland
mkdir -p /usr/local/share/xdg-desktop-portal
cp ./assets/hyprland-portals.conf /usr/local/share/xdg-desktop-portal
mkdir -p /usr/local/share/man/man1
install -m644 ./docs/*.1 /usr/local/share/man/man1
mkdir -p /usr/local/lib/
cp ./subprojects/wlroots/build/libwlroots.so.12032 /usr/local/lib/
make installheaders
make[1]: Entering directory '/home/lelzin/Downloads/hyprland-source'

mkdir -p /usr/local/include/hyprland
mkdir -p /usr/local/include/hyprland/protocols
mkdir -p /usr/local/include/hyprland/wlroots
mkdir -p /usr/local/share/pkgconfig
find src -name '*.h*' -print0 | cpio --quiet -0dump /usr/local/include/hyprland
cd subprojects/wlroots/include && find . -name '*.h*' -print0 | cpio --quiet -0dump /usr/local/include/hyprland/wlroots && cd ../../..
cd subprojects/wlroots/build/include && find . -name '*.h*' -print0 | cpio --quiet -0dump /usr/local/include/hyprland/wlroots && cd ../../../..
cp ./protocols/*-protocol.h /usr/local/include/hyprland/protocols
cp ./build/hyprland.pc /usr/local/share/pkgconfig
if [ -d /usr/share/pkgconfig ]; then cp ./build/hyprland.pc /usr/share/pkgconfig 2>/dev/null || true; fi
chmod -R 755 /usr/local/include/hyprland
chmod 755 /usr/local/share/pkgconfig
make[1]: Leaving directory '/home/lelzin/Downloads/hyprland-source'
d3cryptofc commented 11 months ago

Solved!

My solution:

sudo make uninstall
rm -rf /usr/local/lib/libwlroots* /usr/lib/libwlroots* /usr/lib64/libwlroots*
make all
sudo make install
sudo ln -s  /usr/local/lib/libwlroots* /usr/lib/

I believe that Arch users needs to change Makefile on line 1

from:

PREFIX = /usr/local

to

PREFIX = /usr

Because Hyprland binary can´t find libwlroots when its in /usr/local/lib:

Hyprland: error while loading shared libraries: libwlroots.so.12032: cannot open shared object file: No such file or directory

You were right about version mismatch between Hyprland and wlroots, I had forgot but I have renamed a previous libwlroots to a new Hyprland (I was lazy).

Thank you very much!! :)