wayfire icon indicating copy to clipboard operation
wayfire copied to clipboard

-Duse_system_wlroots=enabled fails to build with 2021-12-01 snapshot

Open jbeich opened this issue 4 years ago • 1 comments

Old errors obsolete after 6720f6a6e902

Regressed by wlroots@a04cfca + wlroots@fdf3169. From error log:

src/core/opengl.cpp:538:31: error: no member named 'inverted_y' in 'wlr_gles2_texture_attribs'
    this->invert_y = !attribs.inverted_y;
                      ~~~~~~~ ^
src/main.cpp:301:21: error: use of undeclared identifier 'wlr_backend_get_renderer'; did you mean 'wlr_backend_get_session'?
    core.renderer = wlr_backend_get_renderer(core.backend);
                    ^~~~~~~~~~~~~~~~~~~~~~~~

Regressed by wlroots@1d3dd7f + wlroots@efeb834.

In file included from src/core/core.cpp:17:
src/api/wayfire/nonstd/wlroots-full.hpp:85:10: fatal error: 'wlr/backend/noop.h' file not found
#include <wlr/backend/noop.h>
         ^~~~~~~~~~~~~~~~~~~~
src/core/output-layout.cpp:662:25: error: no member named 'front_buffer' in 'wlr_output'
        if (wo->handle->front_buffer == NULL)
            ~~~~~~~~~~  ^
src/core/output-layout.cpp:669:48: error: no member named 'front_buffer' in 'wlr_output'
        if (!wlr_buffer_get_dmabuf(wo->handle->front_buffer, &attributes))
                                   ~~~~~~~~~~  ^

jbeich avatar Nov 17 '21 17:11 jbeich

jbeich had a patch that works, https://github.com/WayfireWM/wayfire/pull/1355#issuecomment-981090104 I actually went through the code bit by bit as the compiler/linker complained and wound up with effectively the same thing. The noop calls easily convert to headless calls, and I just left the name noop_backend as is, because it's self explanatory.

The other issue with compiling against latest wlroots is the few references to front_buffer (which has gone bye-bye) but there is a back_buffer, which I changed to get wayfire to compile. (also one reference in wayfire-plugins-extra, mag.cpp)

Seems to be running fine, no problems with weird/unexplainable behavior.

Just my experience with patching wayfire against latest wlroots.

Sway did a similar thing with their noop code, they converted to headless, but renamed noop to backup, I find noop more clear about what it is.

Edit to add: I know that changing front_buffer to back_buffer is the wrong solution, but I'm trying to get a handle on using wlr_output_event_commit instead (which is supposedly what it's for) but the lack of documentation is frighting lol I just made the change to make it work, since it involved mirroring and I don't do that.

droc12345 avatar Dec 10 '21 21:12 droc12345

I believe this has been fixed since quite awhile :)

ammen99 avatar Aug 04 '23 14:08 ammen99