Opened 10 years ago

Closed 9 years ago

#3713 closed defect (invalid)

Make for Android

Reported by: bad_access Owned by:
Priority: critical Component: General
Severity: high Keywords:
Cc: Sensitive: no

Description

I want make latest oscam build for android device..

I use android-ndk-r9d NDK for android and oscam SVN 9659.

But cannot compile, have any error... (If try oscam SVN 8339 build success)

module-webif-lib.c: In function 'get_stats_linux':
module-webif-lib.c:655:2: warning: implicit declaration of function 'sysinfo' [-Wimplicit-function-declaration]

....

oscam-cache.c:41:2: error: unknown type name 'pthread_rwlock_t'
oscam-cache.c:61:1: error: unknown type name 'pthread_rwlock_t'
oscam-cache.c: In function 'init_cache':
oscam-cache.c:67:2: warning: implicit declaration of function 'pthread_rwlock_init' [-Wimplicit-function-declaration]
oscam-cache.c: In function 'check_is_pushed':
oscam-cache.c:85:2: warning: implicit declaration of function 'pthread_rwlock_rdlock' [-Wimplicit-function-declaration]
oscam-cache.c:94:3: warning: implicit declaration of function 'pthread_rwlock_unlock' [-Wimplicit-function-declaration]
oscam-cache.c:95:3: warning: implicit declaration of function 'pthread_rwlock_wrlock' [-Wimplicit-function-declaration]
oscam-cache.c: In function 'cleanup_cache':
oscam-cache.c:419:6: warning: implicit declaration of function 'pthread_rwlock_destroy' [-Wimplicit-function-declaration]
oscam-cache.c: At top level:
oscam-cache.c:467:1: error: unknown type name 'pthread_rwlock_t'
make[1]: * [build/arm-linux-androideabi/oscam-cache.o] Error 1
make:
* [all] Error 2

Change History (6)

comment:1 by gf, 10 years ago

Looks OK to me using defconfig:

gf@gf:~/git/oscam$ make android
make --no-print-directory \
        LIB_RT= \
        LIB_PTHREAD= \
        CROSS=/opt/cross/android-ndk-r9c/bin/arm-linux-androideabi- \

