Skip to content

Instantly share code, notes, and snippets.

@katabame
Last active May 18, 2024 06:15
Show Gist options
  • Save katabame/e368988c968278c83c19bd5f5b60f407 to your computer and use it in GitHub Desktop.
Save katabame/e368988c968278c83c19bd5f5b60f407 to your computer and use it in GitHub Desktop.
Build Hyprland on Ubuntu 23.10

Maintaing gist file is kinda hard way, so I moved this project to katabame/Ubuntu-Hyprland repository.
future updates are only available at the repository.
and any issue or improvements are should be go to the repository's issue or pullrequest.

#!/bin/bash
set -ex
# For Ubuntu 22.04
UBUNTU_VERSION=`lsb_release -r | awk '{print $2}'`
OLD_UBUNTU_VERSION='22.04'
PIXMAN_VERSION='0.43.4'
XCBPROTO_VERSION='1.17.0'
LIBXCB_VERSION='1.17.0'
HYPRLAND_VERSION='0.38.1'
HYPRLANG_VERSION='0.5.0'
HYPRCURSOR_VERSION='0.1.7'
WAYLAND_VERSION='1.22.0'
WAYLAND_PROTOCOLS_VERSION='1.34'
LIBDISPLAY_INFO_VERSION='0.1.1'
TOMLPLUSPLUS_VERSION='3.4.0'
if [ "${UBUNTU_VERSION}" = "${OLD_UBUNTU_VERSION}" ]; then
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get install -y --no-install-recommends \
wget build-essential cmake-extras cmake \
gettext gettext-base fontconfig libfontconfig-dev libffi-dev libxml2-dev \
libxkbcommon-x11-dev libxkbregistry-dev libxkbcommon-dev libpixman-1-dev \
libudev-dev libseat-dev seatd libvulkan-dev libvulkan-volk-dev \
vulkan-validationlayers-dev libvkfft-dev libgulkan-dev libegl-dev libgles2 \
libegl1-mesa-dev glslang-tools libinput-bin libinput-dev \
libavutil-dev libavcodec-dev libavformat-dev \
libpango1.0-dev xdg-desktop-portal-wlr hwdata \
libcairo2-dev libzip-dev librsvg2-dev libgbm-dev jq \
gcc-13 g++-13 python3-pip autoconf automake xutils-dev libtool
sudo pip3 install meson ninja
export CC=/usr/bin/gcc-13
export CXX=/usr/bin/g++-13
else
sudo apt-get install -y --no-install-recommends \
meson wget build-essential ninja-build cmake-extras cmake \
gettext gettext-base fontconfig libfontconfig-dev libffi-dev libxml2-dev \
libxkbcommon-x11-dev libxkbregistry-dev libxkbcommon-dev libpixman-1-dev \
libudev-dev libseat-dev seatd libxcb-dri3-dev libvulkan-dev libvulkan-volk-dev \
vulkan-validationlayers-dev libvkfft-dev libgulkan-dev libegl-dev libgles2 \
libegl1-mesa-dev glslang-tools libinput-bin libinput-dev libxcb-composite0-dev \
libavutil-dev libavcodec-dev libavformat-dev libxcb-ewmh2 libxcb-ewmh-dev \
libxcb-present-dev libxcb-icccm4-dev libxcb-render-util0-dev libxcb-res0-dev \
libxcb-xinput-dev libpango1.0-dev xdg-desktop-portal-wlr hwdata \
libcairo2-dev libzip-dev librsvg2-dev libgbm-dev jq
fi
mkdir ~/HyprSource
cd ~/HyprSource
## Clone sources
# hyprland
wget -O hyprland.tar.gz "https://github.com/hyprwm/Hyprland/releases/download/v${HYPRLAND_VERSION}/source-v${HYPRLAND_VERSION}.tar.gz"
mkdir ~/HyprSource/hyprland &&
tar -xzf hyprland.tar.gz -C ~/HyprSource/hyprland --strip-components 1 &&
rm hyprland.tar.gz
# hyprlang
wget -O hyprlang.tar.gz "https://github.com/hyprwm/hyprlang/archive/refs/tags/v${HYPRLANG_VERSION}.tar.gz"
mkdir ~/HyprSource/hyprlang &&
tar -xzf hyprlang.tar.gz -C ~/HyprSource/hyprlang --strip-components 1 &&
rm hyprlang.tar.gz
# hyprcursor
wget -O hyprcursor.tar.gz "https://github.com/hyprwm/hyprcursor/archive/refs/tags/v${HYPRCURSOR_VERSION}.tar.gz"
mkdir ~/HyprSource/hyprcursor &&
tar -xzf hyprcursor.tar.gz -C ~/HyprSource/hyprcursor --strip-components 1 &&
rm hyprcursor.tar.gz
# wayland
wget -O wayland.tar.gz "https://gitlab.freedesktop.org/wayland/wayland/-/archive/${WAYLAND_VERSION}/wayland-${WAYLAND_VERSION}.tar.gz"
mkdir ~/HyprSource/wayland &&
tar -xzf wayland.tar.gz -C ~/HyprSource/wayland --strip-components 1 &&
rm wayland.tar.gz
# wayland-protocols
wget -O wayland-protocols.tar.gz "https://gitlab.freedesktop.org/wayland/wayland-protocols/-/archive/${WAYLAND_PROTOCOLS_VERSION}/wayland-protocols-${WAYLAND_PROTOCOLS_VERSION}.tar.gz"
mkdir ~/HyprSource/wayland-protocols &&
tar -xzf wayland-protocols.tar.gz -C ~/HyprSource/wayland-protocols --strip-components 1 &&
rm wayland-protocols.tar.gz
# libdisplay-info
wget -O libdisplay-info.tar.gz "https://gitlab.freedesktop.org/emersion/libdisplay-info/-/archive/${LIBDISPLAY_INFO_VERSION}/libdisplay-info-${LIBDISPLAY_INFO_VERSION}.tar.gz"
mkdir ~/HyprSource/libdisplay-info &&
tar -xzf libdisplay-info.tar.gz -C ~/HyprSource/libdisplay-info --strip-components 1 &&
rm libdisplay-info.tar.gz
# tomlplusplus
wget -O tomlplusplus.tar.gz "https://github.com/marzer/tomlplusplus/archive/refs/tags/v${TOMLPLUSPLUS_VERSION}.tar.gz"
mkdir ~/HyprSource/tomlplusplus &&
tar -xzf tomlplusplus.tar.gz -C ~/HyprSource/tomlplusplus --strip-components 1 &&
rm tomlplusplus.tar.gz
# libdrm
wget -O libdrm.tar.gz "https://gitlab.freedesktop.org/mesa/drm/-/archive/main/drm-main.tar.gz"
mkdir ~/HyprSource/libdrm &&
tar -xzf libdrm.tar.gz -C ~/HyprSource/libdrm --strip-components 1 &&
rm libdrm.tar.gz
if [ "${UBUNTU_VERSION}" = "${OLD_UBUNTU_VERSION}" ]; then
# pixman
wget -O pixman.tar.gz "https://cairographics.org/releases/pixman-${PIXMAN_VERSION}.tar.gz"
mkdir ~/HyprSource/pixman &&
tar -xzf pixman.tar.gz -C ~/HyprSource/pixman --strip-components 1 &&
rm pixman.tar.gz
# xcb-proto
wget -O xcb-proto.tar.gz "https://xcb.freedesktop.org/dist/xcb-proto-${XCBPROTO_VERSION}.tar.gz"
mkdir ~/HyprSource/xcb-proto &&
tar -xzf xcb-proto.tar.gz -C ~/HyprSource/xcb-proto --strip-components 1 &&
rm xcb-proto.tar.gz
# libxcb
wget -O libxcb.tar.gz "https://xcb.freedesktop.org/dist/libxcb-${LIBXCB_VERSION}.tar.gz"
mkdir ~/HyprSource/libxcb &&
tar -xzf libxcb.tar.gz -C ~/HyprSource/libxcb --strip-components 1 &&
rm libxcb.tar.gz
fi
## Build dependencies
# wayland
cd ~/HyprSource/wayland
mkdir ./build &&
cd ./build &&
meson setup .. \
--prefix=/usr \
--buildtype=release \
-Ddocumentation=false &&
ninja
sudo ninja install
# wayland-protocols
cd ~/HyprSource/wayland-protocols
mkdir ./build &&
cd ./build &&
meson setup --prefix=/usr --buildtype=release &&
ninja
sudo ninja install
# libdisplay-info
cd ~/HyprSource/libdisplay-info
mkdir ./build &&
cd ./build &&
meson setup --prefix=/usr --buildtype=release &&
ninja
sudo ninja install
# tomlplusplus
cd ~/HyprSource/tomlplusplus
mkdir ./build &&
cd ./build &&
meson setup --prefix=/usr --buildtype=release &&
ninja
sudo ninja install
# libdrm
cd ~/HyprSource/libdrm
mkdir ./build &&
cd ./build &&
meson setup --prefix=/usr --buildtype=release &&
ninja
sudo ninja install
# hyprlang
cd ~/HyprSource/hyprlang
cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build
cmake --build ./build --config Release --target hyprlang -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
sudo cmake --install ./build
# hyprcursor
cd ~/HyprSource/hyprcursor
cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build
cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
sudo cmake --install ./build
if [ "${UBUNTU_VERSION}" = "${OLD_UBUNTU_VERSION}" ]; then
# pixman
cd ~/HyprSource/pixman
mkdir ./build &&
cd ./build &&
meson setup --prefix=/usr --buildtype=release &&
ninja
sudo ninja install
# xcb-proto
cd ~/HyprSource/xcb-proto
./autogen.sh
./configure &&
make
sudo make install
# libxcb
cd ~/HyprSource/libxcb
./autogen.sh
./configure &&
make
sudo make install
fi
# hyprland
cd ~/HyprSource/hyprland
sed -i 's/\/usr\/local/\/usr/g' Makefile
mkdir ./build &&
cd ./build &&
meson setup --prefix=/usr --buildtype=release &&
ninja
sudo ninja install
## back to home directory
cd ~
echo "NOW YOU HAVE HYPRLAND INSTALLED!!!"
@zstoimchev
Copy link

