Bug 15964 - DISTRO_FEATURES_NATIVESDK is not taking into account when building nativesdk recipe (nativesdk-libglu)
Summary: DISTRO_FEATURES_NATIVESDK is not taking into account when building nativesdk ...
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: oe-core other (show other bugs)
Version: 5.99
Hardware: x86 Multiple
: Medium normal
Target Milestone: 5.3
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2025-09-04 18:48 UTC by João Henrique
Modified: 2025-09-22 23:49 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
Output of bitbake -e (224.13 KB, application/zip)
2025-09-04 18:48 UTC, João Henrique
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description João Henrique 2025-09-04 18:48:00 UTC
Created attachment 5138 [details]
Output of bitbake -e

Hi

With master yocto:

And having conf/local.conf with:

DISTRO_FEATURES:remove = "opengl"
DISTRO_FEATURES_NATIVESDK:append = " opengl"

I got the following error when trying to build:

`bitbake nativesdk-libglu`:


ERROR: Nothing PROVIDES 'mesa-native' (but virtual:nativesdk:/build/../work/poky/meta/recipes-graphics/mesa/mesa.bb DEPENDS on or otherwise requires it)
mesa-native was skipped: one of 'vulkan opengl' needs to be in DISTRO_FEATURES
ERROR: Required build target 'nativesdk-libglu' has no buildable providers.
Missing or unbuildable dependency chain was: ['nativesdk-libglu', 'virtual/nativesdk-libgl', 'mesa-native']

If I understood DISTRO_FEATURES_NATIVESDK should be filled up DISTRO_FEATURES when building nativesdk recipes.

I've attached the output of bitbake -e to this issue.

I also tested it with walnascar and scarthgap. I got the expected result, no issue there.

Thanks.
Comment 1 Richard Purdie 2025-09-11 14:34:42 UTC
I think this is getting filtered out as opengl is listed in DISTRO_FEATURES_FILTER_NATIVESDK in bitbake.conf by default

DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod opengl wayland"

?
Comment 2 Ross Burton 2025-09-11 14:40:58 UTC
I'm surprised we allow a build of mesa for nativesdk and am tempted to remove that.

For what reason do you need nativesdk-libglu in your build?
Comment 3 João Henrique 2025-09-11 15:09:14 UTC
Hi,

The main reason is for erlang recipe (https://github.com/meta-erlang/meta-erlang/blob/master/recipes-devtools/erlang/erlang.inc).

More context:

It's possible to build erlang with wxWidgets enabled (https://www.erlang.org/doc/apps/wx/chapter.html) usually for target builds, I don't use wx (however it works and supported by meta-erlang if enabled).

Now, meta-erlang layer also generates nativesdk-erlang, which includes some nice tooling for erlang local development (like observer https://www.erlang.org/doc/apps/observer/observer.html).

But some folks want to build nativesdk-erlang without erlang-wx (wx) support. That means without opengl as well. That is why I've found this issue.

BTW, I use nativesdk-libglu (and nativesdk-mesa) when building nativesdk-erlang with wx enabled.

I'll try changing `DISTRO_FEATURES_FILTER_NATIVESDK` too.

Thanks.
Comment 4 João Henrique 2025-09-11 19:59:27 UTC
Hi,

Testing with:

# opengl beamtools
DISTRO_FEATURES:remove = "opengl"
DISTRO_FEATURES_FILTER_NATIVESDK:remove = "opengl"
DISTRO_FEATURES_NATIVESDK:append = " opengl"

I got the same results when bibtbake nativesdk-libglu.
Comment 5 João Henrique 2025-09-15 14:57:18 UTC
Hi,

Nevermore, I forgot that meta-erlang layer has a bbappend for libglu (https://github.com/meta-erlang/meta-erlang/blob/master/recipes-graphics/mesa/libglu_%25.bbappend). That extends the BBCLASSEXTEND to nativesdk and also native.


I think that was the trigger to this conditional. I'll run some more tests on previous yocto versions.

Thanks.
Comment 6 João Henrique 2025-09-22 23:49:53 UTC
Hello,

With latest master and using only 'DISTRO_FEATURES_FILTER_NATIVESDK:remove = "opengl"', bitbake nativesdk-libglu is ok (and also for building nativesdk-wxwidgets).

I'm changing the status to resolved as I can not reproduce the issue anymore.

Thanks.