Hello,
i am new to program applications for the i.MX6SL. I have a c++ application which needs boost. I have compiled boost for a different board. On this board works android 2.3 and it works fine. For that i could find a howto. But on the i.MX6SL board is a different operating system. If i test it with
cat /proc/version
i get
Linux version 3.0.15-ts-armv7l (andrew@gumshoe) (gcc version 4.6.3 (Timesys 20120611) ) #11 SMP PREEMPT Wed Aug 15 15:54:17 EDT 2012
I tried to compile boost in the way i have done it for the android board but that doesn't work. So maybe there is someone who has experiences in compiling boost for that os.
I have done it in the following way.
First i prepared the ubuntu computer with the cross compiler.
- sudo add-apt-repository ppa:linaro-maintainers/toolchain
- sudo apt-get update
- sudo apt-get install gcc-arm-linux-gnueabi
- sudo apt-get install g++-arm-linux-gnueabi
Then i downloaded the NDK from the android homepage and installed it.
I downloaded the boost ( version (1.49) and installed it. I changed the following files:
tools/build/v2/user-config.jam
user-config.jam
--------------------------
import os ;
if [ os.name ] = CYGWIN || [ os.name ] = NT
{
androidPlatform = windows ;
}
else if [ os.name ] = LINUX
{
androidPlatform = linux-x86 ;
}
else if [ os.name ] = MACOSX
{
androidPlatform = darwin-x86 ;
}
modules.poke : NO_BZIP2 : 1 ;
ANDROID_NDK = ../.. ;
using gcc : android4.4.3 :
/home/markus-delpy/android_ndk/android-ndk-r8c/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++ :
<compileflags>--sysroot=/home/markus-delpy/android_ndk/android-ndk-r8c/platforms/android-9/arch-arm
<compileflags>-mthumb
<compileflags>-Os
<compileflags>-fno-strict-aliasing
<compileflags>-O2
<compileflags>-DNDEBUG
<compileflags>-g
<compileflags>-lstdc++
<compileflags>-I/home/markus-delpy/android_ndk/android-ndk-r8c/sources/cxx-stl/gnu-libstdc++/4.4.3/include
<compileflags>-I/home/markus-delpy/android_ndk/android-ndk-r8c/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi/include
<compileflags>-D__GLIBC__
<compileflags>-DBOOST_NO_INTRINSIC_WCHAR_T
<compileflags>-DBOOST_FILESYSTEM_VERSION=2
<archiver>/home/markus-delpy/android_ndk/android-ndk-r8c/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-ar
<ranlib>/home/markus-delpy/android_ndk/android-ndk-r8c/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-ranlib
Then i changed the file libs/filesystem/v2/src/v2_operations.cpp
# if !defined(__APPLE__) && !defined(__OpenBSD__)
# include <sys/statvfs.h>
# define BOOST_STATVFS statvfs
# define BOOST_STATVFS_F_FRSIZE vfs.f_frsize
# else
#ifdef __OpenBSD__
# include <sys/param.h>
#endif
in the following:
# if !defined(__APPLE__) && !defined(__OpenBSD__) && !defined(__ANDROID__)
# include <sys/statvfs.h>
# define BOOST_STATVFS statvfs
# define BOOST_STATVFS_F_FRSIZE vfs.f_frsize
# else
#ifdef __OpenBSD__
# include <sys/param.h>
#elif defined(__ANDROID__)
# include <sys/vfs.h>
#endif
I tried to compile it then with
./bjam --without-python --disable-filesystem3 toolset=gcc-android4.4.3 link=static runtime-link=static target-os=linux --stagedir=android
But during the compilation the following error occurs:
sh: 1: /home/markus-delpy/android_ndk/android-ndk-r8c/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++: not found
sh: 1: /home/markus-delpy/android_ndk/android-ndk-r8c/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++: not found
sh: 1: /home/markus-delpy/android_ndk/android-ndk-r8c/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++: not found
sh: 1: /home/markus-delpy/android_ndk/android-ndk-r8c/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++: not found
I have controlled the PATH variable and all other environment variables but i can't find the mistake.
Thanks for your help
markus