+-------------------------------------------------------------------------------
| OSCam ver: 1.20-unstable_svn rev: 9659 target: arm-linux-androideabi
| Tools:
|  CROSS    = /opt/cross/android-ndk-r9c/bin/arm-linux-androideabi-
|  CC       = /opt/cross/android-ndk-r9c/bin/arm-linux-androideabi-gcc
| Settings:
|  CONF_DIR = /usr/local/etc
|  CC_OPTS  = -O2 -ggdb -pipe -ffunction-sections -fdata-sections
|  CC_WARN  = -W -Wall -Wshadow -Wredundant-decls -Wstrict-prototypes -Wold-style-definition
|  CFLAGS   = 
|  LDFLAGS  = -Wl,--gc-sections
|  LIBS     = -ldl
|  UseFlags = 
| Config:
|  Addons   : WEBIF TOUCH HAVE_DVBAPI IRDETO_GUESSING CS_ANTICASC WITH_DEBUG MODULE_MONITOR WITH_LB CS_CACHEEX CW_CYCLE_CHECK CLOCKFIX WEBIF_LIVELOG WEBIF_JQUERY
|  Protocols: CAMD35 CAMD35_TCP NEWCAMD CCCAM CCCSHARE GBOX RADEGAST SERIAL CONSTCW PANDORA GHTTP
|  Readers  : NAGRA IRDETO CONAX CRYPTOWORKS SECA VIACCESS VIDEOGUARD DRE TONGFANG BULCRYPT GRIFFIN DGCRYPT
|  CardRdrs : PHOENIX INTERNAL SC8IN1 MP35 SMARGO DB2COM STAPI STINGER
|  Compiler : arm-linux-androideabi-gcc (GCC) 4.6 20120106 (prerelease)
|  Binary   : Distribution/oscam-1.20-unstable_svn9659-arm-linux-androideabi
+-------------------------------------------------------------------------------
GEN     webif/pages.c
GEN     Compressed 360936 template bytes into 149087 bytes. 211849 saved bytes (58.69%).
CC      cscrypt/aes.c
CC      cscrypt/bn_add.c
CC      cscrypt/bn_asm.c
CC      cscrypt/bn_ctx.c
CC      cscrypt/bn_div.c
CC      cscrypt/bn_exp.c
CC      cscrypt/bn_lib.c
CC      cscrypt/bn_mul.c
CC      cscrypt/bn_print.c
CC      cscrypt/bn_shift.c
CC      cscrypt/bn_sqr.c
CC      cscrypt/bn_word.c
CC      cscrypt/mem.c
CC      cscrypt/des.c
CC      cscrypt/i_cbc.c
CC      cscrypt/i_ecb.c
CC      cscrypt/i_skey.c
CC      cscrypt/md5.c
CC      cscrypt/rc6.c
CC      cscrypt/sha1.c
CC      csctapi/atr.c
CC      csctapi/icc_async.c
CC      csctapi/io_serial.c
CC      csctapi/protocol_t0.c
CC      csctapi/protocol_t1.c
CC      csctapi/ifd_db2com.c
CC      csctapi/ifd_mp35.c
CC      csctapi/ifd_phoenix.c
CC      csctapi/ifd_sc8in1.c
CC      csctapi/ifd_sci.c
CC      csctapi/ifd_smargo.c
CC      csctapi/ifd_stinger.c
CC      minilzo/minilzo.c
CC      module-anticasc.c
CC      module-cacheex.c
CC      module-camd35.c
CC      module-cccam.c
CC      module-cccshare.c
CC      module-constcw.c
CC      module-csp.c
CC      module-cw-cycle-check.c
CC      module-dvbapi.c
CC      module-gbox-helper.c
CC      module-gbox.c
CC      module-ird-guess.c
CC      module-monitor.c
CC      module-newcamd.c
CC      module-pandora.c
CC      module-ghttp.c
CC      module-radegast.c
CC      module-serial.c
CC      module-stat.c
CC      module-webif-lib.c
CC      module-webif-tpl.c
CC      module-webif.c
CC      webif/pages.c
CC      reader-common.c
CC      reader-bulcrypt.c
CC      reader-conax.c
CC      reader-cryptoworks.c
CC      reader-dgcrypt.c
CC      reader-dre.c
CC      reader-griffin.c
CC      reader-irdeto.c
CC      reader-nagra.c
CC      reader-seca.c
CC      reader-tongfang.c
CC      reader-viaccess.c
CC      reader-videoguard-common.c
CC      reader-videoguard1.c
CC      reader-videoguard12.c
CC      reader-videoguard2.c
CC      oscam-aes.c
CC      oscam-hashtable.c
CC      oscam-cache.c
CC      oscam-chk.c
CC      oscam-client.c
CC      oscam-conf.c
CC      oscam-conf-chk.c
CC      oscam-conf-mk.c
CC      oscam-config-account.c
CC      oscam-config-global.c
CC      oscam-config-reader.c
CC      oscam-config.c
CC      oscam-ecm.c
CC      oscam-emm.c
CC      oscam-failban.c
CC      oscam-files.c
CC      oscam-garbage.c
CC      oscam-lock.c
CC      oscam-log.c
CC      oscam-log-reader.c
CC      oscam-net.c
CC      oscam-llist.c
CC      oscam-reader.c
CC      oscam-simples.c
CC      oscam-string.c
CC      oscam-time.c
CC      oscam-work.c
CC      oscam.c
CONF    build/arm-linux-androideabi/config.c
LINK    Distribution/oscam-1.20-unstable_svn9659-arm-linux-androideabi.debug
STRIP   Distribution/oscam-1.20-unstable_svn9659-arm-linux-androideabi

comment:2 by bad_access, 10 years ago

I try with r9C but see same error.

