wayfire icon indicating copy to clipboard operation
wayfire copied to clipboard

Meson configure and external wlroots

Open marcusbritanicus opened this issue 4 years ago • 2 comments

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.

  1. Clone and install wlroots
  2. Clone wayfire and run meson as meson .build --prefix=/usr --buildtype=release -Duse_system_wfconfig=disabled -Duse_system_wlroots=enabled
  3. 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

marcusbritanicus avatar May 09 '21 04:05 marcusbritanicus

@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.

marcusbritanicus avatar May 10 '21 12:05 marcusbritanicus

That patch no longer works with the latest version of Wayfire, it gets rejected. I suggest the author updates it.

RossComputerGuy avatar Dec 24 '21 07:12 RossComputerGuy

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 avatar Sep 04 '23 06:09 ammen99

@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:

marcusbritanicus avatar Sep 09 '23 06:09 marcusbritanicus