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

Buildling with system wlroots #1709

Closed
1 task done
WhyNotHugo opened this issue Mar 5, 2023 · 17 comments
Closed
1 task done

Buildling with system wlroots #1709

WhyNotHugo opened this issue Mar 5, 2023 · 17 comments
Labels
bug Something isn't working

Comments

@WhyNotHugo
Copy link

I'm trying to build Hyprland on Alpine. More specifically, I'm trying to package Hyprland on Alpine. wlroots is already a separate package.

I'm trying to build using make release, but this fails since it expects a wlroot with a patched version (as done by make fixwlr):

-- Configuring Hyprland in Release with CMake
-- Checking deps...
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.9.4") 
-- Checking for modules 'wayland-server;wayland-client;wayland-cursor;wayland-protocols;cairo;libdrm;egl;xkbcommon;libinput'
--   Found wayland-server, version 1.21.0
--   Found wayland-client, version 1.21.0
--   Found wayland-cursor, version 1.21.0
--   Found wayland-protocols, version 1.31
--   Found cairo, version 1.17.8
--   Found libdrm, version 2.4.115
--   Found egl, version 22.3.6
--   Found xkbcommon, version 1.5.0
--   Found libinput, version 1.22.1
-- Looking for backtrace in execinfo
-- Looking for backtrace in execinfo - not found
-- XWAYLAND Enabled (NO_XWAYLAND not defined) checking deps...
-- Checking for module 'xcb'
--   Found xcb, version 1.15
-- SYSTEMD support is requested (NO_SYSTEMD not defined) checking deps...
-- Checking for module 'libsystemd'
--   Found libsystemd, version 246
-- Looking for systemd/sd-daemon.h
-- Looking for systemd/sd-daemon.h - found
-- Setting link libraries
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hugo/clones/gitlab.alpinelinux.org/alpine/aports/testing/hyprland/src/Hyprland-0.22.0beta/build
cmake --build ./build --config Release --target all -j24
ninja: file is missing and not created by any action: '/home/hugo/clones/gitlab.alpinelinux.org/alpine/aports/testing/hyprland/src/Hyprland-0.22.0beta/subprojects/wlroots/build/libwlroots.so.12032'
make: *** [Makefile:144: release] Error 1

From what I can tell, the code in wlroots is used clean from upstream, but it's just that the version that's different (is my understanding so far correct?).

How can I build using the regular wlroots? What's the advise for packagers in this case. I'm not 100% sure what the right entry point is: I see make which uses cmake, but also meson.

I tried using meson, but that didn't work, and I'm not entirely sure why not:

The Meson build system
Version: 1.0.1
Source dir: /home/hugo/clones/gitlab.alpinelinux.org/alpine/aports/testing/hyprland/src/Hyprland-0.22.0beta
Build dir: /home/hugo/clones/gitlab.alpinelinux.org/alpine/aports/testing/hyprland/src/Hyprland-0.22.0beta/output
Build type: native build
Project name: Hyprland
Project version: 0.22.0
C compiler for the host machine: gcc (gcc 12.2.1 "gcc (Alpine 12.2.1_git20220924-r9) 12.2.1 20220924")
C linker for the host machine: gcc ld.bfd 2.40
C++ compiler for the host machine: g++ (gcc 12.2.1 "g++ (Alpine 12.2.1_git20220924-r9) 12.2.1 20220924")
C++ linker for the host machine: g++ ld.bfd 2.40
Host machine cpu family: x86_64
Host machine cpu: x86_64
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".

meson.build:42:0: ERROR: Subproject exists but has no meson.build file

A full log can be found at /home/hugo/clones/gitlab.alpinelinux.org/alpine/aports/testing/hyprland/src/Hyprland-0.22.0beta/output/meson-logs/meson-log.txt

meson-log.txt says:

[...]
-----
Running test binary command:  /home/hugo/clones/gitlab.alpinelinux.org/alpine/aports/testing/hyprland/src/Hyprland-0.22.0beta/output/meson-private/sanitycheckcpp.exe
C++ compiler for the build machine: g++ (gcc 12.2.1 "g++ (Alpine 12.2.1_git20220924-r9) 12.2.1 20220924")
C++ linker for the build machine: g++ ld.bfd 2.40
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:  /home/hugo/clones/gitlab.alpinelinux.org/alpine/aports/testing/hyprland/src/Hyprland-0.22.0beta/output/meson-private/tmp1kkxqf5e
Command line:  g++ /home/hugo/clones/gitlab.alpinelinux.org/alpine/aports/testing/hyprland/src/Hyprland-0.22.0beta/output/meson-private/tmp1kkxqf5e/testfile.cpp -o /home/hugo/clones/gitlab.alpinelinux.org/alpine/aports/testing/hyprland/src/Hyprland-0.22.0beta/output/meson-private/tmp1kkxqf5e/output.obj -c -Os -fomit-frame-pointer -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -O0 -fpermissive -std=c++23 

