View previous topic :: View next topic |
Author |
Message |
oneone Tux's lil' helper
Joined: 20 Sep 2017 Posts: 103
|
Posted: Wed Sep 18, 2024 6:30 am Post subject: hyprland-0.43.0 does not build with clang-18.1.8 |
|
|
Hi there!
I've been happily using hyprland as a wayland compositor for a while, but with the recent update from 0.42.0 to 0.43.0, I ran into an issue. Hyprland 0.43.0 requires C++26 to build and hence gcc-14 or clang-18 or greater will be required to compile hyprland (see https://github.com/hyprwm/Hyprland/releases/tag/v0.43.0).
I usually build everything with gcc and since gcc-14 is still not stable on my platform (amd64), I tried to build hyprland with clang (with the lastest stable version 18.1.8 on amd64).
I created the file /etc/portage/env/compiler-clang with the following contents:
Code: | # Normal settings here
COMMON_FLAGS="-O2 -march=native"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
CC="clang"
CPP="clang-cpp" # necessary for xorg-server and possibly other packages
CXX="clang++"
AR="llvm-ar"
NM="llvm-nm"
RANLIB="llvm-ranlib" |
I also added the following line to a file in /etc/portage/package.env/ in order to compile hyprland with clang as defined in the file above:
Code: | gui-wm/hyprland compiler-clang |
However, when trying to build hyprland-0.43.0, the file src/Hyprland.p/debug_Log.cpp.o fails to compile with the following error:
Code: | ../hyprland-source/src/debug/Log.cpp:13:26: error: no member named 'native_handle' in 'std::basic_ofstream<char>' |
I am not sure, what to make of this. According to https://en.cppreference.com/w/cpp/io/basic_ofstream/native_handle, native_handle() should be defined in the C++26 standard and according to line 364 in the build log, I indeed tried to compile Log.cpp using this standard:
Code: | clang++ -Isrc/Hyprland.p -Isrc -I../hyprland-source/src -Isubprojects/udis86 -I../hyprland-source/subprojects/udis86 -I../hyprland-source/subprojects/udis86/libudis86 -Isubprojects/udis86/__CMake_build -I../hyprland-source/subprojects/udis86/__CMake_build -Iprotocols -I/usr/lib64/libffi/include -I/usr/include/cairo -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/uuid -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c++26 -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers -Wno-narrowing -Wno-pointer-arith '-DDATAROOTDIR="/usr/share"' -DHAS_EXECINFO -O2 -march=native -pthread -MD -MQ src/Hyprland.p/debug_Log.cpp.o -MF src/Hyprland.p/debug_Log.cpp.o.d -o src/Hyprland.p/debug_Log.cpp.o -c ../hyprland-source/src/debug/Log.cpp |
I compiled all the dependencies with gcc, but I believe that clang should be compatible with that and I don't see how that could play any role here. In any case I do not feel like recompiling all dependencies with clang.
Does anybody here have an idea as to what the problem could be?
(Full build log here: https://pastebin.com/GXGCnVDS)
Last edited by oneone on Fri Sep 20, 2024 2:49 pm; edited 2 times in total |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31267 Location: here
|
Posted: Wed Sep 18, 2024 8:13 am Post subject: |
|
|
Upstream issue. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31267 Location: here
|
Posted: Wed Sep 18, 2024 8:13 am Post subject: |
|
|
Moved from Desktop Environments to Portage & Programming. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
oneone Tux's lil' helper
Joined: 20 Sep 2017 Posts: 103
|
Posted: Wed Sep 18, 2024 8:38 am Post subject: |
|
|
Great, thank you! I missed that. |
|
Back to top |
|
|
oneone Tux's lil' helper
Joined: 20 Sep 2017 Posts: 103
|
|
Back to top |
|
|
oneone Tux's lil' helper
Joined: 20 Sep 2017 Posts: 103
|
|
Back to top |
|
|
|