<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="text-align:left; direction:ltr;">
<div>I switched to using ndk 19, but openh264 won't compile with it. I had the same problem when I used the ndk in android studio and I had to hack the ndk's configuration to get it to compile. I'm using the 1.16.0 branch of cerbero. Is there a simpler change
that can be done to fix this?</div>
<div><br>
</div>
<div>On Tue, 2019-07-02 at 19:30 +0000, Carl Blake wrote:</div>
<blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">
<div>I managed to get my system to compile gstreamer using cerbero while linked to the android studio ndk r19. Unfortunately, I get the same error I reported before when I compile my app in android studio.</div>
<div><br>
</div>
<div>I'm not certain what to do at this point. I've checked the android studio logs and everything looks right. It looks like it's finding the ndk libraries and the gstreamer libraries; it's just having this problem with __register_atfork.</div>
<div><br>
</div>
<div>I'll look at changing cerbero to use ndk 19 per your suggestion.</div>
<div><br>
</div>
<div>Carl</div>
<div><br>
</div>
<div>On Tue, 2019-07-02 at 13:20 -0500, Andrew Esh wrote:</div>
<blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">
<div dir="ltr">I am in the midst of updating Cerbero to use NDK r20. Here is the change I made to update which NDK is being used by Cerbero. You would have to do the same this with NDK 19.
<div><br>
</div>
<div><a href="https://gitlab.freedesktop.org/andrewes/cerbero/commit/963f7b3ba859e029050b6d7f815e9be89774f821">https://gitlab.freedesktop.org/andrewes/cerbero/commit/963f7b3ba859e029050b6d7f815e9be89774f821</a><br>
</div>
<div><br>
</div>
<div>NOTE: The checksums in cerbero/bootstrap/android.py are sha256sum. You would have to supply the sha256sum for the NDK 19 file(s) you reference in that file.</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Jul 2, 2019 at 11:45 AM Carl Blake <<a href="mailto:carlb@williamsav.com">carlb@williamsav.com</a>> wrote:<br>
</div>
<blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">
I'm pretty sure I'm linking to libc, or at least I am when I use<br>
gstreamer 1.16.0 downloaded binaries. The problem occurs when I use<br>
gstreamer 1.16.0 compiled using cerbero.<br>
<br>
I'm having some difficulty figuring out what libraries are being linked<br>
because of how android studio hides things. I'm looking through make<br>
files to try and figure it out.<br>
<br>
I think part of the problem is that android studio is using ndk r19 and<br>
gstreamer compiled with cerbero wants to use ndk r18. I attempted to<br>
change android studio to use the ndk r18 cerbero is using, but then I<br>
couldn't get anything to link. For example, android studio could no<br>
longer even find crtbegin_so.o. So now I'm trying to get cerbero to<br>
compile using android studio's ndk r19.<br>
<br>
I didn't think this would be this difficult. I suspect I have<br>
something wrong with my setup.<br>
<br>
----------------------------------------------------<br>
<br>
Andrew Esh andrew.esh at <a href="http://qterics.com" rel="noreferrer" target="_blank">
qterics.com</a> wrote:<br>
<br>
Do you have the API specific library path as a -L argument to your<br>
linker?<br>
Here's what I found:<br>
<br>
andrewes at<br>
ubuntu:~/Android/Sdk/ndk/20.0.5594570/toolchains/llvm/prebuilt/linux-<br>
x86_64/sysroot/usr/lib/aarch64-linux-android/23$<br>
for file in * ; do echo $file; objdump -x $file | grep register_atfork;<br>
done<br>
crtbegin_dynamic.o<br>
0000000000000000 *UND* 0000000000000000 __register_atfork<br>
0000000000000080 UNKNOWN __register_atfork<br>
crtbegin_so.o<br>
0000000000000000 *UND* 0000000000000000 __register_atfork<br>
0000000000000044 UNKNOWN __register_atfork<br>
crtbegin_static.o<br>
0000000000000000 *UND* 0000000000000000 __register_atfork<br>
0000000000000080 UNKNOWN __register_atfork<br>
...<br>
libc.a<br>
4 .text.__register_atfork<br>
0000009c 0000000000000000 0000000000000000<br>
00000128 2**2<br>
5 .text.__unregister_atfork<br>
000000a0 0000000000000000 0000000000000000<br>
000001c4 2**2<br>
0000000000000000 l .text.__register_atfork 0000000000000000 $x.3<br>
0000000000000000 l .text.__unregister_atfork 0000000000000000<br>
$x.4<br>
...<br>
libc.so<br>
000000000000d144 g F .text 0000000000000004<br>
__register_atfork<br>
<br>
(Note the path in my CLI prompt.) So, linking with either one of those<br>
files will provide the symbol. Perhaps you are getting your libc.so<br>
from<br>
another place?<br>
<br>
On Fri, Jun 28, 2019 at 6:49 AM Carl Blake <carlb at <a href="http://williamsav.com" rel="noreferrer" target="_blank">
williamsav.com</a>><br>
wrote:<br>
<br>
> I have an android app being compiled with gstreamer. When I use<br>
> gstreamer 1.16.0 from the download I'm able to compile the app<br>
without<br>
> any problems. When I attempt to use gstreamer compiled using cerbero<br>
> (1.16.0) I get the following compilation error:<br>
><br>
> Build command failed.<br>
> Error while executing process /home/cdb/Android/Sdk/ndk-bundle/ndk-<br>
> build with arguments {NDK_PROJECT_PATH=null<br>
> APP_BUILD_SCRIPT=/home/cdb/WaveCAST_Receiver/app/jni/Android.mk<br>
> NDK_APPLICATION_MK=/home/cdb/WaveCAST_Receiver/app/jni/Application.mk<br>
> APP_ABI=x86_64 NDK_ALL_ABIS=x86_64 NDK_DEBUG=1 APP_PLATFORM=android-<br>
23<br>
><br>
NDK_OUT=/home/cdb/WaveCAST_Receiver/app/build/intermediates/ndkBuild/de<br>
> bug/obj<br>
><br>
NDK_LIBS_OUT=/home/cdb/WaveCAST_Receiver/app/build/intermediates/ndkBui<br>
> ld/debug/lib NDK_APPLICATION_MK=jni/Application.mk<br>
> GSTREAMER_JAVA_SRC_DIR=src GSTREAMER_ROOT_ANDROID=/opt/gstreamer-1.0-<br>
> android-universal-1.16.0-wav GSTREAMER_ASSETS_DIR=src/assets<br>
><br>
/home/cdb/WaveCAST_Receiver/app/build/intermediates/ndkBuild/debug/obj/<br>
> local/x86_64/libgststart.so}<br>
> [x86_64] Compile : gststart <= gststart.c<br>
> [x86_64] Compile++ : gststart <= dummy.cpp<br>
> GStreamer : [GEN] => gst-build-x86_64/gstreamer_android.c<br>
> GStreamer : [COMPILE] => gst-build-x86_64/gstreamer_android.c<br>
> GStreamer : [LINK] => gst-build-x86_64/libgstreamer_android.so<br>
><br>
> /home/cdb/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-<br>
> x86_64/sysroot/usr/lib/x86_64-linux-<br>
> android/23/crtbegin_so.o:crtbegin_so.c:function pthread_atfork:<br>
error:<br>
> undefined reference to '__register_atfork'<br>
> clang++: error: linker command failed with exit code 1 (use -v to see<br>
> invocation)<br>
> make: *** [buildsharedlibrary_x86_64] Error 1<br>
><br>
> I'm using android studio 3.3.1.<br>
><br>
> Does anybody have any ideas why this might be happening?<br>
><br>
> Carl<br>
><br>
><br>
> _______________________________________________<br>
> gstreamer-android mailing list<br>
> gstreamer-android at <a href="http://lists.freedesktop.org" rel="noreferrer" target="_blank">
lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-android" rel="noreferrer" target="_blank">
https://lists.freedesktop.org/mailman/listinfo/gstreamer-android</a><br>
<br>
<br>
<br>
<pre>_______________________________________________</pre>
<pre>gstreamer-android mailing list</pre>
<pre><a href="mailto:gstreamer-android@lists.freedesktop.org">gstreamer-android@lists.freedesktop.org</a></pre>
<pre><a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-android">https://lists.freedesktop.org/mailman/listinfo/gstreamer-android</a></pre>
</blockquote>
</div>
</blockquote>
</blockquote>
</body>
</html>