Code:
 extern int i;
int i;

Compiler stdout:
 
Compiler stderr:
 
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 command: /usr/bin/git rev-parse --abbrev-ref HEAD
--- stdout ---

--- stderr ---
fatal: not a git repository (or any of the parent directories): .git


Running command: /usr/bin/git rev-parse HEAD
--- stdout ---

--- stderr ---
fatal: not a git repository (or any of the parent directories): .git


Running command: /bin/sh -c 'git show | head -n 5 | tail -n 1'
--- stdout ---

--- stderr ---
fatal: not a git repository (or any of the parent directories): .git


Running command: /bin/sh -c 'git diff-index --quiet HEAD -- || echo "dirty"'
--- stdout ---
dirty

--- stderr ---
fatal: not a git repository (or any of the parent directories): .git



meson.build:42:0: ERROR: Subproject exists but has no meson.build file
@WhyNotHugo WhyNotHugo added the bug Something isn't working label Mar 5, 2023
@WhyNotHugo
Copy link
Author

Oh, I think that the issue when using meson is that I'm missing hyprland-protocols, which I guess I should package first separately.

Does that mean I shouldn't be using make release?

@vaxerski
Copy link
Member

vaxerski commented Mar 5, 2023

You're not supposed to be using system wlroots. Hyprland's subproject is not taken directly from upstream, it's a few commits behind. If you do take it from the git head directly, half of the time it's going to fail to build.

@vaxerski
Copy link
Member

vaxerski commented Mar 5, 2023

#302

@vaxerski vaxerski closed this as completed Mar 5, 2023
@vaxerski
Copy link
Member

vaxerski commented Mar 5, 2023

The advice for packagers is to either use the patched .so alongside Hyprland (which does not conflict with other wlroots installs) or link statically when building with meson.

@WhyNotHugo
Copy link
Author

WhyNotHugo commented Mar 5, 2023

You're not supposed to be using system wlroots. Hyprland's subproject is not taken directly from upstream, it's a few commits behind. If you do take it from the git head directly, half of the time it's going to fail to build.

I'm building 0.22.0beta. I'm using wlroots's latest stable. Does that version work?

Never mind, you're replied in the interim.

@vaxerski
Copy link
Member

vaxerski commented Mar 5, 2023

hyprland-protocols should probably not be a separate package, it's just a few .xml files. It'd be probably a better idea to just clone recursively, as you should, and it should be alright.

@WhyNotHugo
Copy link
Author

hyprland-protocols should probably not be a separate package

Isn't it in a separate repository because other projects may require it at build time?

@vaxerski
Copy link
Member

vaxerski commented Mar 5, 2023

nothing apart from hyprland and xdg-desktop-portal-hyprland will require it.

@WhyNotHugo
Copy link
Author

WhyNotHugo commented Mar 5, 2023

I'm seeing this error:

sed -i -E 's/(soversion = 12)([^032]|$)/soversion = 12032/g' subprojects/wlroots/meson.build
rm -rf ./subprojects/wlroots/build
The Meson build system
Version: 1.0.1
Source dir: /home/hugo/clones/gitlab.alpinelinux.org/alpine/aports/testing/hyprland/src/hyprland-source
Build dir: /home/hugo/clones/gitlab.alpinelinux.org/alpine/aports/testing/hyprland/src/hyprland-source/output
Build type: native build
Project name: Hyprland
Project version: 0.22.0
C compiler for the host machine: gcc (gcc 12.2.1 "gcc (Alpine 12.2.1_git20220924-r9) 12.2.1 20220924")
C linker for the host machine: gcc ld.bfd 2.40
C++ compiler for the host machine: g++ (gcc 12.2.1 "g++ (Alpine 12.2.1_git20220924-r9) 12.2.1 20220924")
C++ linker for the host machine: g++ ld.bfd 2.40
Host machine cpu family: x86_64
Host machine cpu: x86_64
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".

Executing subproject wlroots 

