Android support

Asked by matthew on 2013-03-18

Hello,

I was wondering if ROHC is currently supported on android platforms, or if anyone out there has worked with porting rohc and using it with android applications.

Thank you.

Question information

Language:
English Edit question
Status:
Answered
For:
rohc Edit question
Assignee:
No assignee Edit question
Last query:
2013-03-18
Last reply:
2013-03-25

Hello Matthew,

I successfully built the ROHC library on Android some time ago. I don't remember exactly if I needed to change something or not. Anyway if some changes were needed, they were small. It was for Android 2.2 and ROHC 1.4.x, so situation may have changed since.

If you encounteer problems, tell me. If you need to change something, send me patches please.

Regards,
Didier

matthew (xcalibre0) said : #2

Thanks for your effort.

By the way, have you heard of http://code.google.com/p/librohc/ thoe doubango project? It looks like it contains an ROHC portion, but I'm not sure if it's a full implementation or just the standard.

Yes, I know it. There is no code for the ROHC part as far as I can see.

Regards,
Didier

matthew (xcalibre0) said : #4

Would you mind making that android port available, even if it's just the .mk files?

Matthew,

> Would you mind making that android port available, even if it's just the .mk files?

There is no android port on my own. I did some testing for fun some time ago. No more.

I dug a little bit in my archives a few minutes ago. I found how I tested the build. I tested it again. The dev branch builds without any modification (the portability work done for BSD and Windows made this possible, I think).

To avoid losing those information again, I made a new wiki page about that topic. See http://rohc-lib.org/wiki/doku.php?id=library-install-sources#cross-compilation_for_android_arm_on_unix-like_systems

I also updated the page that lists supported systems to report android/bionic as working:
http://rohc-lib.org/wiki/doku.php?id=supported-systems

I hope it will help you.

Regards,
Didier

I forgot to add that there is no .mk files for Android. My howto uses the autotools build system. If you want to integrate the ROHC library into the Android build system, it's up to you to create the needed .mk file(s).

I cannot help you directly on that part as I never used the Android build system. If you succeed in creating them, I'm willing to integrate them in the ROHC library.

Regards,
Didier

matthew (xcalibre0) said : #7

When you say you tested this build, did you load it on the android emulator and/or device and run the simple rohc test app?

> When you say you tested this build, did you load it on the android emulator
> and/or device and run the simple rohc test app?

The first time I played with ROHC on Android, I tested it with an Android 2.2
device. It worked fine. When I wrote the howto, I didn't tested it again.

Regards,
Didier

matthew (xcalibre0) said : #9

Hmm I run through your process on the HowTo and I get the following results that are quite strange

./build.sh
Running aclocal... done
Running libtoolize... done
Running autoconf... done
Running autoheader... done
Running automake... done
configure: WARNING: unrecognized options: --disable-linux-kernel-module
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-linux-androideabi-strip... arm-linux-androideabi-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking how to create a pax tar archive... gnutar
checking build system type... x86_64-unknown-linux-gnu
checking host system type... arm-unknown-linux-androideabi
checking for style of include used by make... GNU
checking for arm-linux-androideabi-gcc... ///opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8d/platforms/android-8/arch-arm/
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether ///opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8d/platforms/android-8/arch-arm/ accepts -g... yes
checking for ///opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8d/platforms/android-8/arch-arm/ option to accept ISO C89... none needed
checking dependency style of ///opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8d/platforms/android-8/arch-arm/... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by ///opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8d/platforms/android-8/arch-arm/... ///opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8d/platforms/android-8/arch-arm/
checking if the linker (///opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8d/platforms/android-8/arch-arm/) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... //opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin//arm-linux-androideabi-nm -B
checking the name lister (//opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin//arm-linux-androideabi-nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1966080
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for ///opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8d/platforms/android-8/arch-arm/ option to reload object files... -r
checking for arm-linux-androideabi-objdump... arm-linux-androideabi-objdump
checking how to recognize dependent libraries... pass_all
checking for arm-linux-androideabi-ar... arm-linux-androideabi-ar
checking for arm-linux-androideabi-strip... (cached) arm-linux-androideabi-strip
checking for arm-linux-androideabi-ranlib... arm-linux-androideabi-ranlib
checking command to parse //opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin//arm-linux-androideabi-nm -B output from ///opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8d/platforms/android-8/arch-arm/ object... ok
checking how to run the C preprocessor... ///opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8d/platforms/android-8/arch-arm/ -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if ///opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8d/platforms/android-8/arch-arm/ supports -fno-rtti -fno-exceptions... no
checking for ///opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8d/platforms/android-8/arch-arm/ option to produce PIC... -fPIC -DPIC
checking if ///opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8d/platforms/android-8/arch-arm/ PIC flag -fPIC -DPIC works... yes
checking if ///opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8d/platforms/android-8/arch-arm/ static flag -static works... yes
checking if ///opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8d/platforms/android-8/arch-arm/ supports -c -o file.o... yes
checking if ///opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8d/platforms/android-8/arch-arm/ supports -c -o file.o... (cached) yes
checking whether the ///opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8d/platforms/android-8/arch-arm/ linker (///opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8d/platforms/android-8/arch-arm/) supports shared libraries... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... unsupported
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for arm-linux-androideabi-gcc... (cached) ///opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8d/platforms/android-8/arch-arm/
checking whether we are using the GNU C compiler... (cached) yes
checking whether ///opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8d/platforms/android-8/arch-arm/ accepts -g... (cached) yes
checking for ///opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8d/platforms/android-8/arch-arm/ option to accept ISO C89... (cached) none needed
checking dependency style of ///opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8d/platforms/android-8/arch-arm/... (cached) gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking winsock2.h usability... no
checking winsock2.h presence... no
checking for winsock2.h... no
checking linux/if_tun.h usability... yes
checking linux/if_tun.h presence... yes
checking for linux/if_tun.h... yes
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking for inline... inline
checking whether byte ordering is bigendian... no
checking for ///opt/android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86//bin/arm-linux-androideabi-gcc --sysroot=/opt/android-ndk-r8d/platforms/android-8/arch-arm/ option to accept ISO C99... -std=gnu99
checking for malloc... yes
checking for calloc... yes
checking for free... yes
checking for memcpy... yes
checking for memcmp... yes
checking for ntohl... no
checking for htonl... no
checking for ntohs... no
checking for htons... no
checking for sched_setscheduler... yes
checking how many arguments sched_setscheduler takes... 3
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking host system type... (cached) arm-unknown-linux-androideabi
checking whether the compiler computes bit-field lengths as expected... yes
./configure: line 15743: syntax error near unexpected token `else'
./configure: line 15743: `else'
make: *** No rule to make target `clean'. Stop.

Please look at line 15743 in the configure script to see what's the problem.

You seem to test with a 1.4.x or 1.5.x version. I tested with the main dev branch.

Regards,
Didier

Can you help with this problem?

Provide an answer of your own, or ask matthew for more information if necessary.

To post a message you must log in.