[Bug 737429] Android runtime contains libs with rpath

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Nov 21 18:53:57 UTC 2016


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

--- Comment #23 from Andrew Esh <andrew.c.esh at gmail.com> ---
I ran into this problem in a cerbero build which was getting an extended SONAME
reference in libz.so during the zlib build. To solve it, I changed the m4 macro
within the project directory prior to building anything that depended on libz.
The change formats the soname so it does not collide with the system libz.so.

NOTE: The each of the next globs of text are one line.

sed -i
"s/soname_spec='\$libname\$release\$shared_ext'/soname_spec='libqda\`echo
\$name\$release\$shared_ext\`'/g" build/build-tools/share/aclocal/libtool.m4

$CERBERO_EXE -c config/$CONFIG buildone libjpeg-turbo

Once libjpeg-turbo is built, and picks up the libqda version of the soname, I
change libz back to what it was:

sed -i "s/soname_spec='libqda\`echo
\$name\$release\$shared_ext\`'/soname_spec='\$libname\$release\$shared_ext'/g"
build/build-tools/share/aclocal/libtool.m4

$CERBERO_EXE -c config/$CONFIG build zlib

Then, the libtool file is updated and copied into the sysroot to point all the
other dependents to the altered library:

NDK_SYSROOT=$ANDROID_NDK_ROOT-$ANDROID_NDK_ARCH-$ANDROID_NDK_API

sed -i 's@^libdir.*@libdir='"$NDK_SYSROOT"'/sysroot/usr/lib at g'
build/dist/$DISTDIR/lib/libz.la

cp build/dist/$DISTDIR/lib/libz.la $NDK_SYSROOT/sysroot/usr/lib

Because the new library name does not collide, the code which adds the full
path to the soname is not triggered.

-- 
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