Friday, December 31, 2021

Re: New: graphics/libyuv 0.0.1807

On Fri, Dec 31, 2021 at 09:19:34AM +0000, Stuart Henderson wrote:
>On 2021/12/31 06:51, Andrew Krasavin wrote:
>> Hello.
>>
>> This is another dependency for our telegram-desktop port (more
>> accurately, for tg_owt port). It seems more correct to get the shared
>> library as a separate port, that's why we refused to use the bundled
>> version.
>>
>> Keep in mind that Google supplies libyuv primarily as part of
>> Chromium and maintains build correctness only for the static library.
>> Unfortunately, it seems that these are not just words. For example,
>> one can observe this:
>
>Given what you've said about libyuv, I think this approach could be
>problematic and that it makes more sense to use the bundled copy.
>
>As well as avoiding the problems you've mentioned, it reduces the
>risk of it interfering with build of the chromium-based ports
>(chromium/iridium/electron/qtwebengine) which won't expect a system copy
>of this library/headers.
>

Thank you for your reply.

Yes, google's approach to libyuv development creates some
inconveniences, but it looks like we've managed to solve them, and
in a rather "cheap" way.

I described the nuances of the libyuv port not to show "how hard it
was" (it wasn't hard), but to make the reasons for my decisions
clear.

Using a bundled version is definitely easier. However, it can cause
delayed problems typical for static builds. I like the idea of having
a port with normal versioning and keeping track of it, rather than
relying on a bunch of bundles with undefined and/or unknown versions.
Having tests in my port also seems to me to be an advantage over
bundled versions.

The question about Chromium/Electron/etc is interesting and needs
research.
At first glance, there should be no problem, since
1) chromium and others, if I'm not confused, use static rather than
dynamic linking for libyuv and don't rely on header files and/or
library in the system at all; the paths to libyuv header files are
hardcoded.
2) Some popular linux distributions that have chromium in their
repositories also have a package with libyuv. I haven't looked at
all their build scripts, but, for example, PKGBUILD for archlinux
definitely doesn't contain any libyuv-related hacks and workarounds.
3) Openh264 and usrsctp have recently been added to the ports tree,
which are also used in chromium and come as bundles within it.

(libyuv in distros: https://repology.org/project/libyuv/versions)
--
Wbr, Andrew Krasavin

No comments:

Post a Comment