zstoimchev commented Apr 12, 2024

I am having troubles installing. What should I do, how to proceed? I am using Ubuntu 23.10. This is the full log:

Build started at 2024-04-12T19:21:23.729243
Main binary: /usr/bin/python3
Build Options: -Dprefix=/usr -Dbuildtype=release
Python system: Linux
The Meson build system
Version: 1.2.1
Source dir: /root/HyprSource/Hyprland
Build dir: /root/HyprSource/Hyprland/build
Build type: native build
Running command: /usr/bin/jq -r .version /root/HyprSource/Hyprland/props.json
--- stdout ---
0.38.0

--- stderr ---


Project name: Hyprland
Project version: 0.38.0
-----------
Detecting compiler via: `cc --version` -> 0
stdout:
cc (Ubuntu 13.2.0-4ubuntu3) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------
Running command: cc -E -dM -
-----
-----------
Detecting linker via: `cc -Wl,--version` -> 0
stdout:
GNU ld (GNU Binutils for Ubuntu) 2.41
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
-----------
stderr:
collect2 version 13.2.0
/usr/bin/ld -plugin /usr/libexec/gcc/x86_64-linux-gnu/13/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-linux-gnu/13/lto-wrapper -plugin-opt=-fresolution=/tmp/cczEM176.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/13/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/13 -L/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/13/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/13/../../.. --version -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/x86_64-linux-gnu/13/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/crtn.o
-----------
Sanity testing C compiler: cc
Is cross compiler: False.
Sanity check compiler command line: cc sanitycheckc.c -o sanitycheckc.exe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command:  /root/HyprSource/Hyprland/build/meson-private/sanitycheckc.exe
C compiler for the host machine: cc (gcc 13.2.0 "cc (Ubuntu 13.2.0-4ubuntu3) 13.2.0")
C linker for the host machine: cc ld.bfd 2.41
-----------
Detecting linker via: `gcc-ar --version` -> 0
stdout:
GNU ar (GNU Binutils for Ubuntu) 2.41
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
-----------
-----------
Detecting compiler via: `c++ --version` -> 0
stdout:
c++ (Ubuntu 13.2.0-4ubuntu3) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------
Running command: c++ -E -dM -
-----
-----------
Detecting linker via: `c++ -Wl,--version` -> 0
stdout:
GNU ld (GNU Binutils for Ubuntu) 2.41
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
-----------
stderr:
collect2 version 13.2.0
/usr/bin/ld -plugin /usr/libexec/gcc/x86_64-linux-gnu/13/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-linux-gnu/13/lto-wrapper -plugin-opt=-fresolution=/tmp/ccoXgxiX.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/13/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/13 -L/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/13/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/13/../../.. --version -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/13/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/crtn.o
-----------
Sanity testing C++ compiler: c++
Is cross compiler: False.
Sanity check compiler command line: c++ sanitycheckcpp.cc -o sanitycheckcpp.exe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command:  /root/HyprSource/Hyprland/build/meson-private/sanitycheckcpp.exe
C++ compiler for the host machine: c++ (gcc 13.2.0 "c++ (Ubuntu 13.2.0-4ubuntu3) 13.2.0")
C++ linker for the host machine: c++ ld.bfd 2.41
-----------
Detecting compiler via: `cc --version` -> 0
stdout:
cc (Ubuntu 13.2.0-4ubuntu3) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------
Running command: cc -E -dM -
-----
-----------
Detecting linker via: `cc -Wl,--version` -> 0
stdout:
GNU ld (GNU Binutils for Ubuntu) 2.41
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
-----------
stderr:
collect2 version 13.2.0
/usr/bin/ld -plugin /usr/libexec/gcc/x86_64-linux-gnu/13/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-linux-gnu/13/lto-wrapper -plugin-opt=-fresolution=/tmp/ccP9fRDd.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/13/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/13 -L/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/13/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/13/../../.. --version -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/x86_64-linux-gnu/13/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/crtn.o
-----------
Sanity testing C compiler: cc
Is cross compiler: False.
Sanity check compiler command line: cc sanitycheckc.c -o sanitycheckc.exe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command:  /root/HyprSource/Hyprland/build/meson-private/sanitycheckc.exe
C compiler for the build machine: cc (gcc 13.2.0 "cc (Ubuntu 13.2.0-4ubuntu3) 13.2.0")
C linker for the build machine: cc ld.bfd 2.41
-----------
Detecting linker via: `gcc-ar --version` -> 0
stdout:
GNU ar (GNU Binutils for Ubuntu) 2.41
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
-----------
-----------
Detecting compiler via: `c++ --version` -> 0
stdout:
c++ (Ubuntu 13.2.0-4ubuntu3) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------
Running command: c++ -E -dM -
-----
-----------
Detecting linker via: `c++ -Wl,--version` -> 0
stdout:
GNU ld (GNU Binutils for Ubuntu) 2.41
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
-----------
stderr:
collect2 version 13.2.0
/usr/bin/ld -plugin /usr/libexec/gcc/x86_64-linux-gnu/13/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-linux-gnu/13/lto-wrapper -plugin-opt=-fresolution=/tmp/ccPJrysV.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/13/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/13 -L/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/13/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/13/../../.. --version -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/13/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/crtn.o
-----------
Sanity testing C++ compiler: c++
Is cross compiler: False.
Sanity check compiler command line: c++ sanitycheckcpp.cc -o sanitycheckcpp.exe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command:  /root/HyprSource/Hyprland/build/meson-private/sanitycheckcpp.exe
C++ compiler for the build machine: c++ (gcc 13.2.0 "c++ (Ubuntu 13.2.0-4ubuntu3) 13.2.0")
C++ linker for the build machine: c++ ld.bfd 2.41
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Running compile:
Working directory:  /root/HyprSource/Hyprland/build/meson-private/tmp8oumd1k5
Code:
 extern int i;
