p=config.git;a=blob_plain;f=config.sub;hb=HEAD'
或者:
[root@localhost libiconv-1.14]# locate config.guess
/opt/gcc-4.9.0/config.guess
[root@localhost libiconv-1.14]# cp /opt/gcc-4.9.0/config.guess /opt/gcc-4.9.0/config.sub build-aux/
[root@localhost libiconv-1.14]# cp /opt/gcc-4.9.0/config.guess /opt/gcc-4.9.0/config.sub libcharset/build-aux/
//[root@localhost libiconv-1.14]# gl_cv_header_working_stdint_h=yes ./configure --host=arm-linux-androideabi
[root@localhost libiconv-1.14]# gl_cv_header_working_stdint_h=yes ./configure --host=arm-linux-androideabi --enable-static --disable-shared
[root@localhost libiconv-1.14]# make -j5
[root@localhost libiconv-1.14]# find . -name libiconv.a
./lib/.libs/libiconv.a
//複製庫文件(arm)
[root@localhost libiconv-1.14]# cp ./lib/.libs/libiconv.a /opt/cBPM-android/criteria-lin/lib
[root@localhost libiconv-1.14]# cp ./lib/.libs/libiconv.so* /opt/cBPM-android/criteria-lin/lib
[root@localhost libiconv-1.14]# cp /usr/lib64/libWorkflowEngineD.so /opt/cBPM-android/criteria-lin/lib
[root@localhost libiconv-1.14]# cp /usr/lib64/libLibraries.so /opt/cBPM-android/criteria-lin/lib
+++++++++++++編譯Criteria.Tools.Executor錯誤
/opt/cBPM-android/criteria-lin/lib/libxerces-c.a(IconvTransService.o):IconvTransService.cpp:function xercesc_3_1::IconvLCPTranscoder::calcRequiredSize(char const*, xercesc_3_1::MemoryManager*): error: undefined reference to '__ctype_get_mb_cur_max'
解決方法:+++++++++++++ 在上面基礎上,編譯libiconv (靜態庫)
這彷佛是NDK的BUG。在stdlib.h內有宣告出__ctype_get_mb_cur_max函數,但是卻沒有去實做它。假設出現這個問題,不建議直接改動NDK。要到libiconv目錄下,改動「libcharset/lib」目錄裡的「localcharset.c」檔案,在檔案最如下加上如下程式碼就能夠。html
[root@localhost libiconv-1.14]# gedit /opt/cBPM-android/libiconv-1.14/libcharset/lib/localcharset.c
size_t __ctype_get_mb_cur_max(void){
return 1;
}
保存。又一次編譯libiconv (靜態庫)
[root@localhost libiconv-1.14]# nm ./lib/.libs/libiconv.a |grep ctype_get_mb_cur_max
U __ctype_get_mb_cur_max
0000060c T __ctype_get_mb_cur_max
//假設您指定了 -A 選項,則 nm 命令僅僅報告與該文件有關的或者庫或者對象名。
[root@localhost libiconv-1.14]# nm -A ./lib/.libs/libiconv.a|grep ctype_get_mb_cur_max
./lib/.libs/libiconv.a:iconv.o: U __ctype_get_mb_cur_max
./lib/.libs/libiconv.a:localcharset.o:0000060c T __ctype_get_mb_cur_max
[root@localhost libiconv-1.14]#
[root@localhost criteria-lin]# nm -A lib/lib* |grep ctype_get_mb_cur_max
nm: lib/libc.so:無符號
lib/libiconv.a:iconv.o: U __ctype_get_mb_cur_max
lib/libiconv.a:localcharset.o:0000060c T __ctype_get_mb_cur_max
lib/libiconv.so: U __ctype_get_mb_cur_max
lib/libiconv.so.2: U __ctype_get_mb_cur_max
lib/libiconv.so.2.5.1: U __ctype_get_mb_cur_max
nm: lib/libsqlite.so:無符號
nm: lib/libstdc++.so:無符號
lib/libxerces-c-3.1.so: U __ctype_get_mb_cur_max
lib/libxerces-c.a:IconvTransService.o: U __ctype_get_mb_cur_max
因此,編譯Criteria.Tools.Executor時。需要 靜態連接 /opt/cBPM-android/criteria-lin/lib/libiconv.a
+++++++++++++
+++++++++++++編譯xerces-c-3.1.2(動態庫)—CentOS 7— android-ndk
export XERCES="/opt/cBPM-android/xerces-c-3.1.2/"
export NDK="/opt/android-on-linux/android-ndk-r8e/"
export SYSROOT="$NDK/platforms/android-14/arch-arm"
export CC="$NDK/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc"
export CXX="$NDK/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++"
export CFLAGS="--sysroot=$SYSROOT"
export LDFLAGS="--sysroot=$SYSROOT -nostdlib -L$NDK/sources/cxx-stl/stlport/libs/armeabi-v7a -L$SYSROOT/usr/lib -L/opt/cBPM-android/criteria-lin/lib -liconv -lstdc++ -lstlport -lc"
export CPPFLAGS="-fPIC -I$NDK/sources/cxx-stl/stlport/stlport -I$NDK/platforms/android-14/arch-arm/usr/include -I$NDK/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/include -I$NDK/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.7/include-fixed -I$NDK/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.7/include -I$XERCES/src/xercesc/xinclude -I$XERCES/tests/src/xinclude -I$XERCES/tests/src/xinclude/tests/xinclude"
// -nostdlib -Xlinker -R$SYSROOT/usr/lib $SYSROOT/usr/lib/crtbegin_static.o $SYSROOT/usr/lib/crtend_android.o
// ls /opt/android-on-linux/android-ndk-r8e/sources/cxx-stl/stlport/libs/armeabi-v7a
// libstlport_shared.so libstlport.so libstlport_static.a thumb
[root@localhost xerces-c-3.1.2]# ./configure --host=arm-linux-androideabi --enable-static --disable-shared --enable-transcoder-iconv
錯誤:configure: error: Xerces cannot function without a transcoder
解決方法例如如下:
//編譯靜態庫
[root@localhost xerces-c-3.1.2]# ac_cv_func_iconv_open=yes ac_cv_func_iconv_close=yes ac_cv_func_mblen=yes ac_cv_func_wcstombs=yes ac_cv_func_mbstowcs=yes ac_cv_func_iconv=yes ./configure --host=arm-linux-androideabi --enable-static --disable-shared --enable-transcoder-iconv
[root@localhost xerces-c-3.1.2]# make -j5
//編譯動態庫
[root@localhost xerces-c-3.1.2]# gl_cv_header_working_stdint_h=yes ac_cv_func_iconv_open=yes ac_cv_func_iconv_close=yes ac_cv_func_mblen=yes ac_cv_func_wcstombs=yes ac_cv_func_mbstowcs=yes ac_cv_func_iconv=yes ./configure --host=arm-linux-androideabi --enable-transcoder-iconv
[root@localhost xerces-c-3.1.2]# make -j5
錯誤及解決方法:
錯誤:
xercesc/util/PlatformUtils.cpp:713:4: error: #error No timing support is configured for this platform.
stricmp.c:37:3: error: #error Need implementation of stricmp compatibility function
strnicmp.c:37:3: error: #error Need implementation of strnicmp compatibility function
解決方法。在 config.h 加如下一行
#define HAVE_GETTIMEOFDAY 1
#define HAVE_STRCASECMP 1
#define HAVE_STRNCASECMP 1
錯誤:
towupper.h conflicting declaration of C function 'int towupper(int)'
解決方法
towlower.h、towupper.h凝視例如如下:
//extern int towlower(int wc);
//extern int towupper(int wc);
錯誤:
arm-linux-androideabi-g++: error: crtbegin_so.o: No such file or directory
arm-linux-androideabi-g++: error: crtend_so.o: No such file or directory
緣由是ld找不到 crtbegin_so.o 和 crteng_so.o,
解決方法,在項目源代碼如下創建軟鏈接
ln -s /opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/crtbegin_so.o src
ln -s /opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/crtend_so.o src
//成功編譯動態庫
[root@localhost xerces-c-3.1.2]# find . -name libxerces-c-3.1.so
./src/.libs/libxerces-c-3.1.so
//複製庫文件(arm)
[root@localhost xerces-c-3.1.2]# cp ./src/.libs/libxerces-c-3.1.so /opt/cBPM-android/criteria-lin/lib
步驟(問題)8:
+++++++++++++ 在上面基礎上,編譯xerces-c (靜態庫)
編譯xerces-c (靜態庫)—CentOS 7— android-ndk
[root@localhost xerces-c-3.1.2]# pwd
/opt/cBPM-android/xerces-c-3.1.2
[root@localhost xerces-c-3.1.2]# make clean
export XERCES="/opt/cBPM-android/xerces-c-3.1.2/"
export NDK_ROOT="/opt/android-on-linux/android-ndk-r8e"
export SYSROOT="$NDK_ROOT/platforms/android-14/arch-arm"
export CFLAGS="-g --sysroot=$SYSROOT --pipe -I$NDK_ROOT/sources/cxx-stl/stlport/stlport -I$NDK_ROOT/platforms/android-14/arch-arm/usr/include -I$NDK_ROOT/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/include -I$NDK_ROOT/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.7/include-fixed -I$NDK_ROOT/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.7/include -I/opt/cBPM-android/libiconv-1.14/include"
export CPPFLAGS="$CFLAGS"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="-L$NDK_ROOT/sources/cxx-stl/stlport/libs/armeabi-v7a -L/opt/cBPM-android/criteria-lin/lib -static -lstlport_static -liconv -lgcc -lc"
export CPATH="$NDK_ROOT/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin"
export CPP="$CPATH/arm-linux-androideabi-cpp"
export CXX="$CPATH/arm-linux-androideabi-g++"
export CC="$CPATH/arm-linux-androideabi-gcc"
export LD="$CPATH/arm-linux-androideabi-ld"
export AR="$CPATH/arm-linux-androideabi-ar"
-liconv
--sysroot=$SYSROOT
------------------使用這條命令
[root@localhost xerces-c-3.1.2]# ./configure --host="arm-linux-eabi" --enable-static --disable-shared --enable-transcoder-iconv
出現錯誤
configure: error: Xerces cannot function without a transcoder
解決方法
[root@localhost xerces-c-3.1.2]# grep HAVE_ICONV_CLOSE -R .
./config.h.in:#undef HAVE_ICONV_CLOSE
[root@localhost libiconv-1.14]# pwd
/opt/cBPM-android/libiconv-1.14
[root@localhost libiconv-1.14]# cp include/iconv.h ../xerces-c-3.1.2/src/
------------------而後,使用這條命令
[root@localhost xerces-c-3.1.2]# ac_cv_func_iconv_open=yes ac_cv_func_iconv_close=yes ac_cv_func_mblen=yes ac_cv_func_wcstombs=yes ac_cv_func_mbstowcs=yes ac_cv_func_iconv=yes ./configure --host="arm-linux-eabi" --enable-static --disable-shared --enable-transcoder-iconv --with-iconv=/opt/cBPM-android/libiconv-1.14
------------------
[root@localhost xerces-c-3.1.2]# make -j5
[root@localhost xerces-c-3.1.2]# cp ./src/.libs/libxerces-c.a /opt/cBPM-android/criteria-lin/lib
至此。成功編譯 xerces-c-3.1.2 靜態庫
-----------------假設遇到錯誤,參考如下內容
/opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/include
/opt/android-on-linux/android-ndk-r8e/sources/cxx-stl/stlport/stlport
/opt/android-on-linux/android-ndk-r8e/sources/cxx-stl/gabi++/include
/opt/android-on-linux/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.7/include
/opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib
/opt/android-on-linux/android-ndk-r8e/sources/cxx-stl/stlport/libs/armeabi-v7a
/opt/android-on-linux/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi
-----------------------
[root@localhost lib]# cd /opt/android-on-linux/android-ndk-r10d/
[root@localhost android-ndk-r10d]# ls ndk-build
ndk-build
[root@localhost android-ndk-r10d]# export PATH=$PATH:/opt/android-on-linux/android-ndk-r10d/
[root@localhost android-ndk-r10d]# cd /opt/cBPM-android/commandergenius-sdl_android/project/jni/xerces
[root@localhost xerces]# pwd
/opt/cBPM-android/commandergenius-sdl_android/project/jni/xerces
[root@localhost xerces]# ndk-build
find: ‘/opt/cBPM-android/commandergenius-sdl_android/project/jni/../jni/application//src’: 沒有那個文件或文件夾
Android NDK: WARNING:/opt/cBPM-android/commandergenius-sdl_android/project/jni/../jni/application/Android.mk:application: non-system libraries in linker flags: -ltremor
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
[armeabi] SharedLibrary : libapplication.so
/opt/android-on-linux/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: error: cannot find -ltremor
collect2: error: ld returned 1 exit status
make: *** [/opt/cBPM-android/commandergenius-sdl_android/project/obj/local/armeabi/libapplication.so] Error 1
[root@localhost xerces]# ls /opt/cBPM-android/commandergenius-sdl_android/project/obj/local/armeabi/
libogg.a libsdl-1.2.so libsdl_native_helpers.so libtremor.a objs
[root@localhost xerces]# cp /opt/cBPM-android/commandergenius-sdl_android/project/obj/local/armeabi/libtremor.a /opt/android-on-linux/android-ndk-r10d/platforms/android-21/arch-arm/usr/lib/
-----------------------
// -nostdlib -Xlinker -R$SYSROOT/usr/lib $SYSROOT/usr/lib/crtbegin_static.o $SYSROOT/usr/lib/crtend_android.o
// ls /opt/android-on-linux/android-ndk-r8e/sources/cxx-stl/stlport/libs/armeabi-v7a
// libstlport_shared.so libstlport.so libstlport_static.a thumb
[root@localhost xerces-c-3.1.2]# ./configure --host=arm-linux-androideabi --enable-static --disable-shared --enable-transcoder-iconv
錯誤:configure: error: Xerces cannot function without a transcoder
解決方法例如如下:
//編譯靜態庫
[root@localhost xerces-c-3.1.2]# ac_cv_func_iconv_open=yes ac_cv_func_iconv_close=yes ac_cv_func_mblen=yes ac_cv_func_wcstombs=yes ac_cv_func_mbstowcs=yes ac_cv_func_iconv=yes ./configure --host=arm-linux-androideabi --enable-static --disable-shared --enable-transcoder-iconv
[root@localhost xerces-c-3.1.2]# make -j5
錯誤:
xercesc/util/PlatformUtils.cpp:713:4: error: #error No timing support is configured for this platform. You must configure it.
解決方法,在 config.h 加如下一行
#define HAVE_GETTIMEOFDAY 1
#define HAVE_STRCASECMP 1
#define HAVE_STRNCASECMP 1
//成功編譯靜態庫
[root@localhost xerces-c-3.1.2]# find . -name libxerces-c.a
./src/.libs/libxerces-c.a
//複製庫文件(arm)
[root@localhost xerces-c-3.1.2]# cp ./src/.libs/libxerces-c.a /opt/cBPM-android/criteria-lin/lib
+++++++++++++編譯Criteria.Tools.Executor錯誤
xercesc/util/XMLAbstractDoubleFloat.cpp:430: error: undefined reference to 'localeconv'
解決方法:+++++++++++++ 在上面基礎上,編譯xerces-c (靜態庫)
[root@localhost xerces-c-3.1.2]# pwd
/opt/cBPM-android/xerces-c-3.1.2
[root@localhost xerces-c-3.1.2]# find . -name XMLAbstractDoubleFloat.cpp
./src/xercesc/util/XMLAbstractDoubleFloat.cpp
[root@localhost xerces-c-3.1.2]# gedit ./src/xercesc/util/XMLAbstractDoubleFloat.cpp
// lconv* lc = localeconv();
// char delimiter = *lc->decimal_point;
char delimiter = '.'; //把localeconv()調用給繞過去了
保存,又一次編譯xerces-c (靜態庫)
+++++++++++++
步驟(問題)9:
+++++++++++++編譯Criteria.Tools.Executor錯誤
/opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.7/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lmysqlclient
解決方法: 使用 SQLite 替換 MySQL。 CodeBlocks中,Linker Settings:mysqlclient 替換爲 sqlite
********---------------------------********
[root@localhost criteria-lin]# gedit ./src/Criteria/Criteria.Libraries.bOS/SQL/bOSSQLConnectionManager.cpp
將
#include "bOSmySQLConnection.h"
#include "bOSmySQLConnectionData.h"
using namespace bOS::SQL::mySQL;
#ifdef _USE_SQLITE3_
#include "bOSSQLiteConnection.h"
#include "bOSSQLiteConnectionData.h"
using namespace bOS::SQL::SQLite3;
#endif
改動爲
#ifdef _USE_MYSQL_
#include "bOSmySQLConnection.h"
#include "bOSmySQLConnectionData.h"
using namespace bOS::SQL::mySQL;
#endif
#ifdef _USE_SQLITE3_
#include "bOSSQLiteConnection.h"
#include "bOSSQLiteConnectionData.h"
using namespace bOS::SQL::SQLite3;
#endif
********---------------------------********
[root@localhost criteria-lin]# gedit ./include/bOS/bOSSQLConnectionManager.h
將
enum DataBaseType
{
ODBC_INTERFACE,
SQLITE3,
MYSQL
};
改動爲
enum DataBaseType
{
CONN,
MYSQL,
ODBC_INTERFACE,
SQLITE3,
FILESYSTEM
};
********---------------------------********
所有 和 MYSQL 相關 代碼,使用例如如下:
#ifdef _MYSQL_
...
#endif
實際僅僅涉及一個文件: ./src/Criteria/Criteria.Libraries.bOS/SQL/bOSSQLConnectionManager.cpp
比較完全的方法:
[root@localhost criteria-lin]# mv ./include/bOS/mySQL ./include/bOS/mySQL-not-use
[root@localhost criteria-lin]# mv ./src/Criteria/Criteria.Libraries.bOS/SQL/mySQL/ ./src/Criteria/Criteria.Libraries.bOS/SQL/mySQL-not-use
另外,src/Criteria/Criteria.Libraries.bOS/Libraries.bOS.cbp,中刪除例如如下內容:
<Unit filename="SQL/mySQL/bOSmySQLConnection.cpp" />
<Unit filename="SQL/mySQL/bOSmySQLConnection.h" />
<Unit filename="SQL/mySQL/bOSmySQLConnectionData.cpp" />
<Unit filename="SQL/mySQL/bOSmySQLConnectionData.h" />
<Unit filename="SQL/mySQL/bOSmySQLResultSet.cpp" />
<Unit filename="SQL/mySQL/bOSmySQLResultSet.h" />
<Unit filename="SQL/mySQL/bOSmySQLResultSetField.cpp" />
<Unit filename="SQL/mySQL/bOSmySQLResultSetField.h" />
<Unit filename="SQL/mySQL/bOSmySQLResultSetMetaData.cpp" />
<Unit filename="SQL/mySQL/bOSmySQLResultSetMetaData.h" />
步驟(問題)10:
********---------------------------編譯參數 設置********codeblocks 全局參數 設置:
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Compiler Settings】->【Other options】
空
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Compiler Settings】->【#defines】
空
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Linker Settings】->【Link libraries】
空
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Search directories】->【Compiler】
空
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Search directories】->【Linker】
空
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Toolchain executable】->【compiler Installation directory】
/opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/
arm-linux-androideabi-gcc
arm-linux-androideabi-g++
arm-linux-androideabi-g++
arm-linux-androideabi-ar
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Build options】->【處理器數】4
********---------------------------******** 全局參數 設置:權宜之計。實現 靜態庫的編譯:
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Other Settings】->【Advanced options】->【Commands】->【Link object files to dynamic library】
將
$linker -shared $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs
改動爲
$lib_linker -r -s $static_output $link_objects
********---------------------------******** 全局參數 設置:權宜之計。實現 連接對象順序的正確,不然,編譯Criteria.Tools.Executor出錯
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Other Settings】->【Advanced options】->【Commands】->【Link object files to console executable】
將
$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs
改動爲
$linker $libdirs -o $exe_output /opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/crtbegin_static.o $link_objects $link_resobjects $link_options $libs /opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/crtend_android.o
主要是如下兩個文件的位置:
/opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/crtbegin_static.o
/opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/crtend_android.o
********---------------------------********
codeblocks 局部參數 設置: Criteria.Libraries.bOS
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Compiler Settings】->【Other options】
-W
-O0
-g3
-c
-fmessage-length=0
-fexceptions
默認狀況下,GNU工具鏈編譯過程當中。控制檯輸出的一行信息是不換行的,這樣。當輸出信息過長時(如編譯錯誤時的信息)。會致使你沒法看到完整的輸出信息。增長-fmessage-length=0後。輸出信息會依據控制檯的寬度本身主動換行。這樣就能看全輸出信息了。
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Compiler Settings】->【#defines】
_USE_SQLITE3_
SQLITE_OS_UNIX
WIN32
_DEBUG
_WINDOWS
_USRDLL
_CODEMANAGER_TRACE_ON_
BOS_EXPORTS
CODEMANAGER_EXPORTS
ANDROID
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Search directories】->【Compiler】
/opt/cBPM-android/criteria-lin/include/bOS/
/opt/android-on-linux/android-ndk-r8e/sources/cxx-stl/stlport/stlport
/opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/include
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Pre/post build steps】->【Post-build steps】
cp /opt/cBPM-android/criteria-lin/bin/Criteria/Debug/bOS/libLibraries.a /opt/cBPM-android/criteria-lin/lib/
右健單擊【Criteria.Libraries.bOS】。選擇【Properties】,設置見圖。
********---------------------------********
codeblocks 局部參數 設置: Criteria.WorkflowEngine
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Compiler Settings】->【Other options】
-W
-O0
-g3
-c
-fmessage-length=0
-fexceptions
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Compiler Settings】->【#defines】
WIN32
_DEBUG
_WINDOWS
_USRDLL
ENGINE_EXPORTS
WAPI_EXPORTS
_CODEMANAGER_TRACE_ON_
_USE_SQLITE3_
BOS_EXPORTS
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Search directories】->【Compiler】
/opt/cBPM-android/criteria-lin/include/WorkflowEngine
/opt/cBPM-android/criteria-lin/include/bOS/
/opt/android-on-linux/android-ndk-r8e/sources/cxx-stl/stlport/stlport
/opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/include
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Pre/post build steps】->【Post-build steps】
cp /opt/cBPM-android/criteria-lin/bin/Criteria/Debug/WorkflowEngine/libWorkflowEngineD.a /opt/cBPM-android/criteria-lin/lib/
右健單擊【Criteria.WorkflowEngine】,選擇【Properties】,設置見圖。node
********---------------------------********
codeblocks 局部參數 設置: Criteria.Tools.Executor
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Compiler Settings】->【Other options】
-W
-O0
-g3
-c
-fmessage-length=0
-fexceptions
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Compiler Settings】->【#defines】
WIN32
_DEBUG
_CONSOLE
_CODEMANAGER_TRACE_ON_
BOS_EXPORTS
ENGINE_EXPORTS
順序超級重要)》》》》》》》》》》(順序超級重要)《《《《《《《《《《《《《
codeblocks 局部參數 設置: Criteria.Tools.Executor
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Linker Settings】->【Link libraries】
WorkflowEngineD
Libraries
sqlite
xerces-c
iconv
stlport_static
m
gcc
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Linker Settings】->【Other linker options】
-static
-nostdlib
-Wl,-dy /opt/cBPM-android/criteria-lin/lib/libdl.so /opt/cBPM-android/criteria-lin/lib/libc.so -Wl,-dn
-Wl,-dy /opt/cBPM-android/criteria-lin/lib/libdl.so -Wl,-dn
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Search directories】->【Compiler】
/opt/cBPM-android/criteria-lin/include/bOS/
/opt/cBPM-android/criteria-lin/include/WorkflowEngine
/opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/include
/opt/android-on-linux/android-ndk-r8e/sources/cxx-stl/stlport/stlport
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Search directories】->【Linker】
/opt/cBPM-android/criteria-lin/lib
/opt/android-on-linux/android-ndk-r8e/sources/cxx-stl/stlport/libs/armeabi-v7a
/opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/
/opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.7/armv7-a/ //libgcc.a
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Pre/post build steps】->【Post-build steps】
cp /opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor/executer /opt/cBPM-android/criteria-lin/lib/
右健單擊【Criteria.WorkflowEngine】。選擇【Properties】,設置見圖。
至此,編譯Criteria.Tools.Executor成功。詳細見 步驟(問題)11:
+++++++++++++編譯Criteria.Tools.Executor出錯,參考如下內容
error: undefined reference to 'dlopen'
加入連接選項:
-Wl,-dy -ldl -Wl,-dn
-Wl,-dy -lgcc -lc -lstlport_static -lstdc++ -ldl -Wl,-dn
+++++++++++++編譯Criteria.Tools.Executor錯誤:
src/main.cpp:155: error: undefined reference to '__cxa_end_cleanup'
最後一行: return 0;
改動爲: exit(0);
----------------------------
arm-linux-androideabi-g++
-L/opt/cBPM-android/criteria-lin/lib -L/opt/android-on-linux/android-ndk-r8e/sources/cxx-stl/stlport/libs/armeabi-v7a -L/opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/ -L/opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.7/armv7-a/
-o /opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor/executer
/opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor/src/main.o
-static -nostdlib -Wl,-v -Wl,-dy -lc -ldl -lstlport -lstdc++ -Wl,-dn -lgcc -lsqlite -lxerces-c -lLibraries -lWorkflowEngineD
$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs
$linker $libdirs -o $exe_output $link_objects $link_resobjects crtbegin_static.o $link_options $libs crtend_android.o
arm-eabi-ld $(LDFLAGS) crtbegin_static.o $(OBJECTS) $(LIBS) crtend_android.o
-Wl,-v -Wl,-dy -lc -ldl -lstlport -lstdc++ -Wl,-dn
+++++++++++++編譯Criteria.Tools.Executor錯誤
CodeManager/CodeItem.cpp:96: error: undefined reference to 'std::ostrstream::str()'
正因爲 ostrstream 調用str()後需要本身清除存儲空間的不便,纔有了後來的ostringstream,對這個問題的改進,咱們沒必要須再負責清除存儲空間啦.
+++++++++++++編譯Criteria.Tools.Executor錯誤
bionic/libc/bionic/libc_logging.cpp:165: error: undefined reference to '__aeabi_uldivmod'
使用手機上的libc.so。不使用靜態庫
[root@localhost mb526-all-lib]# cp /opt/cBPM-android/mb526-all-lib/libc.so /opt/cBPM-android/criteria-lin/lib/
+++++++++++++編譯Criteria.Tools.Executor錯誤 困擾2天的錯誤
WAPI/WAPI.cpp:72: error: undefined reference to 'bOS::XML::XMLHelper::initialize()'
WAPI/WAPI.cpp:137: error: undefined reference to 'bOS::XML::XMLHelper::terminate()'
WAPI/WAPIProcess.cpp:37: error: undefined reference to 'bOS::XML::Data::XMLObject::getXMLString(unsigned int)'
WAPI/WAPIProcess.cpp:64: error: undefined reference to 'bOS::XML::Data::XMLObject::getXMLString(unsigned int)'
WAPI/WAPIProcess.cpp:92: error: undefined reference to 'bOS::XML::Data::XMLObject::getXMLString(unsigned int)'
...
engine/Workflow.cpp:175: error: undefined reference to 'bOS::Collections::Collection::clear()'
engine/Workflow.cpp:488: error: undefined reference to 'bOS::Collections::Collection::clear()'
engine/Workflow.cpp:672: error: undefined reference to 'bOS::Collections::Collection::clear()'
ExternalEvent/ManagedEventElement.cpp:73: error: undefined reference to 'bOS::XML::XMLAttribute::XMLAttribute()'
ExternalEvent/ManagedEventElement.cpp:74: error: undefined reference to 'bOS::XML::XMLAttribute::setName(char const*)'
ExternalEvent/ManagedEventElement.cpp:79: error: undefined reference to 'bOS::XML::XMLAttribute::setValue(char const*)'
ExternalEvent/ManagedEventElement.cpp:82: error: undefined reference to 'bOS::XML::XMLAttribute::setValue(char const*)'
ExternalEvent/ManagedEventElement.cpp:85: error: undefined reference to 'bOS::XML::XMLAttribute::setValue(char const*)'
collect2: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 1 second(s))
313 error(s), 0 warning(s) (0 minute(s), 1 second(s))
-----------------------------------
解決方法:(順序超級重要)(以前順序:Libraries、WorkflowEngineD)》》》》》(順序超級重要)《《《《《
codeblocks 局部參數 設置: Criteria.Tools.Executor
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Linker Settings】->【Link libraries】
WorkflowEngineD
Libraries
sqlite
xerces-c
iconv
stlport_static
m
gcc
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Linker Settings】->【Other linker options】
-static
-nostdlib
-Wl,-dy -ldl -lc -Wl,-dn
+++++++++++++編譯Criteria.Tools.Executor錯誤(不用看)
Utils/bOSUniqueID.cpp:22: error: undefined reference to 'srand'
Utils/bOSUniqueID.cpp:38: error: undefined reference to 'rand'
解決方法:
[root@localhost android-ndk-r10d]# gedit platforms/android-21/arch-arm/usr/include/stdlib.h
[root@localhost android-ndk-r10d]# gedit platforms/android-14/arch-arm/usr/include/stdlib.h
srand is defined as inline in: android-19/arch-arm/usr/include/stdlib.h
將定義 放到 android-21/arch-arm/usr/include/stdlib.h
+++++++++++++編譯Criteria.Tools.Executor錯誤
xercesc/util/XMLAbstractDoubleFloat.cpp:430: error: undefined reference to 'localeconv'
參考<<編譯xerces-c (靜態庫)>>
+++++++++++++編譯Criteria.Tools.Executor錯誤
xercesc/util/Transcoders/Iconv/IconvTransService.cpp:238: error: undefined reference to '__ctype_get_mb_cur_max'
需要 靜態連接 /opt/cBPM-android/criteria-lin/lib/libiconv.a
步驟(問題)11:
+++++++++++++編譯Criteria.Tools.Executor————成功
arm-linux-androideabi-g++ -W -O0 -g3 -c -fmessage-length=0 -fexceptions -DWIN32 -D_DEBUG -D_CONSOLE -D_CODEMANAGER_TRACE_ON_ -DBOS_EXPORTS -DENGINE_EXPORTS -I/opt/cBPM-android/criteria-lin/include/bOS -I/opt/cBPM-android/criteria-lin/include/WorkflowEngine -I/opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/include -I/opt/android-on-linux/android-ndk-r8e/sources/cxx-stl/stlport/stlport -c src/main.cpp -o /opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor/src/main.o
arm-linux-androideabi-g++ -L/opt/cBPM-android/criteria-lin/lib -L/opt/android-on-linux/android-ndk-r10d/sources/cxx-stl/stlport/libs/armeabi-v7a -L/opt/android-on-linux/android-ndk-r10d/platforms/android-16/arch-arm/usr/lib/ -L/opt/android-on-linux/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.6/armv7-a/ -o /opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor/executer /opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/crtbegin_static.o /opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor/src/main.o -static -nostdlib -Wl,-dy /opt/cBPM-android/criteria-lin/lib/libdl.so /opt/cBPM-android/criteria-lin/lib/libc.so -Wl,-dn -lWorkflowEngineD -lLibraries -lsqlite -lxerces-c -liconv -lstlport_static -lm -lgcc /opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/crtend_android.o
Output file is /opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor/executer with size 21.75 MB
Running target post-build steps
cp /opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor/executer /opt/cBPM-android/criteria-lin/lib/
Process terminated with status 0 (0 minute(s), 46 second(s))
0 error(s), 305 warning(s) (0 minute(s), 46 second(s))
步驟(問題)12:
+++++++++++++編譯Criteria.Tools.Executor————成功———測試
[root@localhost lib]# pwd
/opt/cBPM-android/criteria-lin/lib
[root@localhost lib]# ll executer
-rwxr-xr-x. 1 root root 22830836 9月 25 07:49 executer
[root@localhost lib]# adb root
bash: adb: 未找到命令...
類似命令是: 'gdb'
--------------------------------
[root@localhost platform-tools]# pwd
/opt/android-on-linux/android-sdk-linux/platform-tools
[root@localhost platform-tools]# ls adb
adb
[root@localhost platform-tools]#
將 PATH=$PATH:/opt/android-on-linux/android-sdk-linux/platform-tools 加入到 /root/.bashrc 最後。
[root@localhost lib]# adb root
bash: /opt/android-on-linux/android-sdk-linux/platform-tools/adb: /lib/ld-linux.so.2: bad ELF interpreter: 沒有那個文件或文件夾
[root@localhost lib]# yum install glibc.i686
[root@localhost lib]# adb root
adb: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
[root@localhost lib]# yum install libstdc++.so.6
--------------------------------
[root@localhost lib]# adb root
[root@localhost lib]# adb push executer /data/data/criteria
3352 KB/s (22209660 bytes in 6.469s)
[root@localhost lib]# adb root
[root@localhost lib]# adb shell
root@mb526:/ # export WF_HOME=/data/data/criteria; export CRITERIA_HOME=/data/data/criteria
root@mb526:/ # cd data/data/criteria/
root@mb526:/data/data/criteria # ./executer TestNotePad
/system/bin/sh: ./executer: No such file or directory
這是因爲系統的動態連接器與executer程序中動態連接器的名字或路徑不正確,運行例如如下命令:
[root@localhost lib]# pwd
/opt/cBPM-android/criteria-lin/lib
[root@localhost lib]# readelf -l executer
Elf 文件類型爲 EXEC (可運行文件)
入口點 0xb138
共同擁有 8 個程序頭,開始於偏移量52
程序頭:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
PHDR 0x000034 0x00008034 0x00008034 0x00100 0x00100 R 0x4
INTERP 0x000134 0x00008134 0x00008134 0x00013 0x00013 R 0x1
[正在請求程序解釋器:/usr/lib/libc.so.1]
LOAD 0x000000 0x00008000 0x00008000 0x526848 0x526848 R E 0x1000
LOAD 0x526ec8 0x0052fec8 0x0052fec8 0x33154 0x509b0 RW 0x1000
DYNAMIC 0x535cd8 0x0053ecd8 0x0053ecd8 0x000e8 0x000e8 RW 0x4
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0
EXIDX 0x466770 0x0046e770 0x0046e770 0x19900 0x19900 R 0x4
GNU_RELRO 0x526ec8 0x0052fec8 0x0052fec8 0x11138 0x11138 RW 0x8
Section to Segment mapping:
段節...
00
01 .interp
02 .interp .dynsym .dynstr .hash .rel.dyn .rel.plt .plt .text .note.android.ident .ARM.extab .ARM.exidx .rodata
03 .data.rel.ro.local .fini_array .init_array .preinit_array .data.rel.ro .dynamic .got .data .bss
04 .dynamic
05
06 .ARM.exidx
07 .data.rel.ro.local .fini_array .init_array .preinit_array .data.rel.ro .dynamic .got
[root@localhost lib]# objdump -x executer|grep NEEDED
NEEDED libdl.so
NEEDED libc.so
[root@localhost lib]#
[root@localhost lib]# pwd
/opt/cBPM-android/criteria-lin/lib
[root@localhost lib]# adb push executer /data/data/criteria
3352 KB/s (22209660 bytes in 6.469s)
[root@localhost lib]# adb root
[root@localhost lib]# adb shell
root@mb526:/ # cd data/data/criteria/
root@mb526:/data/data/criteria # ./executer TestNotePad
/system/bin/sh: ./executer: No such file or directory
root@mb526:/data/data/criteria # mount -o remount,rw /
root@mb526:/data/data/criteria # mkdir -p /usr/lib
root@mb526:/data/data/criteria # cp /system/lib/libc.so /system/lib/libdl.so /usr/lib/
root@mb526:/data/data/criteria # ./executer
/system/bin/sh: ./executer: No such file or directory
1|root@mb526:/data/data/criteria # ln -s /usr/lib/libc.so /usr/lib/libc.so.1
1|root@mb526:/data/data/criteria # ln -s /usr/lib/libdl.so /usr/lib/libdl.so.1
root@mb526:/data/data/criteria # ./executer
/system/bin/sh: ./executer: Permission denied
root@mb526:/data/data/criteria # ll /usr/lib/lib*
-rw-r--r-- root root 306604 2015-09-22 08:16 libc.so
lrwxrwxrwx root root 2015-09-22 08:17 libc.so.1 -> /usr/lib/libc.so
-rw-r--r-- root root 9348 2015-09-22 08:16 libdl.so
lrwxrwxrwx root root 2015-09-22 08:17 libdl.so.1 -> /usr/lib/libdl.so
root@mb526:/data/data/criteria # chmod 777 /usr/lib/lib*so
root@mb526:/data/data/criteria # ./executer TestNotePad
Illegal instruction
//這個錯誤代表咱們的程序運行了不對的指令。通常這樣的狀況是因爲咱們編譯起編譯出了較高版本號的ARM指令形成的。
//API level 21。NDK 10,arm_linux-androideabi-4.9
//個人手機,Android 4.4.4,ARMv7。---> API level 19,NDK 9,arm_linux-androideabi-4.6
//因此庫文件路徑: /opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/include
/opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/
// 上面過程 又一次 作一遍
//API level 19,NDK 9,arm_linux-androideabi-4.6,連接失敗
//API level 15,NDK 9。arm_linux-androideabi-4.8,Illegal instruction
//API level 19,NDK 10,arm_linux-androideabi-4.6,連接失敗
//API level 19,NDK 10。arm_linux-androideabi-4.8。Illegal instruction
//API level 16,NDK 10。arm_linux-androideabi-4.8,Illegal instruction
//API level 16,NDK 10,arm_linux-androideabi-4.6,error: cannot mix -static with dynamic object
//API level 14,NDK 8,arm_linux-androideabi-4.7,成功
------------------------------------------------------------------------------------------
如下是在手機上執行移植成功的cBPM-android
------------------------------------------------------------------------------------------
[root@localhost lib]# pwd
/opt/cBPM-android/criteria-lin/lib
[root@localhost lib]# adb push executer /data/data/criteria
3352 KB/s (22209660 bytes in 6.469s)
[root@localhost lib]# adb root
[root@localhost lib]# adb shell
root@mb526:/ # cd data/data/criteria/
root@mb526:/data/data/criteria # export WF_HOME=/data/data/criteria; export CRITERIA_HOME=/data/data/criteria
root@mb526:/data/data/criteria # ./executer TestNotePad
The program will perform the following steps:
1: Criteria session initialization (only one time)
----- for each process (begin) -----
2: Create process instance from template
3: Execute process instance just created
----- for each process (end) -----
4: Querying for activity pending
5: close criteria session
Press a Key for beginning................................................
2
Criteria session Initialization.....(look at Executor trace file)
Criteria session Initialization [KO].Error[Impossible to retrieve ${CRITERIA_HOME}]. Exit.
2|root@mb526:/data/data/criteria #
------------------------------------------------------------------------------------------
步驟(問題)13:
+++++++++++++編譯Criteria.Tools.Executor————成功———調試
宿主機:
codeblocks 全局參數 設置:
【Settings】->【debugger】->【create config】->【arm-gdb】->【executable path】
/opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gdb
【Settings】->【Compiler】->【GNU ARM GCC Compiler For Android】->【Toolchain executable】->【debugger】
arm-gdb
codeblocks 局部參數 設置:
右健單擊【Criteria.WorkflowEngine】,選擇【Properties】->【debugger】->【debug win32】192.168.0.101:1111
[root@localhost gdbserver]# pwd
/opt/android-on-linux/android-ndk-r8e/prebuilt/android-arm/gdbserver
[root@localhost gdbserver]# ls
gdbserver
[root@localhost gdbserver]# adb push gdbserver /data/data/criteria
[root@localhost lib]# pwd
/opt/cBPM-android/criteria-lin/lib
[root@localhost lib]# adb push executer /data/data/criteria
----------------------OK---------------------手機:
shell@mb526:/ $
getprop |grep ip
[dhcp.wlan0.ipaddress]: [192.168.0.101]
export WF_HOME=/data/data/criteria; export CRITERIA_HOME=/data/data/criteria
cd /data/data/criteria
./gdbserver 192.168.0.100:1234 ./executer
(192.168.0.100是宿主機IP)
----------------------OK---------------------宿主機(命令行):
[root@localhost Tools.Executor]# pwd
/opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor
[root@localhost Tools.Executor]# ls
database notepad.txt temp TestNotePad.xml executer Executor-3739-20150407-100423.trace src temp.c
------------------------------------------------------------------------這段不用
[root@localhost Tools.Executor]# export PATH=$PATH:/opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/
使用上面有問題:
readchar: Got EOF
Remote side has terminated connection. GDBserver will reopen the connection.
------------------------------------------------------------------------將配置文件拷貝到 手機
[root@localhost lib]# pwd
/opt/cBPM-android/criteria-lin/lib
[root@localhost lib]# ls
executer
[root@localhost lib]# adb push executer /data/data/criteria/
[root@localhost Tools.Executor]# ls
database executer notepad.txt src temp temp.c TestNotePad.xml
[root@localhost Tools.Executor]# pwd
/opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor
[root@localhost Tools.Executor]# adb push database/ /data/data/criteria/database
------------------------------------------------------------------------
------------------------------------------------------------------------使用這段
使用如下可以:
[root@localhost Tools.Executor]# export PATH=$PATH:/opt/android-on-linux/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/
------------------------------------------------------------------------
gdb調試的時候怎樣帶參數
1,gdb --args ./A V1 V2 V3
2,gdb ./A,進入gdb後 r V1 V2 V3
3,gdb ./A,進入gdb後 設置參數set args V1 V2 V3 再直接 r
------------------------------------------------------------------------
------------------------------------------------------------------------宿主機(命令行):
[root@localhost Tools.Executor]# arm-linux-androideabi-gdb executer
(gdb)
target extended-remote 192.168.0.104:1234
//192.168.0.101是手機IP
//target remote 192.168.0.101:1234
//break main.cpp:63
//break main.cpp:155
//break WAPI.cpp:72
//break bOSXMLHelper.cpp:40
//break PlatformUtils.hpp:813
//break MemoryManagerImpl.cpp:37
//break WorkflowListener.cpp:67
//break XMLString.hpp:1451
//break Hashers.hpp:47
//break RangeToken.cpp:335
//break XMLRangeFactory.cpp:113
//break XMLInitializer.cpp:51
//break XMLInitializer.cpp:62 // 調試到此處,中止
//break XMLInitializer.cpp:61 // 因此,進入到initializeDatatypeValidatorFactory()單步跟蹤。使用s,不要用n
break IconvTransService.cpp:432 //找到了故障點(在這一行的)。
break IconvTransService.cpp:460 //預計是內存分配問題。比方 溢出
break DataBaseHelper.cpp:91
break bOSXMLHelper.cpp:64
break bOSFileSystem.cpp:191
break bOSXMLHelper.cpp:116
break AbstractDOMParser.cpp:537
set debug remote 1
set args TestNotePad
c
s
n
r
info break
delete breakpoint-number
backtrace
monitor exit //terminate gdbserver
------------------------------------------------------------------------調試到此處,中止。並且 手機從新啓動
(gdb) bt
#0 xercesc_3_1::RangeToken::doCreateMap (this=0x5bece8) at xercesc/util/regx/RangeToken.cpp:852
#1 0x00327af4 in xercesc_3_1::RangeToken::createMap (this=0x5bece8) at ./xercesc/util/regx/RangeToken.hpp:130
#2 0x00331f84 in xercesc_3_1::XMLRangeFactory::buildRanges (this=0x5bd338, rangeTokMap=0x5ba2c8) at xercesc/util/regx/XMLRangeFactory.cpp:113
#3 0x0031f4c4 in xercesc_3_1::RangeTokenMap::buildTokenRanges (this=0x5ba2c8) at xercesc/util/regx/RangeTokenMap.cpp:247
#4 0x0031e8d8 in xercesc_3_1::XMLInitializer::initializeRangeTokenMap () at xercesc/util/regx/RangeTokenMap.cpp:49
#5 0x00219aac in xercesc_3_1::XMLInitializer::initializeStaticData () at xercesc/util/XMLInitializer.cpp:51
#6 0x0020ddac in xercesc_3_1::XMLPlatformUtils::Initialize (locale=0x4cebe0 <xercesc_3_1::XMLUni::fgXercescDefaultLocale> "en_US", nlsHome=0x0,
panicHandler=0x0, memoryManager=0x0) at xercesc/util/PlatformUtils.cpp:307
#7 0x001534ac in bOS::XML::XMLHelper::initialize () at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Libraries.bOS/XML/bOSXMLHelper.cpp:40
#8 0x0000ec88 in InitSessionWithParams (acConfigFile=0x5b64b8 "/data/data/criteria/database/Criteria.xml", response=0x5b3b20)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/WAPI/WAPI.cpp:72
#9 0x0000e948 in InitSession (response=0x5b3b20) at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/WAPI/WAPI.cpp:63
#10 0x0000b34c in main (argc=2, argv=0xbeb2fa34)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Tools/Criteria.Tools.Executor/src/main.cpp:63
break XMLInitializer.cpp:61 // 因此。進入到initializeDatatypeValidatorFactory()單步跟蹤。使用s。不要用n
#2 0x002aaf1c in xercesc_3_1::DatatypeValidatorFactory::expandRegistryToFullSchemaSet (this=0x5e3870)
at xercesc/validators/datatype/DatatypeValidatorFactory.cpp:180
#3 0x002aaca8 in xercesc_3_1::XMLInitializer::initializeDatatypeValidatorFactory () at xercesc/validators/datatype/DatatypeValidatorFactory.cpp:135
break DatatypeValidatorFactory.cpp:180
break DatatypeValidatorFactory.cpp:281
break DatatypeValidatorFactory.cpp:315 // 到此處,手機死機
break DatatypeValidatorFactory.cpp:311 // 因此,單步跟蹤
break DatatypeValidatorFactory.hpp:250 // 到此處。手機死機
break DatatypeValidatorFactory.hpp:246 // 因此,單步跟蹤
#0 xercesc_3_1::RefHashTableOfEnumerator<xercesc_3_1::KVStringPair, xercesc_3_1::StringHasher>::~RefHashTableOfEnumerator (this=0xbed963e4,
__in_chrg=<optimized out>) at ./xercesc/util/RefHashTableOf.c:554
#1 0x003989d4 in xercesc_3_1::AbstractStringValidator::assignFacet (this=0x5e4a30, manager=0x5b6c98)
at xercesc/validators/datatype/AbstractStringValidator.cpp:221
#3 0x002bcaa0 in xercesc_3_1::StringDatatypeValidator::StringDatatypeValidator (this=0x5e4a30, baseValidator=0x5e3928, facets=0x5e4988, enums=0x0,
finalSet=0, manager=0x5b6c98) at xercesc/validators/datatype/StringDatatypeValidator.cpp:50
break AbstractStringValidator.cpp:221 // 因此。單步跟蹤
break StringDatatypeValidator.cpp:50
#0 xercesc_3_1::StringDatatypeValidator::StringDatatypeValidator (this=0x5e4a30, baseValidator=0x5e3928, facets=0x5e4988, enums=0x0, finalSet=0,
manager=0x5b6c98) at xercesc/validators/datatype/StringDatatypeValidator.cpp:51
#1 0x002bcbbc in xercesc_3_1::StringDatatypeValidator::newInstance (this=0x5e3928, facets=0x5e4988, enums=0x0, finalSet=0, manager=0x5b6c98)
at xercesc/validators/datatype/StringDatatypeValidator.cpp:64
#2 0x002add30 in xercesc_3_1::DatatypeValidatorFactory::createDatatypeValidator (this=0x5e3870,
typeName=0x4da7b4 <xercesc_3_1::SchemaSymbols::fgDT_NORMALIZEDSTRING>, baseValidator=0x5e3928, facets=0x5e4988, enums=0x0,
isDerivedByList=false, finalSet=0, isUserDefined=false, userManager=0x5b6c98) at xercesc/validators/datatype/DatatypeValidatorFactory.cpp:678
break DatatypeValidatorFactory.cpp:678
Breakpoint 2, xercesc_3_1::DatatypeValidatorFactory::expandRegistryToFullSchemaSet (this=0x5e3870)
at xercesc/validators/datatype/DatatypeValidatorFactory.cpp:312
312 getDatatypeValidator(XMLUni::fgNmTokenString), facets, 0, true, 0, false);
(gdb) break DatatypeValidatorFactory.cpp:312
(gdb) s
(gdb) n
(gdb)
manager=0x5b6c98) at xercesc/validators/datatype/ListDatatypeValidator.cpp:58
58 if (!baseValidator)
(gdb) break ListDatatypeValidator.cpp:58
(gdb) break ListDatatypeValidator.cpp:61
(gdb) s
(gdb) n
(gdb) break AbstractStringValidator.cpp:152
(gdb) s
xercesc_3_1::XMLString::parseInt (toConvert=0x5e52c0, manager=0x5b6c98) at xercesc/util/XMLString.cpp:1449
1449 XMLSize_t trimmedStrLen = XMLString::stringLen(trimmedStr);
xercesc_3_1::IconvLCPTranscoder::transcode (this=0x5b7d20, toTranscode=0x5e52d0, manager=0x5b6c98)
at xercesc/util/Transcoders/Iconv/IconvTransService.cpp:432
432 while (toTranscode[srcCursor] || src)
-----------------------找到了故障點
(gdb) break IconvTransService.cpp:432 //找到了故障點。
問題的解決,見 http://blog.chinaunix.net/uid-14735472-id-5211751.html
------------------------------------------------------------------------接着調試,調試到此處,出現例如如下問題 (段錯誤)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/DataBaseHelper.cpp:236
236 CM_TRACE_CODEPATH("Process [" << acWorkflowName << "] retrieved. [" << workflow->getProcessId() << "]")
Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb)
是因爲Connection Nr[0]
詳細錯誤(在Executor-7033-20150407-163826.trace文件裏)
10:39:39.550-1073824092- DataBaseHelper::open-INFO-DataBaseHelper.cpp[106]-Connection Nr[0]
應該爲
16:38:26.424--134334400- DataBaseHelper::open-INFO-DataBaseHelper.cpp[106]-Connection Nr[1]
0:45:44.772--134334400- DataBaseHelper::open-INFO-DataBaseHelper.cpp[106]-Connection Nr[1]
20:45:44.772--134334400- DataBaseHelper::open-INFO-DataBaseHelper.cpp[171]-Analysing FileSsystem Connection
因爲[106]出了問題,因此[171]沒有運行。即,[111]行的 for 循環的 循環體 沒有運行。
如下調試,找問題
(gdb) break DataBaseHelper.cpp:236
(gdb) break DataBaseHelper.cpp:109
--------------使用例如如下斷點找問題
break DataBaseHelper.cpp:102
break bOSXMLFile.cpp:52
break bOSCollection.cpp:37
break bOSCollection.cpp:44
break bOSXMLFile.cpp:59
break DataBaseHelper.cpp:104
break bOSXMLObject.cpp:73 //初始化 vConnections 的 地方
break bOSXMLObject.cpp:89 //初始化 vConnections 的 地方。是虛函數。所以,運行時 定位 實際函數
// at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/DataBase.cpp:27
-----------------------找到了故障點 DataBase.cpp:27
if ( strcmp(node->getName(),XMLConnections::MAIN_NODE.c_str()) == 0 )
----------函數strcmp的 兩個 參數 不一樣:"C" 和 "Connections"
_M_data = 0x5f6510 "C"
_M_data = 0x5813f8 <DataManager::Panorama::DataBase::XMLConnections::MAIN_NODE> "Connections"}
----------如下查找,第一個參數 爲何 是"C"
break bOSXMLNode.cpp:223 //void XMLNode::setName( const char* acName )
break setName
break bOSXMLHelper.cpp:157
break bOSXMLHelper.cpp:170
break XMLString.cpp:600
break IconvTransService.cpp:451
先設置斷點
break bOSXMLHelper.cpp:170
運行後,再設置斷點
break IconvTransService.cpp:529
break IconvTransService.cpp:569
//最終找到故障點: 文件 IconvTransService.cpp:451
size_t len = ::wcsrtombs(resultString + dstCursor, &src, resultSize - dstCursor, &st);
//Android中,wcsrtombs 有問題,因此 替換之
//改動例如如下文件:
/opt/cBPM-android/xerces-c-3.1.2/src/xercesc/util/Transcoders/Iconv/IconvTransService.cpp
bt
一個緣由:在解析Criteria.xml文件時。僅僅讀取了 標籤的 第一個字母。
(gdb) bt
#0 xercesc_3_1::IconvLCPTranscoder::transcode (this=0x5b7d20, toTranscode=0x5f7c5c, manager=0x5b6c98)
at xercesc/util/Transcoders/Iconv/IconvTransService.cpp:484
#1 0x0021b190 in xercesc_3_1::XMLString::transcode (toTranscode=0x5f7c5c, manager=0x5b6c98) at xercesc/util/XMLString.cpp:600
#2 0x0015401c in bOS::XML::XMLHelper::parse (domNode=0x5f7c20)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Libraries.bOS/XML/bOSXMLHelper.cpp:170
#3 0x00153c10 in bOS::XML::XMLHelper::parse (
acXML=0x5eff00 "<DataBaseManager> <Connections> <!-- <MySQL Type=\"Primary\" Id=\"1\"> <PoolManager Min=\"1\" Max=\"1\" Retry=\"0\" Delay=\"100\" />", ' ' <repeats 12 times>, "<Host>127.0.0.1</Host> <Port></Port> <User>cri"...)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Libraries.bOS/XML/bOSXMLHelper.cpp:157
--------------
shell@mb526:/ $
getprop |grep ip
[dhcp.wlan0.ipaddress]: [192.168.0.101]
export WF_HOME=/data/data/criteria; export CRITERIA_HOME=/data/data/criteria
cd /data/data/criteria
./gdbserver 192.168.0.100:1234 ./executer
--------------
break bOSXMLHelper.cpp:64
break bOSFileSystem.cpp:191
break bOSXMLHelper.cpp:116
break AbstractDOMParser.cpp:537
# pwd
/opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor
# export PATH=$PATH:/opt/android-on-linux/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/
# arm-linux-androideabi-gdb executer
target extended-remote 192.168.0.104:1234
set debug remote 1
set args TestNotePad
c
--------------
/opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/DataBaseHelper.cpp
line-106
CM_TRACE_INFO("Connection Nr[" << uiSize << "]")
DataManager::Panorama::DataBase::DataBase::init (this=0xbecf63c8)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/DataBase.cpp:17
17 vConnections.init();
DataManager::Panorama::DataBase::Connections::init (this=0xbecf63e8)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/Connections.cpp:26
26 XMLObjectSet::init();
bOS::XML::Data::XMLObjectSet::init (this=0xbecf63e8)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Libraries.bOS/XML/Data/bOSXMLObjectSet.cpp:38
38 this->removeAll();
bOS::Collections::Collection::removeAll (this=0xbecf63ec)
at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Libraries.bOS/Collections/bOSCollection.cpp:151
151 Mutex::Lock locker(mtxEntries);
bOS::Core::SmartLocker<bOS::Core::Mutex>::SmartLocker (this=0xbecf6314, lock=...) at /opt/cBPM-android/criteria-lin/include/bOS/bOSSmartLocker.h:19
19 SmartLocker( T& lock ) : m_Lock(lock), m_bLocked(false)
bOS::Core::Mutex::lock (this=0xbecf63fc) at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Libraries.bOS/Core/bOSMutex.cpp:43
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--------------------------------如下是宿主機(命令行) 運行 r s n c 的過程,目的是找到 故障點,太費時間。因此 結合 backtrace 查找 故障點
Breakpoint 4, bOS::XML::XMLHelper::initialize () at /opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Libraries.bOS/XML/bOSXMLHelper.cpp:40
40 xercesc_3_1::XMLPlatformUtils::Initialize();
(gdb)
xercesc_3_1::XMLPlatformUtils::Initialize (locale=0x4cebe0 <xercesc_3_1::XMLUni::fgXercescDefaultLocale> "en_US", nlsHome=0x0, panicHandler=0x0,
memoryManager=0x0) at xercesc/util/PlatformUtils.cpp:166
166 {
xercesc_3_1::MemoryManagerImpl::MemoryManagerImpl (this=0x5b6c98) at ./xercesc/internal/MemoryManagerImpl.hpp:48
48 MemoryManagerImpl()
xercesc_3_1::MemoryManager::MemoryManager (this=0x5b6c98) at ./xercesc/framework/MemoryManager.hpp:108
108 MemoryManager()
xercesc_3_1::MemoryManagerImpl::MemoryManagerImpl (this=0x5b6c98) at ./xercesc/internal/MemoryManagerImpl.hpp:50
50 }
xercesc_3_1::XMLPlatformUtils::Initialize (locale=0x4cebe0 <xercesc_3_1::XMLUni::fgXercescDefaultLocale> "en_US", nlsHome=0x0, panicHandler=0x0,
memoryManager=0x0) at xercesc/util/PlatformUtils.cpp:208
208 if (!panicHandler)
xercesc_3_1::XMemory::operator new (size=4) at xercesc/util/XMemory.cpp:34
34 {
xercesc_3_1::XMLPlatformUtils::alignPointerForNewBlockAllocation (ptrSize=4) at ./xercesc/util/PlatformUtils.hpp:813
813 XMLSize_t current = ptrSize % alignment;
xercesc_3_1::XMemory::operator new (size=4) at xercesc/util/XMemory.cpp:41
41 );
xercesc_3_1::MemoryManagerImpl::allocate (this=0x5b6c98, size=12) at xercesc/internal/MemoryManagerImpl.cpp:37
37 {
xercesc_3_1::MemoryManagerImpl::allocate (this=0x5b6c98, size=12) at xercesc/internal/MemoryManagerImpl.cpp:46
46 if(memptr==NULL && size!=0)
xercesc_3_1::XMemory::operator new (size=4) at xercesc/util/XMemory.cpp:42
42 *(MemoryManager**)block = XMLPlatformUtils::fgMemoryManager;
xercesc_3_1::DefaultPanicHandler::DefaultPanicHandler (this=0x5b6cb0) at ./xercesc/util/DefaultPanicHandler.hpp:46
46 DefaultPanicHandler(){};
xercesc_3_1::XMemory::XMemory (this=0x5b6cb0) at ./xercesc/util/XMemory.hpp:132
132 }
xercesc_3_1::PanicHandler::PanicHandler (this=0x5b6cb0) at ./xercesc/util/PanicHandler.hpp:70
70 PanicHandler(){};
xercesc_3_1::XMLPlatformUtils::Initialize (locale=0x4cebe0 <xercesc_3_1::XMLUni::fgXercescDefaultLocale> "en_US", nlsHome=0x0, panicHandler=0x0,
memoryManager=0x0) at xercesc/util/PlatformUtils.cpp:223
223 endianTest.ch = 1;
xercesc_3_1::XMLPlatformUtils::makeMutexMgr (memmgr=0x5b6c98) at xercesc/util/PlatformUtils.cpp:725
725 XMLMutexMgr* mgr = NULL;
xercesc_3_1::XMemory::operator new (size=4, manager=0x5b6c98) at xercesc/util/XMemory.cpp:63
63 assert(manager != 0);
xercesc_3_1::XMLPlatformUtils::alignPointerForNewBlockAllocation (ptrSize=4) at ./xercesc/util/PlatformUtils.hpp:813
813 XMLSize_t current = ptrSize % alignment;
xercesc_3_1::XMemory::operator new (size=4, manager=0x5b6c98) at xercesc/util/XMemory.cpp:68
68 void* const block = manager->allocate(headerSize + size);
xercesc_3_1::MemoryManagerImpl::allocate (this=0x5b6c98, size=12) at xercesc/internal/MemoryManagerImpl.cpp:37
37 {
xercesc_3_1::MemoryManagerImpl::allocate (this=0x5b6c98, size=12) at xercesc/internal/MemoryManagerImpl.cpp:46
46 if(memptr==NULL && size!=0)
xercesc_3_1::XMemory::operator new (size=4, manager=0x5b6c98) at xercesc/util/XMemory.cpp:69
69 *(MemoryManager**)block = manager;
xercesc_3_1::PosixMutexMgr::PosixMutexMgr (this=0x5b6cc0) at xercesc/util/MutexManagers/PosixMutexMgr.cpp:44
44 PosixMutexMgr::PosixMutexMgr()
xercesc_3_1::XMLMutexMgr::XMLMutexMgr (this=0x5b6cc0) at ./xercesc/util/XMLMutexMgr.hpp:36
36 XMLMutexMgr() {}
xercesc_3_1::XMemory::XMemory (this=0x5b6cc0) at ./xercesc/util/XMemory.hpp:132
132 }
xercesc_3_1::PosixMutexMgr::PosixMutexMgr (this=0x5b6cc0) at xercesc/util/MutexManagers/PosixMutexMgr.cpp:46
46 }
xercesc_3_1::XMLPlatformUtils::makeMutexMgr (memmgr=0x5b6c98) at xercesc/util/PlatformUtils.cpp:737
737 return mgr;
xercesc_3_1::XMLPlatformUtils::Initialize (locale=0x4cebe0 <xercesc_3_1::XMLUni::fgXercescDefaultLocale> "en_US", nlsHome=0x0, panicHandler=0x0,
memoryManager=0x0) at xercesc/util/PlatformUtils.cpp:249
249 fgFileMgr = makeFileMgr(fgMemoryManager);
xercesc_3_1::XMLPlatformUtils::makeFileMgr (memmgr=0x5b6c98) at xercesc/util/PlatformUtils.cpp:504
504 XMLFileMgr* mgr = NULL;
xercesc_3_1::XMemory::operator new (size=4, manager=0x5b6c98) at xercesc/util/XMemory.cpp:63
63 assert(manager != 0);
xercesc_3_1::XMLPlatformUtils::alignPointerForNewBlockAllocation (ptrSize=4) at ./xercesc/util/PlatformUtils.hpp:813
813 XMLSize_t current = ptrSize % alignment;
xercesc_3_1::MemoryManagerImpl::allocate (this=0x5b6c98, size=12) at xercesc/internal/MemoryManagerImpl.cpp:37
37 {
xercesc_3_1::MemoryManagerImpl::allocate (this=0x5b6c98, size=12) at xercesc/internal/MemoryManagerImpl.cpp:46
46 if(memptr==NULL && size!=0)
xercesc_3_1::XMemory::operator new (size=4) at xercesc/util/XMemory.cpp:42
42 *(MemoryManager**)block = XMLPlatformUtils::fgMemoryManager;
xercesc_3_1::DefaultPanicHandler::DefaultPanicHandler (this=0x5b6cb0) at ./xercesc/util/DefaultPanicHandler.hpp:46
46 DefaultPanicHandler(){};
xercesc_3_1::XMemory::XMemory (this=0x5b6cb0) at ./xercesc/util/XMemory.hpp:132
132 }
xercesc_3_1::PanicHandler::PanicHandler (this=0x5b6cb0) at ./xercesc/util/PanicHandler.hpp:70
70 PanicHandler(){};
xercesc_3_1::XMLPlatformUtils::Initialize (locale=0x4cebe0 <xercesc_3_1::XMLUni::fgXercescDefaultLocale> "en_US", nlsHome=0x0, panicHandler=0x0,
memoryManager=0x0) at xercesc/util/PlatformUtils.cpp:223
223 endianTest.ch = 1;
xercesc_3_1::XMemory::operator new (size=4, manager=0x5b6c98) at xercesc/util/XMemory.cpp:63
63 assert(manager != 0);
Breakpoint 1, xercesc_3_1::XMLPlatformUtils::alignPointerForNewBlockAllocation (ptrSize=4) at ./xercesc/util/PlatformUtils.hpp:813
813 XMLSize_t current = ptrSize % alignment;
xercesc_3_1::XMemory::operator new (size=4, manager=0x5b6c98) at xercesc/util/XMemory.cpp:68
68 void* const block = manager->allocate(headerSize + size);
Breakpoint 2, xercesc_3_1::MemoryManagerImpl::allocate (this=0x5b6c98, size=12) at xercesc/internal/MemoryManagerImpl.cpp:37
37 {
xercesc_3_1::MemoryManagerImpl::allocate (this=0x5b6c98, size=12) at xercesc/internal/MemoryManagerImpl.cpp:46
46 if(memptr==NULL && size!=0)
xercesc_3_1::XMemory::operator new (size=4, manager=0x5b6c98) at xercesc/util/XMemory.cpp:69
69 *(MemoryManager**)block = manager;
xercesc_3_1::PosixMutexMgr::PosixMutexMgr (this=0x5b6cc0) at xercesc/util/MutexManagers/PosixMutexMgr.cpp:44
44 PosixMutexMgr::PosixMutexMgr()
xercesc_3_1::XMLMutexMgr::XMLMutexMgr (this=0x5b6cc0) at ./xercesc/util/XMLMutexMgr.hpp:36
36 XMLMutexMgr() {}
xercesc_3_1::XMemory::XMemory (this=0x5b6cc0) at ./xercesc/util/XMemory.hpp:132
132 }
xercesc_3_1::PosixMutexMgr::PosixMutexMgr (this=0x5b6cc0) at xercesc/util/MutexManagers/PosixMutexMgr.cpp:46
46 }
xercesc_3_1::XMLPlatformUtils::makeMutexMgr (memmgr=0x5b6c98) at xercesc/util/PlatformUtils.cpp:737
737 return mgr;
xercesc_3_1::XMLPlatformUtils::Initialize (locale=0x4cebe0 <xercesc_3_1::XMLUni::fgXercescDefaultLocale> "en_US", nlsHome=0x0, panicHandler=0x0,
memoryManager=0x0) at xercesc/util/PlatformUtils.cpp:249
249 fgFileMgr = makeFileMgr(fgMemoryManager);
xercesc_3_1::XMLPlatformUtils::makeFileMgr (memmgr=0x5b6c98) at xercesc/util/PlatformUtils.cpp:504
504 XMLFileMgr* mgr = NULL;
...
循環 1065行
xercesc_3_1::PosixMutexWrap::PosixMutexWrap (this=0x5b6cf8) at xercesc/util/MutexManagers/PosixMutexMgr.cpp:38
38 class PosixMutexWrap : public XMemory {
xercesc_3_1::XMLPlatformUtils::Initialize (locale=0x4cebe0 <xercesc_3_1::XMLUni::fgXercescDefaultLocale> "en_US", nlsHome=0x0, panicHandler=0x0,
memoryManager=0x0) at xercesc/util/PlatformUtils.cpp:269
269 XMLInitializer::initializeTransService(); // TransService static data.
xercesc_3_1::RefHashTableOf<xercesc_3_1::ENameMap, xercesc_3_1::StringHasher>::put (this=0x5b6d30,
key=0x4ccf90 <xercesc_3_1::XMLUni::fgXMLChEncodingString>, valueToAdopt=0x5b6f90) at ./xercesc/util/RefHashTableOf.c:412
412 if (newBucket)
key=0x4ccde0 <xercesc_3_1::XMLUni::fgUSASCIIEncodingString>, hashVal=@0xbed324ec: 2180388) at ./xercesc/util/RefHashTableOf.c:492
492 hashVal = fHasher.getHashVal(key, fHashModulus);
key=0x4cce10 <xercesc_3_1::XMLUni::fgUSASCIIEncodingString4>, hashVal=@0xbed324ec: 93) at ./xercesc/util/RefHashTableOf.c:495
495 RefHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
xercesc_3_1::StringHasher::getHashVal (this=0x5b6d48, key=0x4cce24 <xercesc_3_1::XMLUni::fgUTF8EncodingString>, mod=103)
at ./xercesc/util/Hashers.hpp:47
47 }
xercesc_3_1::XMLTransService::initTransService (this=0x5b6f48) at xercesc/util/TransService.cpp:227
227 gMappings->put((void*)XMLUni::fgUSASCIIEncodingString, new ENameMapFor<XMLASCIITranscoder>(XMLUni::fgUSASCIIEncodingString));
xercesc_3_1::XMemory::operator new (size=8) at xercesc/util/XMemory.cpp:41
41 );
xercesc_3_1::XMLString::hash (tohash=0x4cce04 <xercesc_3_1::XMLUni::fgUSASCIIEncodingString3>, hashModulus=103) at ./xercesc/util/XMLString.hpp:1588
1588 if (tohash == 0 || *tohash == 0)
encodingName=0x4ccb48 <xercesc_3_1::XMLUni::fgISO88591EncodingString>) at ./xercesc/util/TransENameMap.c:32
32 ENameMapFor<TType>::ENameMapFor(const XMLCh* const encodingName) :
xercesc_3_1::ENameMap::ENameMap (this=0x5b7198, encodingName=0x4ccb48 <xercesc_3_1::XMLUni::fgISO88591EncodingString>)
at ./xercesc/util/TransENameMap.hpp:75
xercesc_3_1::XMLString::stringLen (src=0x4ccbbc <xercesc_3_1::XMLUni::fgISO88591EncodingString7>) at ./xercesc/util/XMLString.hpp:1451
1451 if (src == 0)
encodingName=0x4ccbcc <xercesc_3_1::XMLUni::fgISO88591EncodingString8>) at ./xercesc/util/TransENameMap.c:36
36 }
xercesc_3_1::RangeToken::addRange (this=0x5c2fc8, start=6155, end=6467) at xercesc/util/regx/RangeToken.cpp:335
335 fCaseIToken = 0;
Sending packet: $X98ff0,4:?\001?mysql
?#27...Packet received: OK
Sending packet: $QPassSignals:e;10;14;17;1a;1b;1c;21;24;25;2c;4c;#5f...Packet received: OK
Sending packet: $vCont;c:pc6b.-1#d9...
Sending packet: $m2abd08,4#8e...Packet received: 1c00a0e3
Sending packet: $X2abd08,4:?\001?linux
?android
#7b...Packet received: OK
Sending packet: $vCont;c:pcdf.-1#0b...
------調試到此處。中止,並且 手機從新啓動
--------------------------------上面是 運行 r s n c 的過程,目的是找到 故障點,太費時間。因此 結合 backtrace 查找 故障點
------------------------------------------------------------------------
/opt/cBPM-android/criteria-lin/src/Criteria/Criteria.Libraries.bOS/XML/bOSXMLHelper.cpp
xercesc_3_1::XMLPlatformUtils::Initialize(); //程序至步於此。並且手機本身主動從新啓動,說明xercesc_3_1有問題
include/bOS/xercesc/util/PlatformUtils.cpp
include/bOS/xercesc/util/XercesDefs.hpp: #define XERCES_CPP_NAMESPACE_BEGIN namespace XERCES_CPP_NAMESPACE {
--------------------將如下兩個文件裏xercesc_3_1替換爲xercesc_3_0
[root@localhost criteria-lin]# pwd
/opt/cBPM-android/criteria-lin
./src/Criteria/Criteria.Libraries.bOS/XML/bOSXMLHelper.cpp
./include/bOS/bOSXMLHelper.h
--------------------編譯xercesc_3_0靜態庫——下面 不看,不用了
編譯xerces-c (靜態庫)—CentOS 7— android-ndk
[root@localhost xerces-c-3.0.0]# pwd
/opt/cBPM-android/xerces-c-3.0.0
[root@localhost xerces-c-3.0.0]# make clean
export XERCES="/opt/cBPM-android/xerces-c-3.0.0/"
export NDK_ROOT="/opt/android-on-linux/android-ndk-r8e"
export SYSROOT="$NDK_ROOT/platforms/android-14/arch-arm"
export CFLAGS="--pipe --sysroot=$SYSROOT -I$NDK_ROOT/sources/cxx-stl/stlport/stlport -I$NDK_ROOT/platforms/android-14/arch-arm/usr/include -I$NDK_ROOT/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/include -I$NDK_ROOT/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.7/include-fixed -I$NDK_ROOT/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.7/include"
export CPPFLAGS="$CFLAGS"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="-L$SYSROOT/usr/lib/ -L$NDK_ROOT/sources/cxx-stl/stlport/libs/armeabi-v7a -L/opt/cBPM-android/criteria-lin/lib -lstlport_static -lgcc -lc"
export CPATH="$NDK_ROOT/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin"
export CPP="$CPATH/arm-linux-androideabi-cpp"
export CXX="$CPATH/arm-linux-androideabi-g++"
export CC="$CPATH/arm-linux-androideabi-gcc"
export LD="$CPATH/arm-linux-androideabi-ld"
export AR="$CPATH/arm-linux-androideabi-ar"
[root@localhost xerces-c-3.0.0]# ac_cv_func_iconv_open=yes ac_cv_func_iconv_close=yes ac_cv_func_mblen=yes ac_cv_func_wcstombs=yes ac_cv_func_mbstowcs=yes ac_cv_func_iconv=yes ./configure --host="arm-linux-eabi" --enable-static --disable-shared --enable-transcoder-iconv
[root@localhost xerces-c-3.0.0]# make -j5
[root@localhost xerces-c-3.0.0]# cp ./src/.libs/libxerces-c.a /opt/cBPM-android/criteria-lin/lib
至此。成功編譯 xerces-c-3.0.0 靜態庫
---------------------------------
xercesc/util/XMLAbstractDoubleFloat.cpp:431:27: error: 'struct lconv' has no member named 'decimal_point'
[root@localhost xerces-c-3.0.0]# gedit ./src/xercesc/util/XMLAbstractDoubleFloat.cpp
// lconv* lc = localeconv();
// char delimiter = *lc->decimal_point;
char delimiter = '.'; //把localeconv()調用給繞過去了
保存,又一次編譯xerces-c (靜態庫)
---------------------------------
/usr/include/curl/curlbuild.h:1:27: fatal error: bits/wordsize.h: No such file or directory
/usr/include/curl/curlbuild.h:4:26: fatal error: curlbuild-32.h: No such file or directory
[root@localhost xerces-c-3.0.0]# find /usr/include/ -name wordsize.h
/usr/include/bits/wordsize.h
yum install libcurl-devel.i686
--------------------編譯xercesc_3_0靜態庫——以上 不看。不用了
------------------------------------------------------------------------
[root@localhost lib]# /opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gdb
(gdb) file executer
進行調試
(gdb) list or l
(gdb) break func
(gdb) break 22
(gdb) info br
(gdb) continue or c // 這裏不能用 run
(gdb) next or n
(gdb) print or p result
(gdb) finish // 跳出func函數
(gdb) next
(gdb) quit
創建鏈接後進行gdb遠程調試和gdb本地調試方法一樣
----------------------------------
/opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/WorkflowListener.cpp
凝視掉兩行:(取消凝視,會出現上面問題。有待解決)
/opt/cBPM-android/criteria-lin/src/Criteria/Criteria.WorkflowEngine/events/BaseWorkflowEvent.cpp
==============================如下不用看
// 上面過程 又一次 作一遍,使用 API level 15, NDK 9,arm-linux-androideabi-4.7,因爲 個人手機2011年買的,Android 4.0(Ice Cream Sandwich冰淇淋三明治)
[root@localhost android-on-linux]# wget -c http://dl.google.com/android/ndk/android-ndk-r8-linux-x86.tar.bz2
[root@localhost android-on-linux]# wget -c https://dl.google.com/android/ndk/android-ndk-r8e-linux-x86_64.tar.bz2
[root@localhost android-on-linux]# wget -c https://dl.google.com/android/ndk/android-ndk-r10d-linux-x86_64.tar.bz2
==============================如下不用看
解決方法:對照 helloworld
[root@localhost lib]# adb pull /data/data/helloworldcpp .
877 KB/s (102700 bytes in 0.114s)
[root@localhost lib]# ls
executer libc.so libiconv.so.2 libLibraries.so libstdc++.so libxerces-c-3.1.so temp.txt
helloworld libiconv.a libiconv.so.2.5.1 libsqlite.a libWorkflowEngineD.a libxerces-c.a
helloworldcpp libiconv.so libLibraries.a libsqlite.so libWorkflowEngineD.so temp2.txt
[root@localhost lib]#
********---------------------------********
庫位置:
[root@localhost criteria-lin]# cd /opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/
[root@localhost lib]# ls
crtbegin_dynamic.o crtend_so.o libdl.so libGLESv3.so libmediandk.so libOpenSLES.so libz.a
crtbegin_so.o libandroid.so libEGL.so libjnigraphics.so libm_hard.a libstdc++.a libz.so
crtbegin_static.o libc.a libGLESv1_CM.so liblog.so libm.so libstdc++.so rs
crtend_android.o libc.so libGLESv2.so libm.a libOpenMAXAL.so libthread_db.so
[root@localhost lib]# ls /opt/android-on-linux/android-ndk-r8e/sources/cxx-stl/stlport/libs/armeabi-v7a
libstlport_shared.so libstlport.so libstlport_static.a thumb
[root@localhost lib]# ls /opt/android-on-linux/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi-v7a
include libgnustl_shared.so libgnustl_static.a libsupc++.a thumb
[root@localhost lib]# ls /opt/cBPM-android/criteria-lin/lib
libiconv.a libiconv.so.2 libLibraries.a libsqlite.a libWorkflowEngineD.a libxerces-c-3.1.so
libiconv.so libiconv.so.2.5.1 libLibraries.so libsqlite.so libWorkflowEngineD.so libxerces-c.a
[root@localhost lib]#
********---------------------------********
//從手機上覆制庫文件libsqlite.so,便於調試系統
adb pull <remote> <local>
adb push <local> <remote>
adb pull /system/lib/libsqlite.so /opt/cBPM-android/criteria-lin/lib
adb pull /system/lib/ /opt/cBPM-android/mb526-all-lib
+++++++++++++
src/Criteria/Criteria.Tools/Criteria.Tools.Executor/Tools.Executor.depend
line 1628: 1427877163 /opt/cBPM-android/criteria-lin/include/bOS/selfded.h
+++++++++++++
編譯結果:
[root@localhost android-ndk-r10d]# ll /usr/lib64/libLibraries.so
-rwxr-xr-x. 1 root root 8120944 9月 16 11:09 /usr/lib64/libLibraries.so
[root@localhost android-ndk-r10d]# ll /usr/lib64/libWorkflowEngineD.so
-rwxr-xr-x. 1 root root 16783140 9月 16 11:11 /usr/lib64/libWorkflowEngineD.so
[root@localhost android-ndk-r10d]#
+++++++++++++編譯Libraries 和 WorkflowEngineD 共享庫後。手動 編譯 executer
export ARMGXX="/opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++"
$ARMGXX -L/opt/cBPM-android/criteria-lin/lib -L/opt/android-on-linux/android-ndk-r8e/sources/cxx-stl/stlport/libs/armeabi-v7a -L/opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/ -L/opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.7/armv7-a/ -o /opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor/executer /opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/crtbegin_static.o /opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor/src/main.o -static -nostdlib -Wl,-dy -ldl /opt/cBPM-android/criteria-lin/lib/libc.so -Wl,-dn -lgcc -lstlport_static -lsqlite -lxerces-c -lLibraries -lWorkflowEngineD /opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/crtend_android.o 2> log.txt
cat log.txt | cut -d: -f1 | uniq
-Wl,-dn -lLibraries -lWorkflowEngineD -lxerces-c -lsqlite -lstdc++ -lc -lstlport_static -Wl,-dy
靜態庫位置: /opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/
/opt/cBPM-android/criteria-lin/lib/
[root@localhost criteria-lin]# cd /opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/
[root@localhost lib]# ls
crtbegin_dynamic.o crtend_so.o libdl.so libGLESv3.so libmediandk.so libOpenSLES.so libz.a
crtbegin_so.o libandroid.so libEGL.so libjnigraphics.so libm_hard.a libstdc++.a libz.so
crtbegin_static.o libc.a libGLESv1_CM.so liblog.so libm.so libstdc++.so rs
crtend_android.o libc.so libGLESv2.so libm.a libOpenMAXAL.so libthread_db.so
[root@localhost lib]# ls /opt/android-on-linux/android-ndk-r8e/sources/cxx-stl/stlport/libs/armeabi-v7a
libstlport_shared.so libstlport.so libstlport_static.a thumb
[root@localhost lib]# ls /opt/cBPM-android/criteria-lin/lib
libiconv.a libiconv.so.2 libLibraries.a libsqlite.a libWorkflowEngineD.a libxerces-c-3.1.so
libiconv.so libiconv.so.2.5.1 libLibraries.so libsqlite.so libWorkflowEngineD.so libxerces-c.a
[root@localhost lib]#
+++++++++++++雜項。沒必要看
//--enable-transcoder-gnuiconv --enable-transcoder-iconv --enable-transcoder-icu
// 下載xerces:
// http://stackoverflow.com/questions/12920620/trying-to-build-xerces-c-for-android
// https://github.com/pelya/commandergenius/tree/sdl_android/project/jni/xerces
+++++++++++++連接選項
-static
-nostdlib
-Xlinker
-R/opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib
/opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/crtbegin_static.o
/opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/crtend_android.o
-Wl,-dy -lc -ldl -lstlport -lstdc++ -Wl,-dn
-static
-nostdlib
/opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/crtbegin_static.o
/opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/crtend_android.o
-Wl,-v -Wl,-dy -lc -ldl -lstlport -lstdc++ -Wl,-dn
-static
-nostdlib
-Wl,-rpath-link=/opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib -L/opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib /opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/crtbegin_dynamic.o /opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/crtend_android.o
-Wl,-v -Wl,-dy -lc -ldl -lstlport -lstdc++ -Wl,-dn
+++++++++++++++++++
-static
On systems that support dynamic linking, this prevents linking with the shared libraries. On other systems, this option
has no effect.
-shared
Produce a shared object which can then be linked with other objects to form an executable. Not all systems support this
option. For predictable results, you must also specify the same set of options used for compilation (-fpic, -fPIC, or
model suboptions) when you specify this linker option.[1]
+++++++++++++++++++
-------------- Build: Debug Win32 in Criteria.Libraries.bOS (compiler: GNU ARM GCC Compiler For Android)---------------
arm-linux-androideabi-ar -r -s ../../../bin/Criteria/Debug/bOS/libLibraries.a ../../../bin/Criteria/Debug/bOS/bOS.o ../../../bin/Criteria/Debug/bOS/CodeManager/CodeItem.o ../../../bin/Criteria/Debug/bOS/CodeManager/CodeTracer.o ../../../bin/Criteria/Debug/bOS/CodeManager/Tracer.o ../../../bin/Criteria/Debug/bOS/Collections/bOSCollection.o ../../../bin/Criteria/Debug/bOS/Collections/bOSCollectionEntry.o ../../../bin/Criteria/Debug/bOS/Core/bOSMutex.o ../../../bin/Criteria/Debug/bOS/Core/bOSSemaphore.o ../../../bin/Criteria/Debug/bOS/Core/bOSSmartLocker.o ../../../bin/Criteria/Debug/bOS/Core/bOSThread.o ../../../bin/Criteria/Debug/bOS/Exception/bOSException.o ../../../bin/Criteria/Debug/bOS/IO/bOSFile.o ../../../bin/Criteria/Debug/bOS/IO/bOSFileSystem.o ../../../bin/Criteria/Debug/bOS/JniInvoker.o ../../../bin/Criteria/Debug/bOS/Network/bOSSocketException.o ../../../bin/Criteria/Debug/bOS/Network/bOSSockets.o ../../../bin/Criteria/Debug/bOS/SQL/bOSResultSet.o ../../../bin/Criteria/Debug/bOS/SQL/bOSResultSetField.o ../../../bin/Criteria/Debug/bOS/SQL/bOSResultSetMetaData.o ../../../bin/Criteria/Debug/bOS/SQL/bOSResultSetRecord.o ../../../bin/Criteria/Debug/bOS/SQL/bOSSQLCommand.o ../../../bin/Criteria/Debug/bOS/SQL/bOSSQLCommands.o ../../../bin/Criteria/Debug/bOS/SQL/bOSSQLConnection.o ../../../bin/Criteria/Debug/bOS/SQL/bOSSQLConnectionManager.o ../../../bin/Criteria/Debug/bOS/SQL/bOSSQLConnectionPool.o ../../../bin/Criteria/Debug/bOS/SQL/bOSSQLField.o ../../../bin/Criteria/Debug/bOS/SQL/bOSSQLSmartConnection.o ../../../bin/Criteria/Debug/bOS/SQL/bOSSQLTable.o ../../../bin/Criteria/Debug/bOS/SQL/SQLite3/3rdLibraries/CppSQLite3.o ../../../bin/Criteria/Debug/bOS/SQL/SQLite3/3rdLibraries/sqlite3.o ../../../bin/Criteria/Debug/bOS/SQL/SQLite3/bOSSQLiteConnection.o ../../../bin/Criteria/Debug/bOS/SQL/SQLite3/bOSSQLiteConnectionData.o ../../../bin/Criteria/Debug/bOS/SQL/SQLite3/bOSSQLiteResultSet.o ../../../bin/Criteria/Debug/bOS/SQL/SQLite3/bOSSQLiteResultSetField.o ../../../bin/Criteria/Debug/bOS/SQL/SQLite3/bOSSQLiteResultSetMetaData.o ../../../bin/Criteria/Debug/bOS/String/bOSString.o ../../../bin/Criteria/Debug/bOS/String/bOSStringBuffer.o ../../../bin/Criteria/Debug/bOS/String/bOSStringUtils.o ../../../bin/Criteria/Debug/bOS/System/bOSProcess.o ../../../bin/Criteria/Debug/bOS/System/bOSSystem.o ../../../bin/Criteria/Debug/bOS/Utils/bOSDate.o ../../../bin/Criteria/Debug/bOS/Utils/bOSDateTime.o ../../../bin/Criteria/Debug/bOS/Utils/bOSTime.o ../../../bin/Criteria/Debug/bOS/Utils/bOSTimer.o ../../../bin/Criteria/Debug/bOS/Utils/bOSUniqueID.o ../../../bin/Criteria/Debug/bOS/XML/bOSXMLAttribute.o ../../../bin/Criteria/Debug/bOS/XML/bOSXMLHelper.o ../../../bin/Criteria/Debug/bOS/XML/bOSXMLNode.o ../../../bin/Criteria/Debug/bOS/XML/Data/bOSXMLObject.o ../../../bin/Criteria/Debug/bOS/XML/Data/bOSXMLObjectSet.o ../../../bin/Criteria/Debug/bOS/XML/Data/FileSystem/bOSXMLDirectory.o ../../../bin/Criteria/Debug/bOS/XML/Data/FileSystem/bOSXMLFile.o ../../../bin/Criteria/Debug/bOS/XML/XSLT/bOSXSLTManager.o
Running target post-build steps
cp /opt/cBPM-android/criteria-lin/bin/Criteria/Debug/bOS/libLibraries.a /opt/cBPM-android/criteria-lin/lib/
-------------- Build: Debug Win32 in Criteria.WorkflowEngine (compiler: GNU ARM GCC Compiler For Android)---------------
arm-linux-androideabi-ar -r -s ../../../bin/Criteria/Debug/WorkflowEngine/libWorkflowEngineD.a ../../../bin/Criteria/Debug/WorkflowEngine/actions/ApplicationFunctionAction.o ../../../bin/Criteria/Debug/WorkflowEngine/actions/ApplicationFunctionActionAttach.o ../../../bin/Criteria/Debug/WorkflowEngine/actions/BaseAction.o ../../../bin/Criteria/Debug/WorkflowEngine/actions/ConditionAction.o ../../../bin/Criteria/Debug/WorkflowEngine/actions/ConsumeEventAction.o ../../../bin/Criteria/Debug/WorkflowEngine/actions/EvalExpressionAction.o ../../../bin/Criteria/Debug/WorkflowEngine/actions/EvalRetrieveParameter.o ../../../bin/Criteria/Debug/WorkflowEngine/actions/EventAction.o ../../../bin/Criteria/Debug/WorkflowEngine/actions/IterationAction.o ../../../bin/Criteria/Debug/WorkflowEngine/actions/IterationCounterAction.o ../../../bin/Criteria/Debug/WorkflowEngine/actions/IterationExpressionAction.o ../../../bin/Criteria/Debug/WorkflowEngine/actions/MakeEventAction.o ../../../bin/Criteria/Debug/WorkflowEngine/actions/PrimitiveAction.o ../../../bin/Criteria/Debug/WorkflowEngine/actions/PrimitiveActionAttach.o ../../../bin/Criteria/Debug/WorkflowEngine/actions/PrimitiveActionDetach.o ../../../bin/Criteria/Debug/WorkflowEngine/actions/ProcessAction.o ../../../bin/Criteria/Debug/WorkflowEngine/actions/ProcessActionAttach.o ../../../bin/Criteria/Debug/WorkflowEngine/actions/SubFlowExitAction.o ../../../bin/Criteria/Debug/WorkflowEngine/actions/XMLAction.o ../../../bin/Criteria/Debug/WorkflowEngine/actions/XMLActionXMLFile.o ../../../bin/Criteria/Debug/WorkflowEngine/actions/XMLActionXSLT.o ../../../bin/Criteria/Debug/WorkflowEngine/Application/Application.o ../../../bin/Criteria/Debug/WorkflowEngine/Application/ApplicationException.o ../../../bin/Criteria/Debug/WorkflowEngine/Application/ApplicationFunction.o ../../../bin/Criteria/Debug/WorkflowEngine/Application/ApplicationFunctionResult.o ../../../bin/Criteria/Debug/WorkflowEngine/Application/ApplicationFunctions.o ../../../bin/Criteria/Debug/WorkflowEngine/Application/ApplicationManager.o ../../../bin/Criteria/Debug/WorkflowEngine/Application/Applications.o ../../../bin/Criteria/Debug/WorkflowEngine/Application/FunctionExecution.o ../../../bin/Criteria/Debug/WorkflowEngine/Application/LibraryFunctionExecution.o ../../../bin/Criteria/Debug/WorkflowEngine/Application/ProcessFunctionExecution.o ../../../bin/Criteria/Debug/WorkflowEngine/Application/ScriptFunctionExecution.o ../../../bin/Criteria/Debug/WorkflowEngine/Application/SocketFunctionExecution.o ../../../bin/Criteria/Debug/WorkflowEngine/Application/SQLApplicationDataModelDefines.o ../../../bin/Criteria/Debug/WorkflowEngine/Application/XMLApplicationDataModelDefines.o ../../../bin/Criteria/Debug/WorkflowEngine/CommonDefines.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Activities.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Activity.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/ActivityComponent.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Attribute.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Attributes.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Behaviour.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/BehaviourBase.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/BehaviourExecution.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/BehaviourFinish.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/BehaviourStart.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Connection.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Connections.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/DataBase.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/DataBaseHelper.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/DataBaseObject.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/DataBaseObjectManager.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/DataBaseTemplate.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/DataType.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/DataTypes.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/DataTypeValue.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/DataTypeValues.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/ExtendedAttribute.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/ExtendedAttributes.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/FileSystemConnection.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/FileSystemDataBase.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/FormalParameter.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/FormalParametes.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Grant.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Grants.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Log.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Logs.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Message.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Messages.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/mySQLConnection.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/ODBCConnection.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/PoolManager.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/ProcessComponent.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/ProcessesHandler.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Report.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Reports.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Role.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Roles.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Script.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Service.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Services.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/SQLDataBaseDefines.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/SQLiteConnection.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Status.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Transition.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Transitions.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/User.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/Users.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/WorkflowProcess.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/WorkflowProcessInstanceRepository.o ../../../bin/Criteria/Debug/WorkflowEngine/DataBase/XMLDataModelDefines.o ../../../bin/Criteria/Debug/WorkflowEngine/engine/Engine.o ../../../bin/Criteria/Debug/WorkflowEngine/engine/EventsManagerThread.o ../../../bin/Criteria/Debug/WorkflowEngine/engine/IDataType.o ../../../bin/Criteria/Debug/WorkflowEngine/engine/IWorkflow.o ../../../bin/Criteria/Debug/WorkflowEngine/engine/NaturalType.o ../../../bin/Criteria/Debug/WorkflowEngine/engine/Workflow.o ../../../bin/Criteria/Debug/WorkflowEngine/engine/WorkflowManager.o ../../../bin/Criteria/Debug/WorkflowEngine/engine/WorkflowReport.o ../../../bin/Criteria/Debug/WorkflowEngine/engine/WorkFlowThread.o ../../../bin/Criteria/Debug/WorkflowEngine/events/BaseEvent.o ../../../bin/Criteria/Debug/WorkflowEngine/events/BaseProcessEvent.o ../../../bin/Criteria/Debug/WorkflowEngine/events/BaseWorkflowEvent.o ../../../bin/Criteria/Debug/WorkflowEngine/events/CreatedProcessEvent.o ../../../bin/Criteria/Debug/WorkflowEngine/events/CreatingProcessEvent.o ../../../bin/Criteria/Debug/WorkflowEngine/events/EndWorkflowEvent.o ../../../bin/Criteria/Debug/WorkflowEngine/events/ErrorWorkflowEvent.o ../../../bin/Criteria/Debug/WorkflowEngine/events/EventListener.o ../../../bin/Criteria/Debug/WorkflowEngine/events/EventMaker.o ../../../bin/Criteria/Debug/WorkflowEngine/events/ManualWorkflowEvent.o ../../../bin/Criteria/Debug/WorkflowEngine/events/RestartedWorkflowEvent.o ../../../bin/Criteria/Debug/WorkflowEngine/events/StartedWorkflowEvent.o ../../../bin/Criteria/Debug/WorkflowEngine/events/StartingWorkflowEvent.o ../../../bin/Criteria/Debug/WorkflowEngine/events/WorkflowListener.o ../../../bin/Criteria/Debug/WorkflowEngine/ExternalEvent/Event.o ../../../bin/Criteria/Debug/WorkflowEngine/ExternalEvent/EventActions.o ../../../bin/Criteria/Debug/WorkflowEngine/ExternalEvent/EventConsumerPolicy.o ../../../bin/Criteria/Debug/WorkflowEngine/ExternalEvent/EventContext.o ../../../bin/Criteria/Debug/WorkflowEngine/ExternalEvent/EventInvocationPolicy.o ../../../bin/Criteria/Debug/WorkflowEngine/ExternalEvent/EventPolicies.o ../../../bin/Criteria/Debug/WorkflowEngine/ExternalEvent/Events.o ../../../bin/Criteria/Debug/WorkflowEngine/ExternalEvent/EventsDefinition.o ../../../bin/Criteria/Debug/WorkflowEngine/ExternalEvent/EventsManager.o ../../../bin/Criteria/Debug/WorkflowEngine/ExternalEvent/EventSource.o ../../../bin/Criteria/Debug/WorkflowEngine/ExternalEvent/ManagedEventElement.o ../../../bin/Criteria/Debug/WorkflowEngine/ExternalEvent/OccurredEvent.o ../../../bin/Criteria/Debug/WorkflowEngine/ExternalEvent/ScenarioEventAction.o ../../../bin/Criteria/Debug/WorkflowEngine/ExternalEvent/WaitingActivities.o ../../../bin/Criteria/Debug/WorkflowEngine/ExternalEvent/WaitingActivity.o ../../../bin/Criteria/Debug/WorkflowEngine/ExternalEvent/WaitingEvent.o ../../../bin/Criteria/Debug/WorkflowEngine/ExternalEvent/XMLEventDataModelDefines.o ../../../bin/Criteria/Debug/WorkflowEngine/Idioma/Condition.o ../../../bin/Criteria/Debug/WorkflowEngine/Idioma/Evaluator.o ../../../bin/Criteria/Debug/WorkflowEngine/Idioma/Expression.o ../../../bin/Criteria/Debug/WorkflowEngine/Idioma/FreeText.o ../../../bin/Criteria/Debug/WorkflowEngine/Idioma/Function.o ../../../bin/Criteria/Debug/WorkflowEngine/Idioma/ItemInterface.o ../../../bin/Criteria/Debug/WorkflowEngine/Idioma/Keyword.o ../../../bin/Criteria/Debug/WorkflowEngine/Idioma/Parameter.o ../../../bin/Criteria/Debug/WorkflowEngine/tasks/ApplicationFunctionTask.o ../../../bin/Criteria/Debug/WorkflowEngine/tasks/BaseTask.o ../../../bin/Criteria/Debug/WorkflowEngine/tasks/BeginTask.o ../../../bin/Criteria/Debug/WorkflowEngine/tasks/ConditionTask.o ../../../bin/Criteria/Debug/WorkflowEngine/tasks/EventTask.o ../../../bin/Criteria/Debug/WorkflowEngine/tasks/LoopTask.o ../../../bin/Criteria/Debug/WorkflowEngine/tasks/PrimitiveTask.o ../../../bin/Criteria/Debug/WorkflowEngine/tasks/ProcessTask.o ../../../bin/Criteria/Debug/WorkflowEngine/tasks/SubFlowExitTask.o ../../../bin/Criteria/Debug/WorkflowEngine/tasks/XMLTask.o ../../../bin/Criteria/Debug/WorkflowEngine/WAPI/Logger.o ../../../bin/Criteria/Debug/WorkflowEngine/WAPI/WAPI.o ../../../bin/Criteria/Debug/WorkflowEngine/WAPI/WAPIActivity.o ../../../bin/Criteria/Debug/WorkflowEngine/WAPI/WAPIApplication.o ../../../bin/Criteria/Debug/WorkflowEngine/WAPI/WAPIDataBase.o ../../../bin/Criteria/Debug/WorkflowEngine/WAPI/WAPIDataType.o ../../../bin/Criteria/Debug/WorkflowEngine/WAPI/WAPIProcess.o ../../../bin/Criteria/Debug/WorkflowEngine/WAPI/WAPIReport.o ../../../bin/Criteria/Debug/WorkflowEngine/WAPI/WAPIRole.o ../../../bin/Criteria/Debug/WorkflowEngine/WAPI/WAPIService.o ../../../bin/Criteria/Debug/WorkflowEngine/WAPI/WAPIUser.o ../../../bin/Criteria/Debug/WorkflowEngine/WAPI/WAPIWorkflow.o ../../../bin/Criteria/Debug/WorkflowEngine/WAPI/WAPIWorkItem.o
Running target post-build steps
cp /opt/cBPM-android/criteria-lin/bin/Criteria/Debug/WorkflowEngine/libWorkflowEngineD.a /opt/cBPM-android/criteria-lin/lib/
-------------- Build: Debug Win32 in Criteria.Tools.Executor (compiler: GNU ARM GCC Compiler For Android)---------------
arm-linux-androideabi-g++ -L/opt/cBPM-android/criteria-lin/lib -L/opt/android-on-linux/android-ndk-r8e/sources/cxx-stl/stlport/libs/armeabi-v7a -L/opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/ -L/opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.7/armv7-a/ -o /opt/cBPM/criteria-lin/bin/Criteria/Debug/Tools.Executor/executer /opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/crtbegin_static.o /opt/cBPM/criteria-lin/bin/Criteria/Debug/Tools.Executor/src/main.o -static -nostdlib -Wl,-v -Wl,-dy -lc -ldl -lstlport -lstdc++ -Wl,-dn -lgcc -lsqlite -lxerces-c -lLibraries -lWorkflowEngineD /opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/crtend_android.o
collect2 version 4.9 20140827 (prerelease)
/opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.7/../../../../arm-linux-androideabi/bin/ld -plugin /opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/../libexec/gcc/arm-linux-androideabi/4.7/liblto_plugin.so -plugin-opt=/opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/../libexec/gcc/arm-linux-androideabi/4.7/lto-wrapper -plugin-opt=-fresolution=/tmp/ccwc8SHF.res --sysroot=/tmp/ndk-andrewhsieh/build/toolchain/prefix/sysroot --eh-frame-hdr -Bstatic -X -m armelf_linux_eabi -z noexecstack -z relro -z now -o /opt/cBPM/criteria-lin/bin/Criteria/Debug/Tools.Executor/executer -L/opt/cBPM-android/criteria-lin/lib -L/opt/android-on-linux/android-ndk-r8e/sources/cxx-stl/stlport/libs/armeabi-v7a -L/opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/ -L/opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.7/armv7-a/ -L/opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9 -L/opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/../lib/gcc -L/opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.7/../../../../arm-linux-androideabi/lib /opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/crtbegin_static.o /opt/cBPM/criteria-lin/bin/Criteria/Debug/Tools.Executor/src/main.o -v -dy -lc -ldl -lstlport -lstdc++ -dn -lgcc -lsqlite -lxerces-c -lLibraries -lWorkflowEngineD /opt/android-on-linux/android-ndk-r8e/platforms/android-14/arch-arm/usr/lib/crtend_android.o
src/main.cpp:155: error: undefined reference to '__cxa_end_cleanup'
c++