wlroots| Project name: wlroots
wlroots| Project version: 0.17.0-dev
wlroots| C compiler for the host machine: gcc (gcc 12.2.1 "gcc (Alpine 12.2.1_git20220924-r9) 12.2.1 20220924")
wlroots| C linker for the host machine: gcc ld.bfd 2.40
wlroots| Compiler for C supports arguments -Wundef: YES
wlroots| Compiler for C supports arguments -Wlogical-op: YES
wlroots| Compiler for C supports arguments -Wmissing-include-dirs: YES
wlroots| Compiler for C supports arguments -Wold-style-definition: YES
wlroots| Compiler for C supports arguments -Wpointer-arith: YES
wlroots| Compiler for C supports arguments -Winit-self: YES
wlroots| Compiler for C supports arguments -Wstrict-prototypes: YES
wlroots| Compiler for C supports arguments -Wimplicit-fallthrough=2: YES
wlroots| Compiler for C supports arguments -Wendif-labels: YES
wlroots| Compiler for C supports arguments -Wstrict-aliasing=2: YES
wlroots| Compiler for C supports arguments -Woverflow: YES
wlroots| Compiler for C supports arguments -Wmissing-prototypes: YES
wlroots| Compiler for C supports arguments -Walloca: YES
wlroots| Compiler for C supports arguments -Wno-missing-braces: YES
wlroots| Compiler for C supports arguments -Wno-missing-field-initializers: YES
wlroots| Compiler for C supports arguments -Wno-unused-parameter: YES
wlroots| Compiler for C supports arguments -fmacro-prefix-map=/prefix/to/hide=: YES
wlroots| Found pkg-config: /usr/bin/pkg-config (1.9.4)
wlroots| Run-time dependency wayland-server found: YES 1.21.0
wlroots| Run-time dependency libdrm found: YES 2.4.115
wlroots| Run-time dependency xkbcommon found: YES 1.5.0
wlroots| Run-time dependency pixman-1 found: YES 0.42.2
wlroots| Library m found: YES
wlroots| Library rt found: YES
wlroots| Run-time dependency wayland-protocols found: YES 1.31
wlroots| Found pkg-config: /usr/bin/pkg-config (1.9.4)
wlroots| Build-time dependency wayland-scanner found: YES 1.21.0
wlroots| Program /usr/bin/wayland-scanner found: YES (/usr/bin/wayland-scanner)
wlroots| Has header "linux/dma-buf.h" : YES
wlroots| Run-time dependency egl found: YES 22.3.6
wlroots| Run-time dependency gbm found: YES 22.3.6
wlroots| Run-time dependency glesv2 found: YES 22.3.6
wlroots| Program ./embed.sh found: YES (/home/hugo/clones/gitlab.alpinelinux.org/alpine/aports/testing/hyprland/src/hyprland-source/subprojects/wlroots/render/gles2/shaders/./embed.sh)
wlroots| Run-time dependency vulkan found: YES 1.3.239
wlroots| Check usable header "vulkan/vulkan.h" with dependency vulkan: YES
wlroots| Program glslangValidator found: YES (/usr/bin/glslangValidator)
wlroots| Dependency pixman-1 found: YES 0.42.2 (cached)
wlroots| Dependency gbm found: YES 22.3.6 (cached)
wlroots| Checking for function "gbm_bo_get_fd_for_plane" with dependency gbm: YES
wlroots| Run-time dependency libudev found: YES 243
wlroots| Run-time dependency libseat found: YES 0.7.0
wlroots| Found CMake: /usr/bin/cmake (3.25.2)
wlroots| Build-time dependency hwdata found: NO (tried pkgconfig and cmake)
wlroots| Message: Required for the DRM backend.
wlroots| Run-time dependency libinput found: YES 1.22.1
wlroots| Run-time dependency xcb found: YES 1.15
wlroots| Run-time dependency xcb-dri3 found: YES 1.15
wlroots| Run-time dependency xcb-present found: YES 1.15
wlroots| Run-time dependency xcb-render found: YES 1.15
wlroots| Run-time dependency xcb-renderutil found: YES 0.3.10
wlroots| Run-time dependency xcb-shm found: YES 1.15
wlroots| Run-time dependency xcb-xfixes found: YES 1.15
wlroots| Run-time dependency xcb-xinput found: YES 1.15
wlroots| Run-time dependency wayland-client found: YES 1.21.0
wlroots| Found CMake: /usr/bin/cmake (3.25.2)
wlroots| Run-time dependency xwayland found: NO (tried pkgconfig and cmake)
wlroots| Configuring config.h using configuration
wlroots| Configuring version.h using configuration
wlroots| Configuring config.h using configuration
wlroots| Build targets in project: 126
wlroots| Subproject wlroots finished.

