Meson configure and external wlroots
Describe the bug Meson does not configure the project if we install wlroots externally. It crashes out with error related to external dependencies.
To Reproduce Steps to reproduce the behavior: Note: If you have installed wlroots and wayfire, simply uninstall both of them to reproduce the error.
- Clone and install wlroots
- Clone wayfire and run meson as
meson .build --prefix=/usr --buildtype=release -Duse_system_wfconfig=disabled -Duse_system_wlroots=enabled - Meson crashes with the following error:
meson.build:124:2: ERROR: Dependencies must be external dependencies
Expected behavior Not give any error.
Wayfire version git
wlroots version git
Might be related to this
@soreau's patch mitgates the error, but then, wf-config and wlroots subprojects never can be used, even with suitable meson options.
Original meson configuration output: https://pastebin.com/wZz8ZgSa Original meson full log: https://pastebin.com/879c06fh
@travankor's patch http://ix.io/3mob
This fixes the meson.build:124:2: ERROR: Dependencies must be external dependencies when wlroots or wf-config in installed externally.
However, when the configuration is done using
meson .build --prefix=/usr --buildtype=release -Duse_system_wfconfig=enabled -Duse_system_wlroots=enabled
and wf-config and wlroots are not installed, it will still crash with the same error:
meson.build:124:2: ERROR: Dependencies must be external dependencies
It would be preferable if the error message specified that wf-config or wlroots was not found in the system.
That patch no longer works with the latest version of Wayfire, it gets rejected. I suggest the author updates it.
I just encountered this myself :)
The real issue is that even with -Duse_system_wlroots=enabled, meson will not require system wlroots, as the intention is, it seems to always fall back to the subproject .. I haven't figured out how to stop it, so I added manual checks to ensure that use_system_x=enabled is enforced. See #1885
@ammen99 This seems to create a new problem: Now, if wlroots is installed and if we pass Duse_system_wlroots=disabled, meson quits with the following error:
subprojects/wlroots/meson.build:192:6: ERROR: Tried to override dependency 'wlroots' which has already been resolved or overridden at /home/cosmos/Wayfire/meson.build:34: