cerbero jni compilation __register_atfork problem

Andrew Esh andrew.esh at qterics.com
Fri Jun 28 13:16:48 UTC 2019


Do you have the API specific library path as a -L argument to your linker?
Here's what I found:

andrewes at ubuntu:~/Android/Sdk/ndk/20.0.5594570/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/23$
for file in * ; do echo $file; objdump -x $file | grep register_atfork; done
crtbegin_dynamic.o
0000000000000000         *UND* 0000000000000000 __register_atfork
0000000000000080 UNKNOWN           __register_atfork
crtbegin_so.o
0000000000000000         *UND* 0000000000000000 __register_atfork
0000000000000044 UNKNOWN           __register_atfork
crtbegin_static.o
0000000000000000         *UND* 0000000000000000 __register_atfork
0000000000000080 UNKNOWN           __register_atfork
...
libc.a
  4 .text.__register_atfork 0000009c  0000000000000000  0000000000000000
 00000128  2**2
  5 .text.__unregister_atfork 000000a0  0000000000000000  0000000000000000
 000001c4  2**2
0000000000000000 l       .text.__register_atfork 0000000000000000 $x.3
0000000000000000 l       .text.__unregister_atfork 0000000000000000 $x.4
...
libc.so
000000000000d144 g     F .text 0000000000000004
 __register_atfork

(Note the path in my CLI prompt.) So, linking with either one of those
files will provide the symbol. Perhaps you are getting your libc.so from
another place?

On Fri, Jun 28, 2019 at 6:49 AM Carl Blake <carlb at williamsav.com> wrote:

> I have an android app being compiled with gstreamer.  When I use
> gstreamer 1.16.0 from the download I'm able to compile the app without
> any problems.  When I attempt to use gstreamer compiled using cerbero
> (1.16.0) I get the following compilation error:
>
> Build command failed.
> Error while executing process /home/cdb/Android/Sdk/ndk-bundle/ndk-
> build with arguments {NDK_PROJECT_PATH=null
> APP_BUILD_SCRIPT=/home/cdb/WaveCAST_Receiver/app/jni/Android.mk
> NDK_APPLICATION_MK=/home/cdb/WaveCAST_Receiver/app/jni/Application.mk
> APP_ABI=x86_64 NDK_ALL_ABIS=x86_64 NDK_DEBUG=1 APP_PLATFORM=android-23
> NDK_OUT=/home/cdb/WaveCAST_Receiver/app/build/intermediates/ndkBuild/de
> bug/obj
> NDK_LIBS_OUT=/home/cdb/WaveCAST_Receiver/app/build/intermediates/ndkBui
> ld/debug/lib NDK_APPLICATION_MK=jni/Application.mk
> GSTREAMER_JAVA_SRC_DIR=src GSTREAMER_ROOT_ANDROID=/opt/gstreamer-1.0-
> android-universal-1.16.0-wav GSTREAMER_ASSETS_DIR=src/assets
> /home/cdb/WaveCAST_Receiver/app/build/intermediates/ndkBuild/debug/obj/
> local/x86_64/libgststart.so}
> [x86_64] Compile        : gststart <= gststart.c
> [x86_64] Compile++      : gststart <= dummy.cpp
> GStreamer      : [GEN] => gst-build-x86_64/gstreamer_android.c
> GStreamer      : [COMPILE] => gst-build-x86_64/gstreamer_android.c
> GStreamer      : [LINK] => gst-build-x86_64/libgstreamer_android.so
>
> /home/cdb/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-
> x86_64/sysroot/usr/lib/x86_64-linux-
> android/23/crtbegin_so.o:crtbegin_so.c:function pthread_atfork: error:
> undefined reference to '__register_atfork'
> clang++: error: linker command failed with exit code 1 (use -v to see
> invocation)
> make: *** [buildsharedlibrary_x86_64] Error 1
>
> I'm using android studio 3.3.1.
>
> Does anybody have any ideas why this might be happening?
>
> Carl
>
>
> _______________________________________________
> gstreamer-android mailing list
> gstreamer-android at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-android



-- 
Andrew Esh
Senior Software Engineer
Qterics
612-564-2580
www.qterics.com
<http://www.nielsen.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-android/attachments/20190628/cf814cca/attachment.html>


More information about the gstreamer-android mailing list