Dependency xcb found: YES 1.15 (cached)
Library execinfo found: NO
Run-time dependency libsystemd found: YES 246
Dependency wayland-protocols found: YES 1.31 (cached)
Run-time dependency hyprland-protocols found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency hyprland-protocols

Executing subproject hyprland-protocols 

hyprland-protocols| Project name: hyprland-protocols
hyprland-protocols| Project version: 0.1
hyprland-protocols| Configuring hyprland-protocols.pc using configuration
hyprland-protocols| Build targets in project: 126
hyprland-protocols| Subproject hyprland-protocols finished.

Dependency hyprland-protocols found: YES 0.1 (overridden)
Dependency wayland-scanner found: YES 1.21.0 (cached)
Program /usr/bin/wayland-scanner found: YES (/usr/bin/wayland-scanner)
Dependency wayland-server found: YES 1.21.0 (cached)
Dependency wayland-server found: YES 1.21.0 (cached)
Dependency wayland-client found: YES 1.21.0 (cached)
Run-time dependency cairo found: YES 1.17.8
Dependency libdrm found: YES 2.4.115 (cached)
Dependency egl found: YES 22.3.6 (cached)
Dependency xkbcommon found: YES 1.5.0 (cached)
Dependency libinput found: YES 1.22.1 (cached)
Dependency pixman-1 found: YES 0.42.2 (cached)
Run-time dependency gl found: YES 22.3.6
Run-time dependency threads found: YES
Build targets in project: 151

wlroots 0.17.0-dev

    drm-backend     : NO
    x11-backend     : YES
    libinput-backend: YES
    xwayland        : NO
    gles2-renderer  : YES
    vulkan-renderer : YES
    gbm-allocator   : YES
    session         : YES
    xcb-errors      : NO
    egl             : YES

Hyprland 0.22.0

  Subprojects
    hyprland-protocols: YES
    wlroots           : YES

  User defined options
    auto_features     : auto
    bindir            : /usr/bin
    buildtype         : plain
    datadir           : /usr/share
    includedir        : /usr/include
    infodir           : /usr/share/info
    libdir            : /usr/lib
    libexecdir        : /usr/libexec
    localedir         : /usr/share/locale
    localstatedir     : /var
    mandir            : /usr/share/man
    prefix            : /usr
    sbindir           : /usr/sbin
    sharedstatedir    : /var/lib
    sysconfdir        : /etc
    wrap_mode         : nodownload
    b_lto             : false
    b_pie             : true
    b_staticpic       : true

