我的目标是在Android手机上运行MPICH。我使用Debian的杰西。我以为我会做到这一点下面这个教程:http://hex.ro/wp/projects/personal-cloud-computing/compiling-mpich2-for-android-and-running-on-two-phones/但不是与Buildroot里面创建工具链,我决定从Android NDK创建它,因为在这个网站:http://www.threadstates.com/articles/2013/setting-up-an-android-cross-compiling-environment-with-the-ndk.html 我试图用MPICH库版本2.1.4,2.1.5,3.0.4和使用命令进行配置:
My goal is to run MPICH on Android phones. I'm using Debian Jessie. I thought that I'll achieve that following this tutorial: http://hex.ro/wp/projects/personal-cloud-computing/compiling-mpich2-for-android-and-running-on-two-phones/ but instead of creating toolchain with Buildroot I decided to create it from Android NDK, as on this site: http://www.threadstates.com/articles/2013/setting-up-an-android-cross-compiling-environment-with-the-ndk.html I tried to use MPICH library versions 2.1.4, 2.1.5, 3.0.4 and configure it using command:
sudo CFLAGS=" -march=armv5 -mfpu=vfp -static "
CC=/home/cerbia/android/bin/arm-linux-androideabi-gcc ./configure
--prefix=/home/cerbia/old --host=arm-linux --with-pm=smpd --disable-f77 --disable-fc
但我仍然有这样那样的错误:
but I still had this kind of error:
配置:错误:SMPD需要MD5的支持,并配置不能 找到md5.h无论md5_calc或MD5 OpenSSL中/ md5.h
configure: error: SMPD requires MD5 support, and configure could not find either md5_calc in md5.h or MD5 in openssl/md5.h
我发现,它与OpenSSL的版本,连我试着按照使用说明:
I found, that it is connected with openssl version and I tried to follow this instruction:
下载,编译,修改和OpenSSL安装到NDK目录。 CD〜wget的www.openssl.org/source/openssl-1.0.0g.tar.gz焦油xvzf
Download, compile, modify and install OpenSSL to the NDK directory. cd ~ wget www.openssl.org/source/openssl-1.0.0g.tar.gz tar xvzf
的OpenSSL 1.0.0g.tar.gz CD的OpenSSL 1.0.0g ./config中没有ASM共享 - preFIX = $ ANDROID_ROOT /平台/ Android的3 /弓臂的/ usr
openssl-1.0.0g.tar.gz cd openssl-1.0.0g ./config no-asm shared --prefix=$ANDROID_ROOT/platforms/android-3/arch-arm/usr
修改Makefile文件:结果 CC =臂Linux的gnueabi-GCC-4.6
edit Makefile: CC= arm-linux-gnueabi-gcc-4.6
CFLAG = -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DOPENSSL_N -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer的-fPIC -Wall
CFLAG= -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DOPENSSL_N -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -fPIC
DEPFLAG = -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_R C5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_STORE
DEPFLAG= -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_R C5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_STORE
PEX_LIBS =
PEX_LIBS=
EX_LIBS = -ldl
EX_LIBS= -ldl
EXE_EXT =
EXE_EXT=
ARFLAGS =
ARFLAGS=
AR =臂Linux的gnueabi-AR $(ARFLAGS)R
AR= arm-linux-gnueabi-ar $(ARFLAGS) r
RANLIB =臂Linux的gnueabi-ranlib的
RANLIB= arm-linux-gnueabi-ranlib
NM =臂Linux的gnueabi纳米
NM= arm-linux-gnueabi-nm
PERL =的/ usr / bin中/ perl的
PERL= /usr/bin/perl
TAR =焦油
TARFLAGS = --no递归
TARFLAGS= --no-recursion
MAKEDEPPROG = GCC
MAKEDEPPROG= gcc
LIBDIR = LIB
LIBDIR=lib
而不是比HIPL的我试图在类似的方式交叉编译MPICH如下
Than instead of HIPL I tried to cross-compile MPICH in the analogous way as below
下载和交叉编译HIPL。 CD〜BZR合作LP:HIPL干线CD干线编辑configure.ac和注释掉所有AM_CFLAGS autoreconf --install
Download and cross-compile HIPL. cd ~ bzr co lp:hipl trunk cd trunk edit configure.ac and comment out all AM_CFLAGS autoreconf --install
./配置--disable-GCC-警告--disable防火墙-host =臂的Linux
./configure --disable-gcc-warn --disable-firewall -host=arm-linux
CC =臂Linux的gnueabi-GCC-4.6
CC=arm-linux-gnueabi-gcc-4.6
CPPFLAGS = - I $ ANDROID_ROOT /平台/ Android的3 /弓臂/ usr / include目录
CPPFLAGS="-I$ANDROID_ROOT/platforms/android-3/arch-arm/usr/include"
CFLAGS = - nostdlib
CFLAGS="-nostdlib"
LDFLAGS=\"-Wl,-rpath-link=$ANDROID_ROOT/platforms/android-3/arch-arm/usr/lib,-L$ANDROID_ROOT/platforms/android-3/arch-arm/usr/lib\"
LDFLAGS="-Wl,-rpath-link=$ANDROID_ROOT/platforms/android-3/arch-arm/usr/lib,-L$ANDROID_ROOT/platforms/android-3/arch-arm/usr/lib"
LIBS = - LC让让所有-AM使[1]:进入目录`/家庭/ mkomu /项目/ HIPL-的bzr / ARM的CC的lib /核心/ builder.lo在文件
LIBS="-lc" make make all-am make[1]: Entering directory `/home/mkomu/projects/hipl-bzr/arm' CC lib/core/builder.lo In file
从LIB /核心/ debug.h包括:34:0,
included from lib/core/debug.h:34:0,
from lib/core/crypto.h:43,
from lib/core/builder.c:100: lib/core/protodefs.h:917:5: error: unknown type name 'in_port_t'
的lib /核心/ protodefs.h:929:5:错误:未知类型名称'in_port_t
lib/core/protodefs.h:929:5: error: unknown type name 'in_port_t'
的lib /核心/ protodefs.h:1027:5:错误:未知类型名称'in_port_t
lib/core/protodefs.h:1027:5: error: unknown type name 'in_port_t'
的lib /核心/ protodefs.h:1036:5:错误:未知类型名称'in_port_t
lib/core/protodefs.h:1036:5: error: unknown type name 'in_port_t'
的lib /核心/ protodefs.h:1043:5:错误:未知类型名称'in_port_t
lib/core/protodefs.h:1043:5: error: unknown type name 'in_port_t'
的lib /核心/ protodefs.h:1054:5:错误:未知类型名称'in_port_t
lib/core/protodefs.h:1054:5: error: unknown type name 'in_port_t'
的lib /核心/ protodefs.h:1055:5:错误:未知类型名称'in_port_t'...
lib/core/protodefs.h:1055:5: error: unknown type name 'in_port_t' ...
它来自网站:bugs.launchpad.net/hipl/+bug/715126
it comes from site: bugs.launchpad.net/hipl/+bug/715126
但我得到了同样的错误,因为人有..
but I got the same errors as person there..
请[8]:Wejście做katalogu `/home/cerbia/old/mpich2-1.3.2/src/mpid/ch3/channels/nemesis/nemesis/netmod/tcp CC tcp_finalize.c在文件中包含来自 tcp_finalize.c:7:0:tcp_impl.h:108:89:错误:未知类型名称 in_port_t使[8]: * 的[tcp_finalize.o] BLAD 1
make[8]: Wejście do katalogu `/home/cerbia/old/mpich2-1.3.2/src/mpid/ch3/channels/nemesis/nemesis/netmod/tcp' CC tcp_finalize.c In file included from tcp_finalize.c:7:0: tcp_impl.h:108:89: error: unknown type name 'in_port_t' make[8]: * [tcp_finalize.o] Błąd 1
你有什么建议,我应该尽量做到工作?
Do you have any advices what I should try to make it working?
在Linux中, in_port_t
被typedef为 uint16_t
在 netinet / in.h中
。使用此类型定义的唯一地方是在 SOCKADDR_IN
。
In Linux, in_port_t
is typedefed as uint16_t
in netinet/in.h
. The only place this typedef is used is in the definition of sockaddr_in
.
而Android NDK没有定义或使用 in_port_t
,而是使用无符号的短整型
。要使用Android NDK编译code,无论是的typedef in_port_t
或取代它的无符号短整型
。
The Android NDK does not define or use in_port_t
, but instead uses unsigned short int
. To compile code using the Android NDK, either typedef in_port_t
or replace it with unsigned short int
.