int i;

-----------
Command line: `c++ /root/HyprSource/Hyprland/build/meson-private/tmp8oumd1k5/testfile.cpp -o /root/HyprSource/Hyprland/build/meson-private/tmp8oumd1k5/output.obj -c -D_FILE_OFFSET_BITS=64 -O0 -fpermissive -std=c++23` -> 0
Compiler for C++ supports arguments -std=c++23: YES 
../meson.build:16: WARNING: Consider using the built-in option for language standard version instead of using "-std=c++23".
Running compile:
Working directory:  /root/HyprSource/Hyprland/build/meson-private/tmpfkn42zic
Code:
 
        #include <execinfo.h>
-----------
Command line: `c++ /root/HyprSource/Hyprland/build/meson-private/tmpfkn42zic/testfile.cpp -o /root/HyprSource/Hyprland/build/meson-private/tmpfkn42zic/output.obj -c -D_FILE_OFFSET_BITS=64 -O0 -fpermissive` -> 0
Check usable header "execinfo.h" : YES 

../meson.build:36:10: ERROR: Neither a subproject directory nor a wlroots.wrap file was found.

@katabame
Copy link
Author

@zstoimchev
I updated the gist for download (specified) latest version release files instead of clone git repositories.
on my Ubuntu 23.10 server (freshy installed on VM), the script successfully built working Hyprland.

