After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 794770 - Meson: Stop depending on libtool to make android static link
Meson: Stop depending on libtool to make android static link
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: cerbero
1.12.x
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 794568
Blocks: 794604
 
 
Reported: 2018-03-28 15:24 UTC by Xavier Claessens
Modified: 2018-11-03 10:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Xavier Claessens 2018-03-28 15:24:17 UTC
When building GStreamer with meson it won't generate .la files. So we can rely only on .pc files to make static builds. As part of bug #794568, we are going to generate a .pc file for each plugin, but that's just one step.

Currently ndk-build/gstreamer-1.0.mk builds a shared library that static link all gstreamer plugins and their dependencies. To find dependencies it calls libtool-link function from tools.mk which parse .la files.

With pkg-config getting the list of all libraries is easier:
$ pkg-config --libs --static <list of plugins>

But that's going to give too many -lfoo flags, we don't want to static link libs provided by the android NDK (e.g. libc), only those from gstreamer SDK. Currently that distinction is made based on .la files: Android NDK does not have .la files and GStreamer SDK does. So the decision is basically "static link if a .la is found, dynamic otherwise".

I see 2 possibilities:
- Hard-ode a blacklist of libs to not static link; or
- For each -lfoo ask gcc to resolve to the absolute path to the .a and if found, and has as prefix GStreamer's SDK path, replace the -lfoo by the path to .a in the link command. That's what meson will do if this PR is accepted: https://github.com/mesonbuild/meson/pull/2816
Comment 1 Nirbheek Chauhan 2018-07-19 08:32:54 UTC
As recipes have started using Meson, we have been generating the libtool files manually in Cerbero with LibtoolLibrary(), which was created ages ago to create libtool files for recipes that don't use Autotools.

This is a cumbersome method, since we have to specify the dependencies by hand, so we should move to an automated method in the future; perhaps by using pkg-config files. But this bug is not a blocker for moving Cerbero to Meson.
Comment 2 Xavier Claessens 2018-07-19 11:24:30 UTC
I think this is blocker because it means manually generating a libtool file for each plugin, that's a lot of work too.
Comment 3 Matthew Waters (ystreet00) 2018-11-01 08:55:21 UTC
Not so much a blocker anymore as plugin .la are automatically generated.  libs however are not and still need .la files generated.
Comment 4 Xavier Claessens 2018-11-01 11:28:16 UTC
Indeed it's not blocked anymore. We don't generate .la for libs? We could easily do it.
Comment 5 GStreamer system administrator 2018-11-03 10:22:36 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/cerbero/issues/49.