[Bug 794770] New: Meson: Stop depending on libtool to make android static link

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Mar 28 15:24:17 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=794770

            Bug ID: 794770
           Summary: Meson: Stop depending on libtool to make android
                    static link
    Classification: Platform
           Product: GStreamer
           Version: 1.12.x
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: cerbero
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: xclaesse at gmail.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

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

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list