Message ID | 20221109093534.2718027-1-f_l_k@t-online.de |
---|---|
State | Under Review |
Headers | show |
Series | [meta-oe] hwdata: allow to build native and nativesdk | expand |
On 9 Nov 2022, at 09:35, Markus Volk via lists.openembedded.org <f_l_k=t-online.de@lists.openembedded.org> wrote: > > Previously, wlroots read the edid information for the drm backend from udev_hwdb. > After the latest changes, it now gets the information from hwdata to unblock platforms > without systemd support. For this, hwdata-native is needed. If it is not found, wlroots > uses hwdata from host, which may not be up to date. This would ensure that the > information can be read from the latest hwdata version available in oe-core. Why can’t wlroots use the target hwdata in the sysroot, if you DEPEND on hwdata? Ross
Am Mi, 9. Nov 2022 um 12:49:09 +0000 schrieb Ross Burton <ross.burton@arm.com>: > Why can’t wlroots use the target hwdata in the sysroot, if you > DEPEND on hwdata? > <https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/eec95e3d5e1a4f2e13b1f6b34cc287475ca57daf#f4c2841d6e753ee75c34eb9017589811c2f3d583_1_1> They explicitly look for the native one.
| Dependency gbm found: YES 22.2.2 (cached) | Checking for function "gbm_bo_get_fd_for_plane" with dependency gbm: YES | Found CMake: /home/flk/poky/build-intel/tmp/work/corei7-64-poky-linux/wlroots/0.15.1-r0/recipe-sysroot-native/usr/bin/cmake (3.24.2) | Build-time dependency hwdata found: NO (tried pkgconfig and cmake) | | ../git/backend/drm/meson.build:6:1: ERROR: File /usr/share/hwdata/pnp.ids does not exist. | | A full log can be found at /home/flk/poky/build-intel/tmp/work/corei7-64-poky-linux/wlroots/0.15.1-r0/build/meson-logs/meson-log.txt | ERROR: meson failed | WARNING: exit code 1 from a shell command. With DEPEND on hwdata instead of hwdata-native it fails like this.
On 9 Nov 2022, at 13:41, Markus Volk via lists.openembedded.org <f_l_k=t-online.de@lists.openembedded.org> wrote: > > | Dependency gbm found: YES 22.2.2 (cached) > | Checking for function "gbm_bo_get_fd_for_plane" with dependency gbm: YES > | Found CMake: /home/flk/poky/build-intel/tmp/work/corei7-64-poky-linux/wlroots/0.15.1-r0/recipe-sysroot-native/usr/bin/cmake (3.24.2) > | Build-time dependency hwdata found: NO (tried pkgconfig and cmake) > | > | ../git/backend/drm/meson.build:6:1: ERROR: File /usr/share/hwdata/pnp.ids does not exist. > | > | A full log can be found at /home/flk/poky/build-intel/tmp/work/corei7-64-poky-linux/wlroots/0.15.1-r0/build/meson-logs/meson-log.txt > | ERROR: meson failed > | WARNING: exit code 1 from a shell command. > > With DEPEND on hwdata instead of hwdata-native it fails like this. I call that a bug in wlroots. It should be looking in the sysroot. Ross
At least they have a point for correctness by calling it build-dependency instead of runtime-dependency. I take your point that this difference shouldn't matter because hwdata is allarch, but simply removing 'native: true' does not fix the problem. hwdata will then be found, but the correct value will not be read here: hwdata_dir = hwdata.get_variable(pkgconfig: 'pkgdatadir') | Run-time dependency hwdata found: YES 0.364 | | ../git/backend/drm/meson.build:4:1: ERROR: File /usr/share/hwdata/pnp.ids does not exist. > > I call that a bug in wlroots. It should be looking in the sysroot. > > Ross > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#99499): > <https://lists.openembedded.org/g/openembedded-devel/message/99499> > Mute This Topic: <https://lists.openembedded.org/mt/94909525/3618223> > Group Owner: openembedded-devel+owner@lists.openembedded.org > <mailto:openembedded-devel+owner@lists.openembedded.org> > Unsubscribe: > <https://lists.openembedded.org/g/openembedded-devel/unsub> > [f_l_k@t-online.de <mailto:f_l_k@t-online.de>] > -=-=-=-=-=-=-=-=-=-=-=- >
> On 9 Nov 2022, at 16:01, Markus Volk via lists.openembedded.org <f_l_k=t-online.de@lists.openembedded.org> wrote: > > At least they have a point for correctness by calling it build-dependency instead of runtime-dependency. > > I take your point that this difference shouldn't matter because hwdata is allarch, but simply removing 'native: true' > does not fix the problem. hwdata will then be found, but the correct value will not be read here: > hwdata_dir = hwdata.get_variable(pkgconfig: 'pkgdatadir') > > > | Run-time dependency hwdata found: YES 0.364 > | > | ../git/backend/drm/meson.build:4:1: ERROR: File /usr/share/hwdata/pnp.ids does not exist. The problem here is that you're using a target path on the host, pkgconfig just treats variables are literal strings and doesn’t do any sysroot processing on them. wayland-protocols does the right thing and puts the sysroot in the pkgdatadir: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/wayland-protocols.pc.in wlroots should do this too. Ross
Got it. You suggest fixing hwdata .pc file first. I didn't know about the pc_sysrootdir variable, thanks for pointing it out. With this gehangen wlroots is built when 'native: true' is removed. Would this be good enough to send upstream ,or should i create a patch for the hwdata recipe? diff --git a/hwdata.pc.in b/hwdata.pc.in index 8dd73b6..c5791d3 100644 --- a/hwdata.pc.in +++ b/hwdata.pc.in @@ -1,6 +1,6 @@ prefix=@prefix@ datadir=@datadir@ -pkgdatadir=@pkgdatadir@ +pkgdatadir=${pc_sysrootdir}@pkgdatadir@ Name: @NAME@ Am Mi, 9. Nov 2022 um 16:43:40 +0000 schrieb Ross Burton <Ross.Burton@arm.com>: > > >> On 9 Nov 2022, at 16:01, Markus Volk via lists.openembedded.org >> <f_l_k=t-online.de@lists.openembedded.org >> <mailto:f_l_k=t-online.de@lists.openembedded.org>> wrote: >> >> At least they have a point for correctness by calling it >> build-dependency instead of runtime-dependency. >> >> I take your point that this difference shouldn't matter because >> hwdata is allarch, but simply removing 'native: true' >> does not fix the problem. hwdata will then be found, but the >> correct value will not be read here: >> hwdata_dir = hwdata.get_variable(pkgconfig: 'pkgdatadir') >> >> >> | Run-time dependency hwdata found: YES 0.364 >> | >> | ../git/backend/drm/meson.build:4:1: ERROR: File >> /usr/share/hwdata/pnp.ids does not exist. > > The problem here is that you're using a target path on the host, > pkgconfig just treats variables are literal strings and doesn’t do > any sysroot processing on them. > > wayland-protocols does the right thing and puts the sysroot in the > pkgdatadir: > > <https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/wayland-protocols.pc.in> > > wlroots should do this too. > > Ross
On 9 Nov 2022, at 17:57, Markus Volk via lists.openembedded.org <f_l_k=t-online.de@lists.openembedded.org> wrote: > > Got it. You suggest fixing hwdata .pc file first. > I didn't know about the pc_sysrootdir variable, thanks for pointing it out. > > With this gehangen wlroots is built when 'native: true' is removed. > Would this be good enough to send upstream ,or should i create a patch for the hwdata recipe? Both? Send upstream, apply patch to the recipe until we upgrade. Ross
diff --git a/meta-oe/recipes-support/hwdata/hwdata_0.364.bb b/meta-oe/recipes-support/hwdata/hwdata_0.364.bb index 6499db24f..4abfb4346 100644 --- a/meta-oe/recipes-support/hwdata/hwdata_0.364.bb +++ b/meta-oe/recipes-support/hwdata/hwdata_0.364.bb @@ -23,3 +23,5 @@ do_install() { FILES:${PN} = "${libdir}/* \ ${datadir}/* " + +BBCLASSEXTEND = "native nativesdk"
Previously, wlroots read the edid information for the drm backend from udev_hwdb. After the latest changes, it now gets the information from hwdata to unblock platforms without systemd support. For this, hwdata-native is needed. If it is not found, wlroots uses hwdata from host, which may not be up to date. This would ensure that the information can be read from the latest hwdata version available in oe-core. Signed-off-by: Markus Volk <f_l_k@t-online.de> --- meta-oe/recipes-support/hwdata/hwdata_0.364.bb | 2 ++ 1 file changed, 2 insertions(+)