phkaeser / wlmaker

Wayland Maker - A Wayland compositor inspired by Window Maker
Apache License 2.0
132 stars 4 forks source link

building on debian gnu/linux, sid failed for me #3

Closed alexmyczko closed 7 months ago

alexmyczko commented 8 months ago
[ 45%] Building C object src/CMakeFiles/wlmaker.dir/button.c.o
cd /var/www/debian/wlmaker/2/wlmaker-0.1+git20231230+ds/obj-x86_64-linux-gnu/src && /usr/bin/cc -DHAVE_CAIRO -DWLMAKER_ICON_DATA_DIR=\"/usr/share/icons/wlmaker\" -DWLMAKER_SOURCE_DIR=\"/var/www/debian/wlmaker/2/wlmaker-0.1+git20231230+ds\" -I/var/www/debian/wlmaker/2/wlmaker-0.1+git20231230+ds/obj-x86_64-linux-gnu/third_party/protocols -I/var/www/debian/wlmaker/2/wlmaker-0.1+git20231230+ds/obj-x86_64-linux-gnu/protocols -I/var/www/debian/wlmaker/2/wlmaker-0.1+git20231230+ds/submodules/libbase/.. -I/var/www/debian/wlmaker/2/wlmaker-0.1+git20231230+ds/src/toolkit/.. -isystem /usr/include/cairo -isystem /usr/include/libpng16 -isystem /usr/include/freetype2 -isystem /usr/include/pixman-1 -isystem /usr/include/libdrm -g -O2 -ffile-prefix-map=/var/www/debian/wlmaker/2/wlmaker-0.1+git20231230+ds=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu11 -Wall -Wextra -Werror -ggdb -DDEBUG -O0 -fmacro-prefix-map=/var/www/debian/wlmaker/2/wlmaker-0.1+git20231230+ds=. -I/usr/include -MD -MT src/CMakeFiles/wlmaker.dir/button.c.o -MF CMakeFiles/wlmaker.dir/button.c.o.d -o CMakeFiles/wlmaker.dir/button.c.o -c /var/www/debian/wlmaker/2/wlmaker-0.1+git20231230+ds/src/button.c
/var/www/debian/wlmaker/2/wlmaker-0.1+git20231230+ds/src/button.c: In function ‘_button_enter’:
/var/www/debian/wlmaker/2/wlmaker-0.1+git20231230+ds/src/button.c:218:5: error: implicit declaration of function ‘wlr_xcursor_manager_set_cursor_image’; did you mean ‘wlr_xcursor_manager_get_xcursor’? [-Werror=implicit-function-declaration]
  218 |     wlr_xcursor_manager_set_cursor_image(
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |     wlr_xcursor_manager_get_xcursor
cc1: all warnings being treated as errors

is there an easy fix?

phkaeser commented 8 months ago

Hej Alex,

hm... I suspect it's because libwlroots is built from sid, and it's a rather fast moving target (the API isn't defined as stable, and I recall wlr_xcursor had some changes).

Due to that, I have defined and versioned the key dependencies of wlmaker as git submodules: https://github.com/phkaeser/wlmaker/blob/main/dependencies/CMakeLists.txt

first time: update the submodules.

git submodule update --init --recursive --merge cd dependencies cmake -DCMAKE_INSTALL_PREFIX:PATH=${HOME}/.local -B build

build AND install into your ${HOME}/.local

(cd build && make) cd ..

For configuring & building wlmaker: We need to refer to these installed

packages. export LD_LIBRARY_PATH="${HOME}/.local/lib/x86_64-linux-gnu" export PKG_CONFIG_PATH="${HOME}/.local/lib/x86_64-linux-gnu/pkgconfig/:${HOME}/.local/share/pkgconfig/"

cmake -B build/ -DCMAKE_INSTALL_PREFIX="${HOME}/.local" (cd build && make)

That should build it. Note: I don't think I had been very disciplined in declaring all library dependencies => these are the packages I got installed for me:

apt-get install \ foot \ glslang-dev \ glslang-tools \ graphviz \ libgbm-dev \ libinput-dev \ libudev-dev \ libvulkan-dev \ libxcb-composite0-dev \ libxcb-dri3-dev \ libxcb-ewmh-dev \ libxcb-icccm4-dev \ libxcb-present-dev \ libxcb-render-util0-dev \ libxcb-res0-dev \ libxcb-xinput-dev \ libxkbcommon-dev \ meson \ plantuml \ xmlto \ xsltproc

Let me know if that doesn't work. And: Yeah, the documentation should get an update... sorry for that :)

yours, Philipp

On Sat, 30 Dec 2023 at 20:59, Alex Myczko @.***> wrote:

[ 45%] Building C object src/CMakeFiles/wlmaker.dir/button.c.o cd /var/www/debian/wlmaker/2/wlmaker-0.1+git20231230+ds/obj-x86_64-linux-gnu/src && /usr/bin/cc -DHAVE_CAIRO -DWLMAKER_ICON_DATA_DIR=\"/usr/share/icons/wlmaker\" -DWLMAKER_SOURCE_DIR=\"/var/www/debian/wlmaker/2/wlmaker-0.1+git20231230+ds\" -I/var/www/debian/wlmaker/2/wlmaker-0.1+git20231230+ds/obj-x86_64-linux-gnu/third_party/protocols -I/var/www/debian/wlmaker/2/wlmaker-0.1+git20231230+ds/obj-x86_64-linux-gnu/protocols -I/var/www/debian/wlmaker/2/wlmaker-0.1+git20231230+ds/submodules/libbase/.. -I/var/www/debian/wlmaker/2/wlmaker-0.1+git20231230+ds/src/toolkit/.. -isystem /usr/include/cairo -isystem /usr/include/libpng16 -isystem /usr/include/freetype2 -isystem /usr/include/pixman-1 -isystem /usr/include/libdrm -g -O2 -ffile-prefix-map=/var/www/debian/wlmaker/2/wlmaker-0.1+git20231230+ds=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu11 -Wall -Wextra -Werror -ggdb -DDEBUG -O0 -fmacro-prefix-map=/var/www/debian/wlmaker/2/wlmaker-0.1+git20231230+ds=. -I/usr/include -MD -MT src/CMakeFiles/wlmaker.dir/button.c.o -MF CMakeFiles/wlmaker.dir/button.c.o.d -o CMakeFiles/wlmaker.dir/button.c.o -c /var/www/debian/wlmaker/2/wlmaker-0.1+git20231230+ds/src/button.c /var/www/debian/wlmaker/2/wlmaker-0.1+git20231230+ds/src/button.c: In function ‘_button_enter’: /var/www/debian/wlmaker/2/wlmaker-0.1+git20231230+ds/src/button.c:218:5: error: implicit declaration of function ‘wlr_xcursor_manager_set_cursor_image’; did you mean ‘wlr_xcursor_manager_get_xcursor’? [-Werror=implicit-function-declaration] 218 | wlr_xcursor_manager_set_cursor_image( | ^~~~~~~~ | wlr_xcursor_manager_get_xcursor cc1: all warnings being treated as errors

is there an easy fix?

— Reply to this email directly, view it on GitHub https://github.com/phkaeser/wlmaker/issues/3, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7AKF3OYRKPKXMGQI6F44LTYMBXA3AVCNFSM6AAAAABBHW7442VHI2DSMVQWIX3LMV43ASLTON2WKOZSGA3DAOBUGE2TMMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

probonopd commented 8 months ago

foot doesn't seem to exist on Ubuntu focal. Is there even a chance of compiling wlmaker on focal?

phkaeser commented 8 months ago

Foot is a minimalistic Wayland terminal emulator: https://packages.debian.org/bookworm/foot -- I'd expect it's available on sid, too. (I'm developing on bookworm)

Not required for building wlmaker. In version 0.1, the launchers are hard-coded, and "foot" is the terminal emulator I used there.

On Sat, 30 Dec 2023 at 21:34, probonopd @.***> wrote:

What is foot? Doesn't seem to exist on Ubuntu focal?

— Reply to this email directly, view it on GitHub https://github.com/phkaeser/wlmaker/issues/3#issuecomment-1872601245, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7AKF3OCE2YUSR6IBM3BNC3YMB3GBAVCNFSM6AAAAABBHW7442VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZSGYYDCMRUGU . You are receiving this because you commented.Message ID: @.***>

probonopd commented 8 months ago

Looks like the package wayland-protocols also needs to be installed.

phkaeser commented 8 months ago

Thanks for flagging!

(Let me know if you find others, can't hurt to fix my list...)

On Sat, 30 Dec 2023 at 21:41, probonopd @.***> wrote:

Looks like the package wayland-protocols also needs to be installed.

— Reply to this email directly, view it on GitHub https://github.com/phkaeser/wlmaker/issues/3#issuecomment-1872602393, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7AKF3JWMV3LNMOYOTU5JO3YMB35NAVCNFSM6AAAAABBHW7442VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZSGYYDEMZZGM . You are receiving this because you commented.Message ID: @.***>

probonopd commented 8 months ago

libwlroots-dev doxygen

Would you be interested in having automated builds using GitHub Actions?

phkaeser commented 8 months ago

libwlroots-dev should not be required, when built with proper settings from the submodules.

doxygen: Argh, yes!

Yes, highly interested in having automated builds. Also would be happy to have tests + doc targets ran as a presubmit. Contributions most welcome :)

On Sat, 30 Dec 2023 at 21:45, probonopd @.***> wrote:

libwlroots-dev doxygen

Would you be interested in having automated builds using GitHub Actions?

— Reply to this email directly, view it on GitHub https://github.com/phkaeser/wlmaker/issues/3#issuecomment-1872603147, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7AKF3MHURYLDFROP2OM5ZTYMB4MRAVCNFSM6AAAAABBHW7442VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZSGYYDGMJUG4 . You are receiving this because you commented.Message ID: @.***>

probonopd commented 8 months ago

On it. Can you elaborate on "when built with proper settings from the submodules" please?

phkaeser commented 8 months ago

Basically the sequence from the first mail:

first time: update the submodules.

git submodule update --init --recursive --merge cd dependencies cmake -DCMAKE_INSTALL_PREFIX:PATH=${HOME}/.local -B build

build AND install into your ${HOME}/.local

(cd build && make) cd ..

For configuring & building wlmaker: We need to refer to these installed

packages. export LD_LIBRARY_PATH="${HOME}/.local/lib/x86_64-linux-gnu" export PKG_CONFIG_PATH="${HOME}/.local/lib/x86_64-linux-gnu/pkgconfig/:${HOME}/.local/share/pkgconfig/"

cmake -B build/ -DCMAKE_INSTALL_PREFIX="${HOME}/.local" (cd build && make)

On Sat, 30 Dec 2023 at 21:53, probonopd @.***> wrote:

On it. Can you elaborate on "when built with proper settings from the submodules" please?

— Reply to this email directly, view it on GitHub https://github.com/phkaeser/wlmaker/issues/3#issuecomment-1872604605, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7AKF3OYCKDYQFJQWIQWJH3YMB5LPAVCNFSM6AAAAABBHW7442VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZSGYYDINRQGU . You are receiving this because you commented.Message ID: @.***>

probonopd commented 8 months ago

WIP GitHub Actions workflow: https://github.com/probonopd/wlmaker/blob/patch-1/.github/workflows/build_and_upload_artifact.yml

phkaeser commented 7 months ago

https://github.com/phkaeser/wlmaker/actions/workflows/build-for-linux.yml addresses the "building" aspect; although technically on ubuntu-latest, not on debian/sid.

Pending: Find a good means to publish it as a binary (eg. a flatpak?). Due to wlroots having significant API changes across versions, that will need to bundle some of the dependencies.

phkaeser commented 7 months ago

Filed #26 for that pending aspect, but will close here, since building should be fine now.

alexmyczko commented 7 months ago

i've been missing screenshots. instead of trying to build, could also just ask if you could provide screenshots? and are you aware of gsde and nextspace projects?

alexmyczko commented 7 months ago

now it builds... http://sid.ethz.ch/debian/wlmaker/3/

alexmyczko commented 7 months ago

I can move the mouse cursor!!!image

phkaeser commented 7 months ago

😂😂 ... at least it's running!

Clicking the buttons would run an app, too... if they are installed. I'm afraid v0.1 is "experimental" proper, with the apps hard-configured in code.

Curious: Did you run it in a window (from X11 or another Wayland compositor)?

For a standalone session, it should use up all available output space, hence wondering.

alexmyczko commented 7 months ago

I have run it on http://bananas.debian.net a Debian GNU/Linux Apple laptop with M1, arm64. Using startx from console with .xsessionrc conetent exec wlmaker