fluix-dev / sway-borders

Fork of sway with some extra features, mainly related to borders.
https://swaywm.org/
MIT License
221 stars 9 forks source link

Error building from the AUR #52

Closed elythh closed 2 years ago

elythh commented 2 years ago

Getting following error trying to build from the AUR

[279/279] Linking target sway/sway FAILED: sway/sway cc -o sway/sway sway/sway.p/commands.c.o sway/sway.p/config.c.o sway/sway.p/criteria.c.o sway/sway.p/decoration.c.o sway/sway.p/ipc-json.c.o sway/sway.p/ipc-server.c.o sway/sway.p/main.c.o sway/sway.p/server.c.o sway/sway.p/swaynag.c.o sway/sway.p/xdg_activation_v1.c.o sway/sway.p/xdg_decoration.c.o sway/sway.p/desktop_desktop.c.o sway/sway.p/desktop_idle_inhibit_v1.c.o sway/sway.p/desktop_layer_shell.c.o sway/sway.p/desktop_output.c.o sway/sway.p/desktop_render.c.o sway/sway.p/desktop_surface.c.o sway/sway.p/desktop_transaction.c.o sway/sway.p/desktop_xdg_shell.c.o sway/sway.p/input_input-manager.c.o sway/sway.p/input_cursor.c.o sway/sway.p/input_keyboard.c.o sway/sway.p/input_libinput.c.o sway/sway.p/input_seat.c.o sway/sway.p/input_seatop_default.c.o sway/sway.p/input_seatop_down.c.o sway/sway.p/input_seatop_move_floating.c.o sway/sway.p/input_seatop_move_tiling.c.o sway/sway.p/input_seatop_resize_floating.c.o sway/sway.p/input_seatop_resize_tiling.c.o sway/sway.p/input_switch.c.o sway/sway.p/input_tablet.c.o sway/sway.p/input_text_input.c.o sway/sway.p/config_bar.c.o sway/sway.p/config_output.c.o sway/sway.p/config_seat.c.o sway/sway.p/config_input.c.o sway/sway.p/commands_assign.c.o sway/sway.p/commands_bar.c.o sway/sway.p/commands_bind.c.o sway/sway.p/commands_border.c.o sway/sway.p/commands_border_images.c.o sway/sway.p/commands_client.c.o sway/sway.p/commands_create_output.c.o sway/sway.p/commands_default_border.c.o sway/sway.p/commands_default_floating_border.c.o sway/sway.p/commands_default_orientation.c.o sway/sway.p/commands_exit.c.o sway/sway.p/commands_exec.c.o sway/sway.p/commands_exec_always.c.o sway/sway.p/commands_floating.c.o sway/sway.p/commands_floating_minmax_size.c.o sway/sway.p/commands_floating_modifier.c.o sway/sway.p/commands_focus.c.o sway/sway.p/commands_focus_follows_mouse.c.o sway/sway.p/commands_focus_on_window_activation.c.o sway/sway.p/commands_focus_wrapping.c.o sway/sway.p/commands_font.c.o sway/sway.p/commands_for_window.c.o sway/sway.p/commands_force_display_urgency_hint.c.o sway/sway.p/commands_force_focus_wrapping.c.o sway/sway.p/commands_fullscreen.c.o sway/sway.p/commands_gaps.c.o sway/sway.p/commands_hide_edge_borders.c.o sway/sway.p/commands_inhibit_idle.c.o sway/sway.p/commands_kill.c.o sway/sway.p/commands_mark.c.o sway/sway.p/commands_max_render_time.c.o sway/sway.p/commands_opacity.c.o sway/sway.p/commands_include.c.o sway/sway.p/commands_input.c.o sway/sway.p/commands_layout.c.o sway/sway.p/commands_mode.c.o sway/sway.p/commands_mouse_warping.c.o sway/sway.p/commands_move.c.o sway/sway.p/commands_new_float.c.o sway/sway.p/commands_new_window.c.o sway/sway.p/commands_no_focus.c.o sway/sway.p/commands_nop.c.o sway/sway.p/commands_output.c.o sway/sway.p/commands_popup_during_fullscreen.c.o sway/sway.p/commands_reload.c.o sway/sway.p/commands_rename.c.o sway/sway.p/commands_resize.c.o sway/sway.p/commands_scratchpad.c.o sway/sway.p/commands_seat.c.o sway/sway.p/commands_seat_attach.c.o sway/sway.p/commands_seat_cursor.c.o sway/sway.p/commands_seat_fallback.c.o sway/sway.p/commands_seat_hide_cursor.c.o sway/sway.p/commands_seat_idle.c.o sway/sway.p/commands_seat_keyboard_grouping.c.o sway/sway.p/commands_seat_pointer_constraint.c.o sway/sway.p/commands_seat_shortcuts_inhibitor.c.o sway/sway.p/commands_seat_xcursor_theme.c.o sway/sway.p/commands_set.c.o sway/sway.p/commands_show_marks.c.o sway/sway.p/commands_shortcuts_inhibitor.c.o sway/sway.p/commands_smart_borders.c.o sway/sway.p/commands_smart_gaps.c.o sway/sway.p/commands_split.c.o sway/sway.p/commands_sticky.c.o sway/sway.p/commands_swaybg_command.c.o sway/sway.p/commands_swaynag_command.c.o sway/sway.p/commands_swap.c.o sway/sway.p/commands_tiling_drag.c.o sway/sway.p/commands_tiling_drag_threshold.c.o sway/sway.p/commands_title_align.c.o sway/sway.p/commands_title_format.c.o sway/sway.p/commands_titlebar_border_thickness.c.o sway/sway.p/commands_titlebar_padding.c.o sway/sway.p/commands_unmark.c.o sway/sway.p/commands_urgent.c.o sway/sway.p/commands_workspace.c.o sway/sway.p/commands_workspace_layout.c.o sway/sway.p/commands_ws_auto_back_and_forth.c.o sway/sway.p/commands_xwayland.c.o sway/sway.p/commands_bar_bind.c.o sway/sway.p/commands_bar_binding_mode_indicator.c.o sway/sway.p/commands_bar_colors.c.o sway/sway.p/commands_bar_font.c.o sway/sway.p/commands_bar_gaps.c.o sway/sway.p/commands_bar_height.c.o sway/sway.p/commands_bar_hidden_state.c.o sway/sway.p/commands_bar_icon_theme.c.o sway/sway.p/commands_bar_id.c.o sway/sway.p/commands_bar_mode.c.o sway/sway.p/commands_bar_modifier.c.o sway/sway.p/commands_bar_output.c.o sway/sway.p/commands_bar_pango_markup.c.o sway/sway.p/commands_bar_position.c.o sway/sway.p/commands_bar_separator_symbol.c.o sway/sway.p/commands_bar_status_command.c.o sway/sway.p/commands_bar_status_edge_padding.c.o sway/sway.p/commands_bar_status_padding.c.o sway/sway.p/commands_bar_strip_workspace_numbers.c.o sway/sway.p/commands_bar_strip_workspace_name.c.o sway/sway.p/commands_bar_swaybar_command.c.o sway/sway.p/commands_bar_tray_bind.c.o sway/sway.p/commands_bar_tray_output.c.o sway/sway.p/commands_bar_tray_padding.c.o sway/sway.p/commands_bar_workspace_buttons.c.o sway/sway.p/commands_bar_workspace_min_width.c.o sway/sway.p/commands_bar_wrap_scroll.c.o sway/sway.p/commands_input_accel_profile.c.o sway/sway.p/commands_input_calibration_matrix.c.o sway/sway.p/commands_input_click_method.c.o sway/sway.p/commands_input_drag.c.o sway/sway.p/commands_input_drag_lock.c.o sway/sway.p/commands_input_dwt.c.o sway/sway.p/commands_input_events.c.o sway/sway.p/commands_input_left_handed.c.o sway/sway.p/commands_input_map_from_region.c.o sway/sway.p/commands_input_map_to_output.c.o sway/sway.p/commands_input_map_to_region.c.o sway/sway.p/commands_input_middle_emulation.c.o sway/sway.p/commands_input_natural_scroll.c.o sway/sway.p/commands_input_pointer_accel.c.o sway/sway.p/commands_input_repeat_delay.c.o sway/sway.p/commands_input_repeat_rate.c.o sway/sway.p/commands_input_scroll_button.c.o sway/sway.p/commands_input_scroll_factor.c.o sway/sway.p/commands_input_scroll_method.c.o sway/sway.p/commands_input_tap.c.o sway/sway.p/commands_input_tap_button_map.c.o sway/sway.p/commands_input_tool_mode.c.o sway/sway.p/commands_input_xkb_capslock.c.o sway/sway.p/commands_input_xkb_file.c.o sway/sway.p/commands_input_xkb_layout.c.o sway/sway.p/commands_input_xkb_model.c.o sway/sway.p/commands_input_xkb_numlock.c.o sway/sway.p/commands_input_xkb_options.c.o sway/sway.p/commands_input_xkb_rules.c.o sway/sway.p/commands_input_xkb_switch_layout.c.o sway/sway.p/commands_input_xkb_variant.c.o sway/sway.p/commands_output_adaptive_sync.c.o sway/sway.p/commands_output_background.c.o sway/sway.p/commands_output_disable.c.o sway/sway.p/commands_output_dpms.c.o sway/sway.p/commands_output_enable.c.o sway/sway.p/commands_output_max_render_time.c.o sway/sway.p/commands_output_mode.c.o sway/sway.p/commands_output_position.c.o sway/sway.p/commands_output_scale.c.o sway/sway.p/commands_output_scale_filter.c.o sway/sway.p/commands_output_subpixel.c.o sway/sway.p/commands_output_toggle.c.o sway/sway.p/commands_output_transform.c.o sway/sway.p/tree_arrange.c.o sway/sway.p/tree_container.c.o sway/sway.p/tree_node.c.o sway/sway.p/tree_root.c.o sway/sway.p/tree_view.c.o sway/sway.p/tree_workspace.c.o sway/sway.p/tree_output.c.o sway/sway.p/desktop_xwayland.c.o -flto -Wl,--as-needed -Wl,--no-undefined -pie -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -fvar-tracking-assignments -fdebug-prefix-map=/home/elyth/.cache/paru/clone/sway-borders-git/src=/usr/src/debug -Wl,--start-group common/libsway-common.a protocols/libserver_protos.a /usr/lib/libcairo.so /usr/lib/libjson-c.so /usr/lib/libevdev.so /usr/lib/libinput.so /usr/lib/libudev.so -lm /usr/lib/libpango-1.0.so /usr/lib/libgobject-2.0.so /usr/lib/libglib-2.0.so /usr/lib/libharfbuzz.so /usr/lib/libpcre.so /usr/lib/libGLESv2.so /usr/lib/libpixman-1.so /usr/lib/libwayland-server.so /usr/lib/libwlroots.so /usr/lib/libxkbcommon.so /usr/lib/libxcb.so /usr/lib/libgdk_pixbuf-2.0.so /usr/lib/libpangocairo-1.0.so -Wl,--end-group /usr/bin/ld: /usr/bin/ld: DWARF error: invalid abstract instance DIE ref /tmp/cc1EBV3B.ltrans7.ltrans.o: in functionrender_titlebar_text_texture.constprop.0':

:(.text+0x61af): undefined reference to `wlr_backend_get_renderer' /usr/bin/ld: /tmp/cc1EBV3B.ltrans7.ltrans.o: in function `handle_command.part.0.isra.0': :(.text+0x6e7b): undefined reference to `wlr_backend_get_renderer' /usr/bin/ld: /usr/bin/ld: DWARF error: invalid abstract instance DIE ref /tmp/cc1EBV3B.ltrans1.ltrans.o: in function `scissor_output': :(.text+0x1ae4): undefined reference to `wlr_backend_get_renderer' /usr/bin/ld: /tmp/cc1EBV3B.ltrans1.ltrans.o: in function `render_texture': :(.text+0x1be3): undefined reference to `wlr_backend_get_renderer' /usr/bin/ld: /tmp/cc1EBV3B.ltrans1.ltrans.o: in function `render_rect': :(.text+0x5a19): undefined reference to `wlr_backend_get_renderer' /usr/bin/ld: /tmp/cc1EBV3B.ltrans1.ltrans.o::(.text+0x7d6f): more undefined references to `wlr_backend_get_renderer' follow collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. ==> ERROR: A failure occurred in build(). Aborting... error: failed to build 'sway-borders-git-r6682.7f4a3e0e-1': error: packages failed to build: sway-borders-git-r6682.7f4a3e0e-1`
fluix-dev commented 2 years ago