hope this solve the issue, but if still doesn't work please let me know; I'll try figure out the reason and fix

@zstoimchev
Copy link

zstoimchev commented Apr 12, 2024

@katabame
I am really sorry, I do not know what I am supposed to do.

EDIT: I installed it following the instructions from https://gist.github.com/Vertecedoc4545/3b077301299c20c5b9b4db00f4ca6000

@katabame
Copy link
Author

katabame commented Apr 13, 2024

@zstoimchev
here's instructions to do

rm ./build-hyprland-ubuntu.sh
rm -rf ~/HyprSource

wget https://gist.github.com/katabame/e368988c968278c83c19bd5f5b60f407/raw/3ab72c6d28b245fcc726e85e3a53dc51e12e0018/build-hyprland-ubuntu.sh
chmod +x ./build-hyprland-ubuntu.sh
./build-hyprland-ubuntu.sh

@ashyAU
Copy link

ashyAU commented Apr 13, 2024

Getting this error with the source you provided

+ cmake --build ./build --config Release --target hyprlang -j16
[ 66%] Building CXX object CMakeFiles/hyprlang.dir/src/config.cpp.o
[ 66%] Building CXX object CMakeFiles/hyprlang.dir/src/common.cpp.o
/home/ash/HyprSource/hyprlang/src/config.cpp:5:10: fatal error: format: No such file or directory
    5 | #include <format>
      |          ^~~~~~~~