Found ninja-1.9 at /usr/bin/ninja
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja -C /home/hugo/clones/gitlab.alpinelinux.org/alpine/aports/testing/hyprland/src/hyprland-source/output -j 24
ninja: entering directory '/home/hugo/clones/gitlab.alpinelinux.org/alpine/aports/testing/hyprland/src/hyprland-source/output'
[1/373] Compiling C++ object hyprctl/hyprctl.p/main.cpp.o
[2/373] Generating protocols/_home_hugo_clones_gitlab_alpinelinux_org_alpine_aports_testing_hyprland_src_hyprland_source_subprojects_hyprland_protocols_protocols_hyprland_toplevel_export_v1_xml_server_c with a custom command
[3/373] Generating protocols/idle_xml_server_c with a custom command
[4/373] Generating protocols/tablet_unstable_v2_xml_server_c with a custom command
[5/373] Generating protocols/pointer_constraints_unstable_v1_xml_server_c with a custom command
[6/373] Generating protocols/ext_workspace_unstable_v1_xml_server_c with a custom command
[7/373] Generating protocols/wlr_output_power_management_unstable_v1_xml_server_c with a custom command
[8/373] Generating protocols/wlr_layer_shell_unstable_v1_xml_server_c with a custom command
[9/373] Generating protocols/wlr_foreign_toplevel_management_unstable_v1_xml_server_c with a custom command
[10/373] Generating protocols/__usr_share_wayland_protocols_staging_fractional_scale_fractional_scale_v1_xml_server_c with a custom command
[11/373] Generating protocols/__usr_share_wayland_protocols_unstable_linux_dmabuf_linux_dmabuf_unstable_v1_xml_server_c with a custom command
[12/373] Generating protocols/__usr_share_wayland_protocols_stable_xdg_shell_xdg_shell_xml_server_h with a custom command
[13/373] Generating protocols/wlr_output_power_management_unstable_v1_xml_server_h with a custom command
[14/373] Generating protocols/wlr_layer_shell_unstable_v1_xml_server_h with a custom command
[15/373] Generating protocols/wlr_foreign_toplevel_management_unstable_v1_xml_server_h with a custom command
[16/373] Generating protocols/tablet_unstable_v2_xml_server_h with a custom command
[17/373] Generating protocols/pointer_constraints_unstable_v1_xml_server_h with a custom command
[18/373] Generating protocols/__usr_share_wayland_protocols_unstable_linux_dmabuf_linux_dmabuf_unstable_v1_xml_server_h with a custom command
[19/373] Generating protocols/idle_xml_server_h with a custom command
[20/373] Generating protocols/_home_hugo_clones_gitlab_alpinelinux_org_alpine_aports_testing_hyprland_src_hyprland_source_subprojects_hyprland_protocols_protocols_hyprland_toplevel_export_v1_xml_server_h with a custom command
[21/373] Generating protocols/__usr_share_wayland_protocols_staging_fractional_scale_fractional_scale_v1_xml_server_h with a custom command
[22/373] Generating protocols/ext_workspace_unstable_v1_xml_server_h with a custom command
[23/373] Generating protocols/__usr_share_wayland_protocols_stable_xdg_shell_xdg_shell_xml_server_c with a custom command
[24/373] Generating subprojects/wlroots/protocol/wlr_virtual_pointer_unstable_v1_c with a custom command
[25/373] Generating subprojects/wlroots/protocol/wlr_screencopy_unstable_v1_c with a custom command
[26/373] Generating subprojects/wlroots/protocol/wlr_output_power_management_unstable_v1_c with a custom command
[27/373] Generating subprojects/wlroots/protocol/wlr_output_management_unstable_v1_c with a custom command
[28/373] Generating subprojects/wlroots/protocol/wlr_layer_shell_unstable_v1_c with a custom command
[29/373] Generating subprojects/wlroots/protocol/wlr_input_inhibitor_unstable_v1_c with a custom command
[30/373] Generating subprojects/wlroots/protocol/wlr_gamma_control_unstable_v1_c with a custom command
[31/373] Generating subprojects/wlroots/protocol/wlr_foreign_toplevel_management_unstable_v1_c with a custom command
[32/373] Generating subprojects/wlroots/protocol/wlr_export_dmabuf_unstable_v1_c with a custom command
[33/373] Generating subprojects/wlroots/protocol/wlr_data_control_unstable_v1_c with a custom command
[34/373] Generating subprojects/wlroots/protocol/virtual_keyboard_unstable_v1_c with a custom command
[35/373] Generating subprojects/wlroots/protocol/kde_server_decoration_c with a custom command
[36/373] Generating subprojects/wlroots/protocol/kde_idle_c with a custom command
[37/373] Generating subprojects/wlroots/protocol/input_method_unstable_v2_c with a custom command
[38/373] Generating subprojects/wlroots/protocol/drm_c with a custom command
[39/373] Generating subprojects/wlroots/protocol/xdg_output_unstable_v1_c with a custom command
[40/373] Generating subprojects/wlroots/protocol/xdg_foreign_unstable_v2_c with a custom command
[41/373] Generating subprojects/wlroots/protocol/xdg_foreign_unstable_v1_c with a custom command
[42/373] Generating subprojects/wlroots/protocol/xdg_decoration_unstable_v1_c with a custom command
[43/373] Generating subprojects/wlroots/protocol/text_input_unstable_v3_c with a custom command
[44/373] Generating subprojects/wlroots/protocol/tablet_unstable_v2_c with a custom command
[45/373] Generating subprojects/wlroots/protocol/relative_pointer_unstable_v1_c with a custom command
[46/373] Generating subprojects/wlroots/protocol/primary_selection_unstable_v1_c with a custom command
[47/373] Generating subprojects/wlroots/protocol/pointer_gestures_unstable_v1_c with a custom command
[48/373] Generating subprojects/wlroots/protocol/pointer_constraints_unstable_v1_c with a custom command
[49/373] Generating subprojects/wlroots/protocol/linux_dmabuf_unstable_v1_c with a custom command
[50/373] Generating subprojects/wlroots/protocol/keyboard_shortcuts_inhibit_unstable_v1_c with a custom command
[51/373] Generating subprojects/wlroots/protocol/idle_inhibit_unstable_v1_c with a custom command
[52/373] Generating subprojects/wlroots/protocol/fullscreen_shell_unstable_v1_c with a custom command
[53/373] Generating subprojects/wlroots/protocol/xwayland_shell_v1_c with a custom command
[54/373] Generating subprojects/wlroots/protocol/xdg_activation_v1_c with a custom command
[55/373] Generating subprojects/wlroots/protocol/single_pixel_buffer_v1_c with a custom command
[56/373] Generating subprojects/wlroots/protocol/ext_session_lock_v1_c with a custom command
[57/373] Generating subprojects/wlroots/protocol/ext_idle_notify_v1_c with a custom command
[58/373] Generating subprojects/wlroots/protocol/drm_lease_v1_c with a custom command
[59/373] Generating subprojects/wlroots/protocol/content_type_v1_c with a custom command
[60/373] Generating subprojects/wlroots/protocol/xdg_shell_c with a custom command
[61/373] Generating subprojects/wlroots/protocol/viewporter_c with a custom command
[62/373] Generating subprojects/wlroots/render/vulkan/shaders/texture.frag_spv with a custom command
[63/373] Generating subprojects/wlroots/render/vulkan/shaders/quad.frag_spv with a custom command
[64/373] Generating subprojects/wlroots/render/vulkan/shaders/common.vert_spv with a custom command
[65/373] Generating subprojects/wlroots/render/gles2/shaders/tex_rgbx_frag_src.h with a custom command (wrapped by meson to capture output, to feed input)
[66/373] Generating subprojects/wlroots/render/gles2/shaders/tex_rgba_frag_src.h with a custom command (wrapped by meson to capture output, to feed input)
[67/373] Generating subprojects/wlroots/render/gles2/shaders/tex_external_frag_src.h with a custom command (wrapped by meson to capture output, to feed input)
[68/373] Generating subprojects/wlroots/render/gles2/shaders/quad_frag_src.h with a custom command (wrapped by meson to capture output, to feed input)
[69/373] Generating subprojects/wlroots/render/gles2/shaders/common_vert_src.h with a custom command (wrapped by meson to capture output, to feed input)
[70/373] Generating subprojects/wlroots/protocol/xwayland_shell_v1_server_h with a custom command
[71/373] Generating subprojects/wlroots/protocol/xdg_shell_server_h with a custom command
[72/373] Generating subprojects/wlroots/protocol/xdg_shell_client_h with a custom command
[73/373] Generating subprojects/wlroots/protocol/xdg_output_unstable_v1_server_h with a custom command
[74/373] Generating subprojects/wlroots/protocol/xdg_foreign_unstable_v2_server_h with a custom command
[75/373] Generating subprojects/wlroots/protocol/xdg_foreign_unstable_v1_server_h with a custom command
[76/373] Generating subprojects/wlroots/protocol/xdg_decoration_unstable_v1_server_h with a custom command
[77/373] Generating subprojects/wlroots/protocol/xdg_decoration_unstable_v1_client_h with a custom command
[78/373] Generating subprojects/wlroots/protocol/xdg_activation_v1_server_h with a custom command
[79/373] Generating subprojects/wlroots/protocol/xdg_activation_v1_client_h with a custom command
[80/373] Generating subprojects/wlroots/protocol/wlr_virtual_pointer_unstable_v1_server_h with a custom command
[81/373] Generating subprojects/wlroots/protocol/wlr_screencopy_unstable_v1_server_h with a custom command
[82/373] Generating subprojects/wlroots/protocol/wlr_output_power_management_unstable_v1_server_h with a custom command
[83/373] Generating subprojects/wlroots/protocol/wlr_output_management_unstable_v1_server_h with a custom command
[84/373] Compiling C++ object src/Hyprland.p/events_Misc.cpp.o
[85/373] Compiling C++ object src/Hyprland.p/events_Popups.cpp.o
[86/373] Compiling C++ object src/Hyprland.p/events_Monitors.cpp.o
[87/373] Compiling C++ object src/Hyprland.p/events_Devices.cpp.o
[88/373] Compiling C++ object src/Hyprland.p/events_Windows.cpp.o
[89/373] Compiling C++ object src/Hyprland.p/events_Layers.cpp.o
[90/373] Compiling C++ object src/Hyprland.p/init_initHelpers.cpp.o
[91/373] Compiling C++ object src/Hyprland.p/protocols_FractionalScale.cpp.o
[92/373] Compiling C++ object src/Hyprland.p/protocols_ToplevelExport.cpp.o
[93/373] Compiling C++ object src/Hyprland.p/Window.cpp.o
[94/373] Compiling C++ object src/Hyprland.p/managers_ProtocolManager.cpp.o
[95/373] Compiling C++ object src/Hyprland.p/managers_HookSystemManager.cpp.o
[96/373] Compiling C++ object src/Hyprland.p/managers_EventManager.cpp.o
[97/373] Compiling C++ object src/Hyprland.p/managers_AnimationManager.cpp.o
[98/373] Compiling C++ object src/Hyprland.p/managers_XWaylandManager.cpp.o
[99/373] Compiling C++ object src/Hyprland.p/managers_LayoutManager.cpp.o
[100/373] Compiling C++ object src/Hyprland.p/managers_SessionLockManager.cpp.o
[101/373] Compiling C++ object src/Hyprland.p/managers_KeybindManager.cpp.o
[102/373] Compiling C++ object src/Hyprland.p/managers_input_Touch.cpp.o
[103/373] Compiling C++ object src/Hyprland.p/managers_input_IdleInhibitor.cpp.o
[104/373] Compiling C++ object src/Hyprland.p/managers_input_InputMethodRelay.cpp.o
[105/373] Compiling C++ object src/Hyprland.p/managers_input_Tablets.cpp.o
[106/373] Compiling C++ object src/Hyprland.p/managers_input_InputManager.cpp.o
[107/373] Compiling C++ object src/Hyprland.p/managers_input_Swipe.cpp.o
../hyprctl/main.cpp: In function 'int main(int, char**)':
../hyprctl/main.cpp:282:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::deque<std::__cxx11::basic_string<char> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  282 |     for (auto i = 0; i < ARGS.size(); ++i) {
      |                      ~~^~~~~~~~~~~~~
../hyprctl/main.cpp:270:10: warning: unused variable 'bflag' [-Wunused-variable]
  270 |     int  bflag = 0, sflag = 0, index, c;
      |          ^~~~~
../hyprctl/main.cpp:270:21: warning: unused variable 'sflag' [-Wunused-variable]
  270 |     int  bflag = 0, sflag = 0, index, c;
      |                     ^~~~~
../hyprctl/main.cpp:270:32: warning: unused variable 'index' [-Wunused-variable]
  270 |     int  bflag = 0, sflag = 0, index, c;
      |                                ^~~~~
../hyprctl/main.cpp:270:39: warning: unused variable 'c' [-Wunused-variable]
  270 |     int  bflag = 0, sflag = 0, index, c;
      |                                       ^
[108/373] Linking target hyprctl/hyprctl
[109/373] Compiling C++ object src/Hyprland.p/managers_ThreadManager.cpp.o
[110/373] Compiling C++ object src/Hyprland.p/render_Shader.cpp.o
[111/373] Compiling C++ object src/Hyprland.p/render_OpenGL.cpp.o
[112/373] Compiling C++ object src/Hyprland.p/render_Framebuffer.cpp.o
[113/373] Compiling C++ object src/Hyprland.p/render_decorations_CHyprGroupBarDecoration.cpp.o
[114/373] Compiling C++ object src/Hyprland.p/render_decorations_IHyprWindowDecoration.cpp.o
[115/373] Compiling C++ object src/Hyprland.p/render_decorations_CHyprDropShadowDecoration.cpp.o
[116/373] Compiling C++ object src/Hyprland.p/render_Renderer.cpp.o
[117/373] Compiling C++ object src/Hyprland.p/render_Texture.cpp.o
[118/373] Compiling C++ object src/Hyprland.p/Compositor.cpp.o
[119/373] Compiling C++ object src/Hyprland.p/helpers_Monitor.cpp.o
[120/373] Compiling C++ object src/Hyprland.p/helpers_AnimatedVariable.cpp.o
[121/373] Compiling C++ object src/Hyprland.p/helpers_Timer.cpp.o
[122/373] Compiling C++ object src/Hyprland.p/helpers_Workspace.cpp.o
[123/373] Compiling C++ object src/Hyprland.p/helpers_Vector2D.cpp.o
[124/373] Compiling C++ object src/Hyprland.p/helpers_WLClasses.cpp.o
[125/373] Compiling C++ object src/Hyprland.p/helpers_Color.cpp.o
[126/373] Compiling C++ object src/Hyprland.p/helpers_BezierCurve.cpp.o
[127/373] Compiling C++ object src/Hyprland.p/helpers_MiscFunctions.cpp.o
[128/373] Compiling C++ object src/Hyprland.p/helpers_SubsurfaceTree.cpp.o
[129/373] Compiling C++ object src/Hyprland.p/helpers_WLListener.cpp.o
[130/373] Compiling C++ object src/Hyprland.p/main.cpp.o
[131/373] Compiling C++ object src/Hyprland.p/layout_DwindleLayout.cpp.o
[132/373] Compiling C++ object src/Hyprland.p/layout_IHyprLayout.cpp.o
[133/373] Compiling C++ object src/Hyprland.p/layout_MasterLayout.cpp.o
[134/373] Compiling C++ object src/Hyprland.p/wlrunstable_wlr_ext_workspace_v1.cpp.o
[135/373] Compiling C++ object src/Hyprland.p/debug_HyprDebugOverlay.cpp.o
[136/373] Compiling C++ object src/Hyprland.p/debug_Log.cpp.o
[137/373] Compiling C++ object src/Hyprland.p/debug_HyprCtl.cpp.o
[138/373] Compiling C++ object src/Hyprland.p/debug_CrashReporter.cpp.o
ninja: job failed: g++ -Isrc/Hyprland.p -Isrc -I../src -Isubprojects/wlroots/include -I../subprojects/wlroots/include -Iprotocols -I/usr/include/libdrm -I/usr/include/pixman-1 -I/usr/include/elogind -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/libpng16 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers -Wno-narrowing '-DGIT_BRANCH=""' '-DGIT_COMMIT_HASH=""' '-DGIT_COMMIT_MESSAGE=""' '-DGIT_DIRTY="dirty"' -DNO_XWAYLAND -std=c++23 -Os -fomit-frame-pointer -Os -fomit-frame-pointer -fPIE -pthread -DWLR_USE_UNSTABLE -MD -MQ src/Hyprland.p/debug_CrashReporter.cpp.o -MF src/Hyprland.p/debug_CrashReporter.cpp.o.d -o src/Hyprland.p/debug_CrashReporter.cpp.o -c ../src/debug/CrashReporter.cpp
../src/debug/CrashReporter.cpp:4:10: fatal error: execinfo.h: No such file or directory
    4 | #include <execinfo.h>
      |          ^~~~~~~~~~~~
compilation terminated.
ninja: subcommand failed

I think I'm missing hyperland-protocols at this point, thought the message is unclear. Maybe this hint will guide some future packager.

@vaxerski
Copy link
Member

vaxerski commented Mar 6, 2023

That's a problem with your distro most likely. Execinfo should be present on linux.

@WhyNotHugo
Copy link
Author

It's not a problem with the distro. Like I said, I'm the one writing the package, so dependencies are not yet installed (since I still haven't resolved all of them).

I guess meson isn't checking for all the dependencies to confirm if they're installed, since it didn't indicate anything missing.

@vaxerski
Copy link
Member

vaxerski commented Mar 6, 2023

@theoparis
Copy link
Contributor

theoparis commented Mar 6, 2023

I'm compiling with musl on alpine linux and I have the same error 😕 I was able to temporarily fix it by removing the backtrace lines and the execinfo.h include but that will probably cause an issue with crash reporting.

@vaxerski
Copy link
Member

vaxerski commented Mar 7, 2023

it will indeed. Again, it's a part of glibc, so the issue might be that alpine does not have it.

@WhyNotHugo
Copy link
Author

@theoparis You can try gcompat or libexecinfo and see if either of those work. However, I'm not sure what other dependency might turn out to be missing after that.

@nekopsykose
Copy link

You can try gcompat or libexecinfo and see if either of those work.

execinfo.h can be provided by the latter (the former has no relevance). that doesn't exist on alpine, of course, and was removed before for various reasons. strictly speaking, it will never work correctly with musl-libc, so it doesn't exist. on linux, glibc and uclibc provide it, i'm not sure of other libcs.

patching out the include and backtrace()/backtrace_symbols() is the easiest solution if you want to build it yourself there.

I'm trying to package Hyprland on Alpine

it will be rejected so my recommendation is to stop wasting your own time towards that goal.

@WhyNotHugo
Copy link
Author

WhyNotHugo commented Mar 8, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants