void-linux / void-packages

The Void source packages collection
https://voidlinux.org
Other
2.59k stars 2.15k forks source link

Build options leak when building a target's dependency. #27456

Open ericonr opened 3 years ago

ericonr commented 3 years ago

My test case is with efl and enlightenment; to reproduce, you simply need to increase the revision in both packages, then try to build enlightenment, with ./xbps-src pkg enlightenment. When it doesn't find the up to date efl dependency, it will attempt to build it, and fail, as seen here:

=> xbps-src: updating repositories for host (x86_64)...
[*] Updating repository `https://mirror.clarkson.edu/voidlinux/current/x86_64-repodata' ...
[*] Updating repository `https://mirror.clarkson.edu/voidlinux/current/nonfree/x86_64-repodata' ...
[*] Updating repository `https://mirror.clarkson.edu/voidlinux/current/debug/x86_64-repodata' ...
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/multilib/x86_64-repodata' ...
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/multilib/nonfree/x86_64-repodata' ...
=> xbps-src: updating software in / masterdir...
=> xbps-src: cleaning up / masterdir...
=> enlightenment-0.24.2_1: removing autodeps, please wait...
=> enlightenment-0.24.2_1: the following build options are set:
   wayland: Enable support for the Wayland backend (ON)
=> enlightenment-0.24.2_1: building [meson] for x86_64...
   [host] efl-1.24.4_1: not found
   [host] pkg-config-0.29.2_2: found (https://mirror.clarkson.edu/voidlinux/current)
   [host] gettext-0.21_2: found (https://mirror.clarkson.edu/voidlinux/current)
   [host] xorg-server-xwayland-1.20.10_2: found (https://mirror.clarkson.edu/voidlinux/current)
   [host] meson-0.55.3_3: found (https://mirror.clarkson.edu/voidlinux/current)
   [target] gettext-devel-0.21_2: found (https://mirror.clarkson.edu/voidlinux/current)
   [target] efl-devel-1.24.4_1: not found
   [target] pam-devel-1.3.0_2: found (https://mirror.clarkson.edu/voidlinux/current)
   [target] xkeyboard-config-2.31_1: found (https://mirror.clarkson.edu/voidlinux/current)
   [target] libxkbcommon-devel-1.0.3_1: found (https://mirror.clarkson.edu/voidlinux/current)
   [target] MesaLib-devel-20.3.1_1: found (https://mirror.clarkson.edu/voidlinux/current)
   [target] wayland-devel-1.18.0_3: found (https://mirror.clarkson.edu/voidlinux/current)
   [runtime] desktop-file-utils-0.26_1: found (https://mirror.clarkson.edu/voidlinux/current)
   [runtime] hicolor-icon-theme-0.17_3: found (https://mirror.clarkson.edu/voidlinux/current)
   [runtime] xkeyboard-config-2.31_1: found (https://mirror.clarkson.edu/voidlinux/current)
   [runtime] xorg-server-xwayland-1.20.10_2: found (https://mirror.clarkson.edu/voidlinux/current)
   [runtime] efl-devel-1.24.4_1: not found
=> ERROR: efl-1.24.4_1: cannot be built, it's currently broken; see the build log:
=> ERROR: efl-1.24.4_1: wayland requires drm

I assume this happens because enlightenment has build_options_default=wayland, while efl has build_options_default="elogind harfbuzz pulseaudio gstreamer x11 wayland opengl gles2 drm glib ibus". efl's options are overridden, and we (luckily) get an error, because the wayland build option requires drm.

fosslinux commented 3 years ago

Oddly, even when I set XBPS_PKG_OPTS_efl, this issue still occurs.

ericonr commented 3 years ago

https://build.voidlinux.org/builders/aarch64_builder/builds/34101/steps/shell_3/logs/stdio shows another instance of leakage. enchant2 for the host fails to build because it was launched from within a cross build for OpenRCT2.

IMO we need to completely revamp how unavailable dependencies are built from within xbps-src.

Duncaen commented 3 years ago

Yes would be nice to rework xbps-src to just fork instead of trying to source and later unset a bunch of stuff, there is really no benefit to it afaik.

github-actions[bot] commented 2 years ago

Issues become stale 90 days after last activity and are closed 14 days after that. If this issue is still relevant bump it or assign it.

ericonr commented 2 years ago

Still an issue

github-actions[bot] commented 2 years ago

Issues become stale 90 days after last activity and are closed 14 days after that. If this issue is still relevant bump it or assign it.