compilation terminated.
gmake[3]: *** [CMakeFiles/hyprlang.dir/build.make:90: CMakeFiles/hyprlang.dir/src/config.cpp.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[2]: *** [CMakeFiles/Makefile2:844: CMakeFiles/hyprlang.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:851: CMakeFiles/hyprlang.dir/rule] Error 2
gmake: *** [Makefile:544: hyprlang] Error 2

@ashyAU
Copy link

ashyAU commented Apr 13, 2024

@zstoimchev here's instructions to do

rm ./build-hyprland-ubuntu.sh
rm -rf ~/HyprSource

wget https://gist.github.com/katabame/e368988c968278c83c19bd5f5b60f407/raw/3ab72c6d28b245fcc726e85e3a53dc51e12e0018/build-hyprland-ubuntu.sh
chmod +x ./build-hyprland-ubuntu.sh
./build-hyprland-ubuntu.sh

Issue is with this script, sorry for forgetting to include it

@katabame
Copy link
Author

@notTyTy
seems gcc version problem.
could you provide result of following commands?

cat /etc/os-release
gcc --version

@ashyAU
Copy link

ashyAU commented Apr 13, 2024

@katabame

$ gcc --version
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

$ cat /etc/os-release 
PRETTY_NAME="KDE neon 6.0"
NAME="KDE neon"
VERSION_ID="22.04"
VERSION="6.0"
VERSION_CODENAME=jammy
ID=neon
ID_LIKE="ubuntu debian"
HOME_URL="https://neon.kde.org/"
SUPPORT_URL="https://neon.kde.org/"
BUG_REPORT_URL="https://bugs.kde.org/"
PRIVACY_POLICY_URL="https://kde.org/privacypolicy/"
UBUNTU_CODENAME=jammy
LOGO=start-here-kde-neon


@katabame
Copy link
Author

@notTyTy
thank you for providing information.
this script is targeted for Ubuntu 23.10 (mantic) not Ubuntu 22.04 (jammy).
due to Ubuntu version difference, the gcc provided by apt is old one.

but as far as I looked https://packages.ubuntu.com, there's gcc-12 provided for Ubuntu 22.04 (jammy)
I don't know this one will solve the gcc version problem, but I think it's worth a try.

try following commands, I applicate if let me know its worked or not.

sudo apt install gcc-12

rm ./build-hyprland-ubuntu.sh
rm -rf ~/HyprSource

wget https://gist.github.com/katabame/e368988c968278c83c19bd5f5b60f407/raw/3ab72c6d28b245fcc726e85e3a53dc51e12e0018/build-hyprland-ubuntu.sh
chmod +x ./build-hyprland-ubuntu.sh
./build-hyprland-ubuntu.sh

@ashyAU
Copy link

ashyAU commented Apr 13, 2024

Didn't work.

Going to install gcc-13 via PPA and see if I have any luck. Appreciate the quick responses, will keep you updated

@ashyAU
Copy link

ashyAU commented Apr 13, 2024

Same issues with gcc-13, unsure what the heck is going on

@katabame
Copy link
Author

maybe we should specify gcc version by like this
https://stackoverflow.com/questions/17275348/how-to-specify-new-gcc-path-for-cmake

I gonna try reproduce the issue on Ubuntu 22.04 VM when I've time

@zstoimchev
Copy link

zstoimchev commented Apr 13, 2024 via email

@stevenhsimon
Copy link

stevenhsimon commented Apr 18, 2024

I tried to install this on 22.04. I got quite a way in but eventually failed anyway. Here are some things I needed to do. install gcc-13 and gcc-+13 and put into the build.sh script

export CC=/usr/bin/gcc-13
export CXX=/usr/bin/g++-13

up at the top so the compiler uses gcc-13. Then it needed a more modern version of pixman. You can get that from here

https://launchpad.net/ubuntu/+source/pixman/0.42.2-1build1

You have to build and install from source. Then I needed to use a more modern meson and ninja. To do this apt remove them and reinstall them with pip3 install. Also near the top of the build.sh file you need to remove the line that reinstalls meson and ninja otherwise it will automatically reintroduce them with apt and not use the pip3 version.

Doing all of this it gets pretty far into the compilation before eventually failing and I've not figured out what to do next!

@katabame
Copy link
Author

@stevenhsimon thanks for your report. I updated the gist to follow instructions that you reported.
I also did the instructions on my Ubuntu 22.04 VM (using desktop iso for terminal emulator purpose)

image

this error seems related to this issue hyprwm/Hyprland#2932

according to comments in the issue, seems this can be solved by building libxcb ourself.
as you can see in the updated gist, I tried it but still having same error there.

I ended up the research for now, but someone else can be found the solution to solve this I hope...

@katabame
Copy link
Author

katabame commented May 5, 2024

There's Ubuntu noble available. also Hyprland is updated to v0.40.0 from v0.39.x
these means both of Ubuntu and Hyprland got major update.
I'm currently focusing build and run Hyprland v0.40.0 on Ubuntu noble. and since Ubuntu noble is LTS version I discontinue investigating for Ubuntu jammy.

@katabame
Copy link
Author

Maintaing gist file is kinda hard way, so I moved this project to katabame/Ubuntu-Hyprland repository.
future updates are only available at the repository.
and any issue or improvements are should be go to the repository's issue or pullrequest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment