[Bug 788273] fix build failure for Android Nougat

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Oct 19 10:12:11 UTC 2017


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

--- Comment #8 from Justin J. Kim <justin.joy.9to5 at gmail.com> ---
I tried to build from clone again to be sure what I was doing correctly.
If I use `-I<NDK path>/sysroot/usr/include` (not <NDK
path>/platforms/android-xx/), cebero fails to build in iconv, gnutls.

iconv.

```
aarch64-linux-android-gcc -fuse-ld=gold -DHAVE_CONFIG_H -DEXEEXT=\"\" -I. -I..
-I../lib  -I../intl -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1
--sysroot=/Users/justin/git/cerbero/build/android-ndk-r15c/platforms/android-24/arch-arm64
-I/Users/justin/git/cerbero/build/android-ndk-r15c/platforms/android-24/arch-arm64/usr/include
-DANDROID -DPIC  -Wall -g -Os
--sysroot=/Users/justin/git/cerbero/build/android-ndk-r15c/platforms/android-24/arch-arm64
-I/Users/justin/git/cerbero/build/android-ndk-r15c/sysroot/usr/include
-I/Users/justin/git/cerbero/build/android-ndk-r15c/platforms/android-24/arch-arm64/usr/include
-ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes
-fPIC -DANDROID -DPIC -Wa,--noexecstack -c allocator.c
In file included from
/Users/justin/git/cerbero/build/android-ndk-r15c/sysroot/usr/include/malloc.h:22:0,
                 from
/Users/justin/git/cerbero/build/android-ndk-r15c/sysroot/usr/include/stdlib.h:36,
                 from ./stdlib.h:35,
                 from allocator.c:4:
./stdio.h:1010:1: error: 'gets' undeclared here (not in a function)
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
 ^
make[2]: *** [allocator.o] Error 1
make[1]: *** [all] Error 2
make: *** [all] Error 2
```

gnutls
```
random.c:36:1: error: invalid initializer
 static atomic_uint rnd_initialized = 0;
 ^
In file included from random.c:26:0:
random.c: In function '_gnutls_rnd_init':
random.c:40:15: error: wrong type argument to unary exclamation mark
  if (unlikely(!rnd_initialized)) {
               ^
gnutls_int.h:77:42: note: in definition of macro 'unlikely'
 #define unlikely(x)    __builtin_expect((x), 0)
                                          ^
random.c:42:20: error: incompatible types when assigning to type 'atomic_uint'
from type 'int'
    rnd_initialized = 1;
                    ^
random.c:47:7: error: wrong type argument to unary exclamation mark
   if (!rnd_initialized) {
       ^
random.c:53:20: error: incompatible types when assigning to type 'atomic_uint'
from type 'int'
    rnd_initialized = 1;
                    ^
random.c: In function '_gnutls_rnd_deinit':
random.c:110:6: error: used struct type value where scalar is required
  if (rnd_initialized && _gnutls_rnd_ops.deinit != NULL) {
      ^
random.c:113:18: error: incompatible types when assigning to type 'atomic_uint'
from type 'int'
  rnd_initialized = 0;
                  ^
random.c: In function 'gnutls_rnd_refresh':
random.c:165:6: error: used struct type value where scalar is required
  if (rnd_initialized && _gnutls_rnd_ops.rnd_refresh)
      ^
make[4]: *** [random.lo] Error 1
```

It seems to be caused because NDK headers have different definitions than usual
headers. For Android N, FSETLOCKING should be disabled in gettext.

But, still I wonder what is 'libintl-stub'?

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