Martin and all, Thanks for your comments!
I run cross-compiling by command "CC=arm-none-linux-gnueabi-gcc ./configure --build=i686-linux --host=arm-none-linux-gnueabi", but I met "configure: error: GNU Multi Precision library gmp not found" issue. Cross-compiling failed. I checked that gmp-4.1.4-6.2.1 had been installed on my fedora system. I suspect that it's caused by low version of gmp, and I had tried to install a higher version of gmp-4.3.2, but it seems failed (After installing 4.3.2, rpm -qa | grep gmp still shows gmp-4.1.4-6.2.1). [root@femtoGPS gmp-4.3.2]# uname -a Linux femtoGPS 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006 i686 i686 i386 GNU/Linux [root@femtoGPS strongswan-4.4.0_cross_compile]# rpm -qa | grep gmp gmp-4.1.4-6.2.1 gmp-devel-4.1.4-6.2.1 [root@femtoGPS strongswan-4.4.0_cross_compile]# rpm -qf /usr/include/gmp.h gmp-devel-4.1.4-6.2.1 [root@femtoGPS strongswan-4.4.0_cross_compile]# [root@femtoGPS strongswan-4.4.0_cross_compile]# CC=arm-none-linux-gnueabi-gcc ./configure --build=i686-linux --host=arm-none-linux-gnueabi checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for arm-none-linux-gnueabi-strip... arm-none-linux-gnueabi-strip checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking how to create a ustar tar archive... gnutar checking for arm-none-linux-gnueabi-pkg-config... no checking for pkg-config... /usr/local/bin/pkg-config configure: WARNING: using cross tools not prefixed with host triplet checking pkg-config is at least version 0.9.0... yes checking for arm-none-linux-gnueabi-gcc... arm-none-linux-gnueabi-gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... yes checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether arm-none-linux-gnueabi-gcc accepts -g... yes checking for arm-none-linux-gnueabi-gcc option to accept ISO C89... none needed checking for style of include used by make... GNU checking dependency style of arm-none-linux-gnueabi-gcc... gcc3 ./configure: line 6023: AC_LIB_PREFIX: command not found checking how to run the C preprocessor... arm-none-linux-gnueabi-gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking whether byte ordering is bigendian... no checking build system type... i686-pc-linux-gnu checking host system type... arm-none-linux-gnueabi checking for a sed that does not truncate output... /bin/sed checking for fgrep... /bin/grep -F checking for ld used by arm-none-linux-gnueabi-gcc... /root/jingenli/arm_none_linux/arm-2009q1/arm-none-linux-gnueabi/bin/ld checking if the linker (/root/jingenli/arm_none_linux/arm-2009q1/arm-none-linux-gnueabi/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /root/jingenli/arm_none_linux/arm-2009q1/bin/arm-none-linux-gnueabi-nm -B checking the name lister (/root/jingenli/arm_none_linux/arm-2009q1/bin/arm-none-linux-gnueabi-nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 98304 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking for /root/jingenli/arm_none_linux/arm-2009q1/arm-none-linux-gnueabi/bin/ld option to reload object files... -r checking for arm-none-linux-gnueabi-objdump... arm-none-linux-gnueabi-objdump checking how to recognize dependent libraries... pass_all checking for arm-none-linux-gnueabi-ar... arm-none-linux-gnueabi-ar checking for arm-none-linux-gnueabi-strip... (cached) arm-none-linux-gnueabi-strip checking for arm-none-linux-gnueabi-ranlib... arm-none-linux-gnueabi-ranlib checking command to parse /root/jingenli/arm_none_linux/arm-2009q1/bin/arm-none-linux-gnueabi-nm -B output from arm-none-linux-gnueabi-gcc object... ok checking for dlfcn.h... yes checking for objdir... .libs checking if arm-none-linux-gnueabi-gcc supports -fno-rtti -fno-exceptions... no checking for arm-none-linux-gnueabi-gcc option to produce PIC... -fPIC -DPIC checking if arm-none-linux-gnueabi-gcc PIC flag -fPIC -DPIC works... yes checking if arm-none-linux-gnueabi-gcc static flag -static works... yes checking if arm-none-linux-gnueabi-gcc supports -c -o file.o... yes checking if arm-none-linux-gnueabi-gcc supports -c -o file.o... (cached) yes checking whether the arm-none-linux-gnueabi-gcc linker (/root/jingenli/arm_none_linux/arm-2009q1/arm-none-linux-gnueabi/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking for egrep... (cached) /bin/grep -E checking for gawk... (cached) gawk checking for flex... flex checking lex output file root... lex.yy checking lex library... none needed checking whether yytext is a pointer... no checking for bison... bison -y checking for perl... /usr/bin/perl checking for gperf... no checking gperf version >= 3.0.0... not found checking for uid of user "root"... 0 checking for gid of group "root"... 0 configure: Enforcing --enable-socket-raw, as pluto is enabled checking for stdbool.h that conforms to C99... yes checking for _Bool... yes checking for working alloca.h... yes checking for alloca... yes checking for library containing dlopen... -ldl checking for library containing backtrace... none required checking for backtrace... yes checking for library containing socket... none required checking for library containing clock_gettime... -lrt checking for clock_gettime... yes checking for library containing pthread_create... -lpthread checking for dladdr... yes checking for pthread_condattr_setclock(CLOCK_MONOTONE)... unknown checking for pthread_condattr_setclock... yes checking for pthread_condattr_init... yes checking for pthread_cond_timedwait_monotonic... no checking for pthread_cancel... yes checking for pthread_rwlock_init... yes checking for prctl... yes checking sys/sockio.h usability... no checking sys/sockio.h presence... no checking for sys/sockio.h... no checking net/pfkeyv2.h usability... no checking net/pfkeyv2.h presence... no checking for net/pfkeyv2.h... no checking netipsec/ipsec.h usability... no checking netipsec/ipsec.h presence... no checking for netipsec/ipsec.h... no checking netinet6/ipsec.h usability... no checking netinet6/ipsec.h presence... no checking for netinet6/ipsec.h... no checking linux/udp.h usability... yes checking linux/udp.h presence... yes checking for linux/udp.h... yes checking for struct sockaddr.sa_len... no checking for struct sadb_x_policy.sadb_x_policy_priority... yes checking for in6addr_any... yes checking for in6_pktinfo... yes checking for IPSEC_MODE_BEET... yes checking for IPSEC_DIR_FWD... yes checking for gcc atomic operations... no checking for register_printf_specifier... no checking for register_printf_function... yes checking for main in -lgmp... no configure: error: GNU Multi Precision library gmp not found Best regards Jingen, Liu ------------ Alcatel-Lucent Shanghai Bell Co.,Ltd. WSPD NanJing R&D Center. Floor 10, Changjiang Technological Park, No.40, Nanchang Road, GuLou District. -----Original Message----- From: Martin Willi [mailto:mar...@strongswan.org] Sent: 2013年2月20日 20:46 To: LIU Jingen Cc: Dev@lists.strongswan.org Subject: Re: [strongSwan-dev] Could anyone tell me how to compile strongswan codes for ARM platform? Hi, > Could anyone tell me how to compile strongswan codes for ARM platform? > Cross-compile is necessary, could anyone tell me detail steps? strongSwan uses the autotools build system, which provides good support for cross-compiling. There is a lot of information out there how this works, have a look at [1] for a start. Regards Martin [1]http://www.gnu.org/software/automake/manual/html_node/Cross_002dCompilation.html _______________________________________________ Dev mailing list Dev@lists.strongswan.org https://lists.strongswan.org/mailman/listinfo/dev