Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade NDK to the version 9d #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions config.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
system=$(uname -s | tr 'DL' 'dl')-$(uname -m)
gcc_version=4.6
toolchain=arm-linux-androideabi-$gcc_version
platform=android-14
platform=android-16
PYTHONPATH=/opt/ros/indigo/lib/python2.7/dist-packages:$PYTHONPATH
# Enable this value for debug build
CMAKE_BUILD_TYPE=Debug
# Enable this if you need to use pluginlib in Android.
# The plugins will be statically linked
use_pluginlib=1

5 changes: 2 additions & 3 deletions create_android_mk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ rm -rf $CMAKE_PREFIX_PATH/find_libs
mkdir -p $CMAKE_PREFIX_PATH/find_libs
cp $my_loc/files/FindLibrariesCMakeLists.txt $CMAKE_PREFIX_PATH/find_libs/CMakeLists.txt
cd $CMAKE_PREFIX_PATH/find_libs
cmake ../find_libs -DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;$ANDROID_NDK/platforms/android-14/arch-arm/usr/lib" \
cmake ../find_libs -DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;$ANDROID_NDK/platforms/android-16/arch-arm/usr/lib" \
-DALL_PACKAGES="$package_list"

# Read the output file to get the paths of all of the libraries
full_library_list=$(cat $CMAKE_PREFIX_PATH/find_libs/libraries.txt)

# Parse this libraries (separated by ;), skip all libraries that start with the second argument paths (separated by ;)
lib_output=$($my_loc/parse_libs.py $full_library_list $ANDROID_NDK/platforms/android-14/arch-arm/usr/lib)
lib_output=$($my_loc/parse_libs.py $full_library_list $ANDROID_NDK/platforms/android-16/arch-arm/usr/lib)

# Go to the output library directory
if [ ! -d $2 ]; then
Expand All @@ -50,4 +50,3 @@ if [ $use_pluginlib -ne 0 ]; then
else
cat $my_loc/files/tfa/Android.mk.in2 >> ./Android.mk
fi

6 changes: 3 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ RUN wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | s
RUN apt-get update && apt-get install --no-install-recommends -y ros-indigo-ros-base python-wstool

# Install Android NDK
RUN wget http://dl.google.com/android/ndk/android-ndk-r8e-linux-x86_64.tar.bz2
RUN tar -jxvf android-ndk-r8e-linux-x86_64.tar.bz2 -C /opt
RUN wget http://dl.google.com/android/ndk/android-ndk-r9d-linux-x86_64.tar.bz2
RUN tar -jxvf android-ndk-r9d-linux-x86_64.tar.bz2 -C /opt

# Set-up environment
ENV ANDROID_NDK /opt/android-ndk-r8e
ENV ANDROID_NDK /opt/android-ndk-r9d

# Install g++ to avoid "CMAKE_CXX_COMPILER-NOTFOUND was not found." error
RUN apt-get update && apt-get install -y g++ cmake make
Expand Down
4 changes: 2 additions & 2 deletions files/move_base_app/jni/Application.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#NDK_TOOLCHAIN_VERSION=4.4.3
APP_STL := gnustl_static
APP_PLATFORM := android-14
APP_ABI := armeabi-v7a
APP_PLATFORM := android-16
APP_ABI := armeabi-v7a
4 changes: 2 additions & 2 deletions files/sample_app/jni/Application.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#NDK_TOOLCHAIN_VERSION=4.4.3
APP_STL := gnustl_static
APP_PLATFORM := android-14
APP_ABI := armeabi-v7a
APP_PLATFORM := android-16
APP_ABI := armeabi-v7a