[Buildroot] package gdk-pixbuf relocatable issue

Fabrice Fontaine fontaine.fabrice at gmail.com
Thu Mar 17 13:35:29 UTC 2022


Le jeu. 17 mars 2022 à 14:19, Sassen, Rutger <rsassen at comecer.com> a écrit :
>
> Hello Fabrice,
>
> > > A recent patch for package gdk-pixbuf to enable the relocatable option for the host package has introduced a problem for the target package.
> >
> > > The loaders.cache for the target currently is generated by copying the loaders.cache from the host package and editing it using a sed command to replace the host paths with target paths. The sed command is no longer correct, since the host loaders.cache does not contain absolute paths anymore.
> > >
> > > The consequence is, that the target loaders.cache now contains entries like "lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-*". These paths are incorrect, and applications using gdk-pixbuf will crash because they are no longer able to load images. Before the patch, it would contain absolute paths like "/usr/lib/gdk-pixbuf-> 2.0/2.10.0/loaders/libpixbufloader-*".
> > >
> > > I'm not sure what the best approach would be to fix this issue. Either by modifying the SED statement, or by modifying the way the target loaders.cache is generated (i.e. by not using the host loaders.cache as a base).
> >
> > Thanks for spotting this issue, I think the best approach is to:
> > - set relocatable to true for the target (see
> > https://patchwork.ozlabs.org/project/buildroot/patch/20220219122526.2954354-1-fontaine.fabrice@gmail.com)
> > - drop GDK_PIXBUF_UPDATE_CACHE (which has no effect anymore)
> >
> > Can you confirm that this approach is working?
>
> Unfortunately this is not working. Without the GDK_PIXBUF_UPDATE_CACHE, the target ends up with no loaders.cache at all.
Indeed, good catch, then we can only drop the SED command.

However, can you confirm that setting relocatable to true doesn't fix the issue?
>From my understanding, if relocatable is true, gdk-pixbuf should
prepend the toplevel dir:
https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/blob/master/gdk-pixbuf/gdk-pixbuf-io.c#L352

If this doesn't work (because the toplevel dir is not correct), then
the better option would be to update the SED command to prepend /usr/
to all lib paths.
> It’s also not possible to run gdk-pixbuf-query-loaders in the target directory because the architecture might differ from the host.
>
> Best regards,
>
> Rutger
>
>
> Disclaimer
>
> This email communication is CONFIDENTIAL. If you are not the intended recipient, you may not use, copy or disclose to anyone the message or any information contained in the message and I ask that you please notify me by return email and delete this communication immediately. Thank you.
Best Regards,

Fabrice



More information about the buildroot mailing list