Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Alejandro_B_
Beginner
136 Views

Missing symbols in Android

Good afternoon.

I'm linking some libs we are developing for Android with libimf.a but I'm getting these errors:

/home/public/projects/android/ndk-linux-r9d-standalone/api-9/x86/bin/i686-linux-android-c++  -I../../../include -I../../../../fn/include  -I../../../../img/include -I../../../../comm/include  -DHAVE_PTHREADS -DIPP -D_REENTRANT -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS -I/home/public/projects/android/ipp-8.1.0.003/include -ffor-scope -Wall -W -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -fstrict-aliasing -Woverloaded-virtual    -fPIC -ffunction-sections -fdata-sections -fexceptions -fsigned-char  -O3 -fdiagnostics-show-option -fomit-frame-pointer  android/gcc/i686/imagerotation.o ../../../../fn/lib/android/gcc/i686/libfn.a /home/public/projects/android/3rd-party/cryptopp-5.6.2/lib/ndk-r9d/android/gcc/i686/libcrypt.a /home/public/projects/android/3rd-party/ipp-8.1.0.003/lib/i686/libippi.a /home/public/projects/android/3rd-party/ipp-8.1.0.003/lib/i686/libipps.a /home/public/projects/android/3rd-party/ipp-8.1.0.003/lib/i686/libippcore.a /home/public/projects/android/3rd-party/ipp-8.1.0.003/lib/i686/libimf.a /home/public/projects/android/3rd-party/ipp-8.1.0.003/lib/i686/libirc.a /home/public/projects/android/3rd-party/LibJPEG-90/lib/ndk-r9d/android/gcc/i686/libjpeg.a /home/public/projects/android/3rd-party/LibPNG-1.5.12/lib/ndk-r9d/android/gcc-4.8/i686/libpng.a /home/public/projects/android/3rd-party/CharLS-82415/lib/ndk-r9d/android/gcc/i686/libCharLS.a /home/public/projects/android/3rd-party/LibJASPER-1.900.1/lib/ndk-r9d/android/gcc/i686/libjasper.a /home/public/projects/android/3rd-party/LibTIFF-4.0.2/lib/ndk-r9d/android/gcc/i686/libtiff.a /home/public/projects/android/3rd-party/ZLib-1.2.7/lib/ndk-r9d/android/gcc/i686/libz.a   -o android/gcc/i686/imagerotation  -Wl,--gc-sections   -lm -ldl -lgnustl_shared

 

/home/public/projects/android/3rd-party/ipp-8.1.0.003/lib/i686/libimf.a(libm_error.o):real/libm_error.c:function write_message: error: undefined reference to 'catgets'
/home/public/projects/android/3rd-party/ipp-8.1.0.003/lib/i686/libimf.a(libm_error.o):real/libm_error.c:function write_message: error: undefined reference to 'stderr'
/home/public/projects/android/3rd-party/ipp-8.1.0.003/lib/i686/libimf.a(libm_error.o):real/libm_error.c:function write_message: error: undefined reference to 'catopen'
/home/public/projects/android/3rd-party/ipp-8.1.0.003/lib/i686/libimf.a(libm_error.o):real/libm_error.c:function write_message: error: undefined reference to 'catopen'
/home/public/projects/android/3rd-party/ipp-8.1.0.003/lib/i686/libimf.a(libm_error.o):real/libm_error.c:function write_message: error: undefined reference to 'stderr'
/home/public/projects/android/3rd-party/ipp-8.1.0.003/lib/i686/libimf.a(libm_error.o):real/libm_error.c:function __libm_error_support: error: undefined reference to '__errno_location'
collect2: error: ld returned 1 exit status

As far as I know __errno_location doesn't even belong to Android. Adding a cxx-stl/llvm-libc++/libs/x86/libc++_static.a I can get rid of the catgets and catopen errors, but stderr remains and I haven't found an Android lib containing it, as opposed to the libc linux libs.

Compilation chain uses the same include/libpath, despite it should be irrelevant as the problem comes from libimf.a. I'm using a single function from ippi (ippiRotate_32f_C1R), so I'm including #include <ippi.h> in the source. Trying to link without libimf would deal into:

/home/public/projects/android/3rd-party/ipp-8.1.0.003/lib/i686/libippi.a(pirotate_g9---ownpi_Rotate.o):pirotate_g9---ownpi_Rotate.i:function g9_ownpi_Rotate: error: undefined reference to '__libm_sse2_sincos'
/home/public/projects/android/3rd-party/ipp-8.1.0.003/lib/i686/libippi.a(pirotate_w7---ownpi_Rotate.o):pirotate_w7---ownpi_Rotate.i:function w7_ownpi_Rotate: error: undefined reference to '__libm_sse2_sincos'
/home/public/projects/android/3rd-party/ipp-8.1.0.003/lib/i686/libippi.a(pirotate_s8---ownpi_Rotate.o):pirotate_s8---ownpi_Rotate.i:function s8_ownpi_Rotate: error: undefined reference to '__libm_sse2_sincos'
/home/public/projects/android/3rd-party/ipp-8.1.0.003/lib/i686/libippi.a(pirotate_h9---ownpi_Rotate.o):pirotate_h9---ownpi_Rotate.i:function h9_ownpi_Rotate: error: undefined reference to '__libm_sse2_sincos'
collect2: error: ld returned 1 exit status

 

Am I doing something wrong? Is it a bug in the ipp support in Android?

All the best,

Alejandro.

0 Kudos
3 Replies
Pavel_B_Intel1
Employee
136 Views

Hi Alejandro,

I suggest you to update IPP 8.1 to IPP 8.1.1 - we removed dependances on Intel compiler runtime.

Pavel

Alejandro_B_
Beginner
136 Views

That made the trick.

Is Intel releasing different RC for each compiler and architecture or only per architecture and including ICC symbols was accidental?

Pavel_B_Intel1
Employee
136 Views

I'm sorry I don't have information about Intel compiler for Android, I'm working for IPP project :-)

By the way you can try to resolve all undefined symbols by using libstlport library, you can find it in the NDK: sources/cxx-stl/stlport/libs folder.

Pavel

Reply