root@debian:/var/cardserver/oscam-svn# make --no-print-directory LIB_RT= LIB_PTHREAD= CROSS=/tmp/android/bin/arm-linux-androideabi-
+-------------------------------------------------------------------------------
| OSCam ver: 1.20-unstable_svn rev: 9659 target: arm-linux-androideabi
| Tools:
|  CROSS    = /tmp/android/bin/arm-linux-androideabi-
|  CC       = /tmp/android/bin/arm-linux-androideabi-gcc
| Settings:
|  CONF_DIR = /usr/local/etc
|  CC_OPTS  = -O2 -ggdb -pipe -ffunction-sections -fdata-sections
|  CC_WARN  = -W -Wall -Wshadow -Wredundant-decls -Wstrict-prototypes -Wold-style-definition
|  CFLAGS   =
|  LDFLAGS  = -Wl,--gc-sections
|  LIBS     = -ldl
|  UseFlags =
| Config:
|  Addons   : WEBIF TOUCH HAVE_DVBAPI IRDETO_GUESSING CS_ANTICASC WITH_DEBUG MODULE_MONITOR WITH_LB CS_CACHEEX CW_CYCLE_CHECK CLOCKFIX WEBIF_LIVELOG WEBIF_JQUERY
|  Protocols: CAMD35 CAMD35_TCP NEWCAMD CCCAM CCCSHARE GBOX RADEGAST SERIAL CONSTCW PANDORA GHTTP
|  Readers  : NAGRA IRDETO CONAX CRYPTOWORKS SECA VIACCESS VIDEOGUARD DRE TONGFANG BULCRYPT GRIFFIN DGCRYPT
|  CardRdrs : PHOENIX INTERNAL SC8IN1 MP35 SMARGO DB2COM STAPI STINGER
|  Compiler : arm-linux-androideabi-gcc (GCC) 4.6 20120106 (prerelease)
|  Binary   : Distribution/oscam-1.20-unstable_svn9659-arm-linux-androideabi
+-------------------------------------------------------------------------------
CC      oscam-cache.c
oscam-cache.c:41:2: error: unknown type name 'pthread_rwlock_t'
oscam-cache.c:61:1: error: unknown type name 'pthread_rwlock_t'
oscam-cache.c: In function 'init_cache':
oscam-cache.c:67:2: warning: implicit declaration of function 'pthread_rwlock_init' [-Wimplicit-function-declaration]
oscam-cache.c: In function 'check_is_pushed':
oscam-cache.c:85:2: warning: implicit declaration of function 'pthread_rwlock_rdlock' [-Wimplicit-function-declaration]
oscam-cache.c:94:3: warning: implicit declaration of function 'pthread_rwlock_unlock' [-Wimplicit-function-declaration]
oscam-cache.c:95:3: warning: implicit declaration of function 'pthread_rwlock_wrlock' [-Wimplicit-function-declaration]
oscam-cache.c: In function 'cleanup_cache':
oscam-cache.c:419:6: warning: implicit declaration of function 'pthread_rwlock_destroy' [-Wimplicit-function-declaration]
oscam-cache.c: At top level:
oscam-cache.c:467:1: error: unknown type name 'pthread_rwlock_t'
make[1]: *** [build/arm-linux-androideabi/oscam-cache.o] Error 1
make: *** [all] Error 2

Last edited 10 years ago by bad_access (previous) (diff)

comment:3 by gf, 10 years ago

Please check your NDK installation. I'm testing with r9c and everything works, I can't reproduce this.

pthread_rwlock_t *should* be defined in pthread.h (POSIX rules). pthread.h is included in globals.h, globals.h is included in oscam-cache.c, so everything should be working.

If your NDK misses pthread_rwlock_t definition there is little we can do, you should complain to the NDK authors, there is no bug in Oscam.

comment:5 by bad_access, 10 years ago

I use this command for make toolchains.

build/tools/make-standalone-toolchain.sh --toolchain=arm-linux-androideabi-4.6 --arch=arm --platform=android-15 --install-dir=/tmp/android

And now compile oscam without any problem.

comment:6 by gf, 9 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.