Fixed in https://github.com/fluix-dev/sway-borders/commit/968bc5289b5c765542160b1db9c6b8da69cc4724, thanks!

elythh commented 2 years ago

Still same issue building from source or from AUR

hughwilliams94 commented 2 years ago

Yh I'm still getting the error, I don't know whether the AUR package needs updating?

fluix-dev commented 2 years ago

You likely need to update wlroots-git.

momofor commented 2 years ago

I have the latest wlroots-git, and made a subproject for wlroots in the sway-borders directory buit I still can't build it from source. While I can compile the normal sway project just fine.

fluix-dev commented 2 years ago

Hm, I can't reproduce. I am on 968bc5289b5c765542160b1db9c6b8da69cc4724 (latest) of this fork which includes the latest Sway commit (https://github.com/swaywm/sway/commit/5865af75cf8029cc703cda36b68daafcb658c97b) and have wlroots as a subproject on d70d74a. Keep in mind wlroots has moved to the Freedesktop Gitlab. Maybe there's some caches to clear?

elythh commented 2 years ago

ninja: Entering directory `build/'
[350/525] Compiling C object sway/sway.p/commands_border_images.c.o
FAILED: sway/sway.p/commands_border_images.c.o
cc -Isway/sway.p -Isway -I../sway -Iinclude -I../include -Isubprojects/wlroots/include -I../subprojects/wlroots/include -Iprotocols -I/usr/include/cairo -I/usr/include/lzo -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/json-c -I/usr/include/libevdev-1.0 -I/usr/include/pango-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -g -DWLR_USE_UNSTABLE -Wno-unused-parameter -Wno-unused-result -Wno-missing-braces -Wundef -Wvla '-DSYSCONFDIR="//usr/local/etc"' '-DSWAY_VERSION="1.6-968bc528 (" __DATE__ ", branch '"'"'master'"'"')"' -fmacro-prefix-map=../= -pthread -MD -MQ sway/sway.p/commands_border_images.c.o -MF sway/sway.p/commands_border_images.c.o.d -o sway/sway.p/commands_border_images.c.o -c ../sway/commands/border_images.c
../sway/commands/border_images.c: In function ‘apply_border_textures_for_class’:
../sway/commands/border_images.c:14:41: error: implicit declaration of function ‘wlr_backend_get_renderer’; did you mean ‘wlr_backend_get_session’? [-Werror=implicit-function-declaration]
   14 |         struct wlr_renderer *renderer = wlr_backend_get_renderer(
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                         wlr_backend_get_session
../sway/commands/border_images.c:14:41: error: initialization of ‘struct wlr_renderer *’ from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion]
cc1: all warnings being treated as errors
[359/525] Compiling C object sway/sway.p/commands_floating.c.o
ninja: build stopped: subcommand failed.```
fluix-dev commented 2 years ago

This was removed here. You are not on commit https://github.com/fluix-dev/sway-borders/commit/968bc5289b5c765542160b1db9c6b8da69cc4724 of this repository.

Edit: Oh wait, that's a different place.

fluix-dev commented 2 years ago

Alright, sorry about that. Can you please try https://github.com/fluix-dev/sway-borders/commit/9350114432dbabfe9e1b6127599b6ee348697007, looks like my local build was ignoring warnings.

momofor commented 2 years ago

@fluix-dev thanks for the fix it works perfectly now :D.