Articles of 交叉编译

Android-Ndk与交叉编译? 这两个工作,那么Android NDK的需求是什么?

我可以交叉编译任何C / C ++应用程序,静态链接它的Linux库,并在android上运行它。然后,Android-ndk的需求是什么?Android-ndk限制我们仿生,其中有一小部分gnu libc.Isn直接交叉编译应用程序并通过Android shell运行它更好吗?交叉编译是否有任何限制,我看不到? 这个URL: Linux应用程序可以在Android中运行吗? 在一定程度上回答了我的问题,但最终让我感到困惑和不清楚。

使用ELDK 5.3 APR.H ssize_t错误在Centos 6.3上交叉编译用于ARM的freeswitch

我想在CentOS 6.3上使用ELDK 5.3交叉编译ARM的freeswitch。 在make上发现这个错误: ./include/apr.h:347:2: error: #error Can not determine the proper size for ssize_t 我已经做了以下声明 declare -x CROSS_COMPILE="/opt/eldk-5.3/armv5te/sysroots/i686-eldk-linux/usr/bin/armv5te-linux-gnueabi/arm-linux-gnueabi-" declare -x CC="$CROSS_COMPILE"gcc declare -x CXX="$CROSS_COMPILE"g++ declare -x CPP="$CROSS_COMPILE"cpp declare -x STRIP="$CROSS_COMPILE"strip declare -x RANLIB="$CROSS_COMPILE"ranlib declare -x AR="$CROSS_COMPILE"ar declare -x AS="$CROSS_COMPILE"as declare -x NM="$CROSS_COMPILE"nm declare -x LD="$CROSS_COMPILE"ld export PATH=$PATH:/opt/eldk-5.3/armv5te/sysroots/i686-eldk-linux/usr/bin/armv5te-linux-gnueabi 使用以下标志进行configuration ./configure –target=arm –host=arm-linux –build=i686-linux –prefix=/opt/eldk-5.3/armv5te/rootfs-base/armcodasVL ac_cv_file__dev_ptmx=yes […]

交叉编译期望用于ARM

我已经下载expect5.4 。 我试图交叉编译ARM(PandaBoard)运行精简版的Linux。 在configuration的初始设置,我尝试 Shell$ ./configure –host=ARM configure: WARNING: If you wanted to set the –build type, don't use –host. If a cross compiler is detected then cross compile mode will be used. checking for correct TEA configuration… ok (TEA 3.9) configure: configuring expect 5.45 checking for Tcl configuration… found /home/user1/scripts/tcl8.6.0/unix/tclConfig.sh checking for existence of […]

在32位debian系统上生成64位代码

您能否介绍一下,您是如何在32位debian机器上安装gcc-multilib和g ++ – multilib来生成64位代码的? 我在我的32位debian系统上安装了gcc-4.7.2(还安装了binutils-2.23)。 当我尝试用-m64标志编译一个简单的hello世界程序 # gcc -m64 hello.c 我收到以下错误消息: "hello.c:1:0: sorry, unimplemented: 64-bit mode not compiled in" . 请告诉我在32位debian系统上生成64位代码的步骤。

Makefile编译内核模块以包含树源文件

我是新编译内核模块,使用makefile包含树源文件。 我已经阅读了一些教程,但仍然不足。 没有太细节,我创build了一个场景来描述问题和生成的makefile。 dir1/main.c dir2/subdir2/file.c dir2/subdir2/include/file.h 以下是生成的makefile obj-m:=main.o main-y := ../dir2/include/file.o KDIR := /home/userid/rowboat-android/kernel/ PWD := $(shell pwd) default: $(MAKE) ARCH=arm CROSS_COMPILE=/home/userid/rowboat-android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- -C $(KDIR) SUBDIRS=$(PWD) modules clean $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) clean 根据描述的这个场景,这个Makefile是否正确? 参考资料讨论了ccflags-y和EXTRA_CFLAGS。 有人可以解释这些交换机的目的吗? 我的主要参考来源是 构build外部模块 Linux内核Makefiles 问题和答案Stackoverflow 预先感谢您的时间

用arm-none-eabi-gcc编译hello world程序C时出错

我想在Linux 64位机器上用C语言编译一个hello world程序。 我正在使用ARM交叉编译器将我的应用程序加载到ARM处理器上。 但是,使用arm-none-eabi-gcc -o hello hello.c编译代码时,出现一系列错误: /home/dico/gcc-arm-none-eabi-4_7-2013q3/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-在exit': exit.c:(.text.exit+0x2c): undefined reference to函数exit': exit.c:(.text.exit+0x2c): undefined reference to _exit'/ home / dico / gcc-arm-none -eabi-4_7-2013q3 / bin中/../ LIB / GCC /臂-NONE-EABI / 4.7.4 /../../../../臂-NONE-EABI / LIB /的libc.a( lib_a-sbrkr.o):函数_sbrk_r': sbrkr.c:(.text._sbrk_r+0x18): undefined reference to _sbrk'/ home / dico / gcc-arm-none-eabi-4_7-2013q3 / bin /。 ./lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/libc.a(lib_a-writer.o):在函数_write_r': writer.c:(.text._write_r+0x20): undefined reference to […]

为旧的Linux内核设置Buildroot

我在尝试为旧的Linux内核设置交叉编译器时遇到问题。 cp -dpRf package/config/buildroot-config /tmp/buildroot/buildroot-2009.02/project_build_mips/uclibc/buildroot-config (cd /tmp/buildroot/buildroot-2009.02/toolchain_build_mips/linux-2.6.15; \ /usr/bin/make -j1 ARCH=mips \ HOSTCC="/usr/bin/gcc" HOSTCFLAGS="" \ HOSTCXX="/usr/bin/g++" \ INSTALL_HDR_PATH=/tmp/buildroot/buildroot-2009.02/toolchain_build_mips/linux headers_install; \ ) make[1]: Entering directory `/tmp/buildroot/buildroot-2009.02/toolchain_build_mips/linux-2.6.15' Makefile:486: .config: No such file or directory make[1]: *** No rule to make target `headers_install'. Stop. make[1]: Leaving directory `/tmp/buildroot/buildroot-2009.02/toolchain_build_mips/linux-2.6.15' make: *** [/tmp/buildroot/buildroot-2009.02/toolchain_build_mips/linux/.configured] Error 2 注意make[1]: *** No rule to […]

交叉编译树莓派bcm2835-1.42库。

我正在尝试在Ubuntu中为我的树莓派板交叉编译库bcm2835-1.42。 下载库并使用以下命令进行交叉编译: wget http:www.airspayce.com/mikem/bcm2835/bcm2835-1.42.tar.gz tar -xvf bcm2835-1.42.tar.gz cd bcm2835-1.42 ./configure -host = arm -prefix = $(DEVELROOT)CC = arm-linux-gnueabihf-gcc-4.8 ar = arm-linux-gnueabihf-ar-4.8 使 当我使源代码我坚持以下错误消息。 /tmp/ccxDzazg.s:汇编信息: /tmp/ccxDzazg.s:299错误:无效屏障types – dmb ldr r0,[r0] dmb' /tmp/ccxDzazg.s:365: Error: invalid barrier type — dmb str r1,[r0] dmb' /tmp/ccxDzazg.s:453错误:无效屏障types – dmb ldr r0,[r0] dmb' /tmp/ccxDzazg.s:480: Error: invalid barrier type — dmb str r1,[r6] […]

arm-linux-gnueabi-ld和fpc ppcrossarm仍然链接到linux-i386

我能够为arm构build一个freepascal交叉编译器,但是现在当我想要在lazarus中构build一个简单的graphics应用程序或者重新生成LCL时,编译工作直到被称为arm-linux-gnueabi-ld哪一个还在寻找所有graphics库/ usr / lib / gcc / i586-linux-gnu / 4.9 /改为/usr/lib/gcc/arm-linux-gnueabi/4.9。 所以我怎么能解决它? /usr/bin/arm-linux-gnueabi-ld: skipping incompatible /usr/lib/gcc/i586-linux-gnu/4.9/crtbegin.o when searching for /usr/lib/gcc/i586-linux-gnu/4.9/crtbegin.o

如何解决../libcrypto.so:未定义的引用到'rc4_md5_enc'?

我想在64位ubuntu上为ARM交叉编译openssl。 我收到以下错误 : undefined reference to `BIO_f_zlib' ../libcrypto.so: undefined reference to `rc4_md5_enc' ../libcrypto.so: undefined reference to `mod_exp_512' 请告诉我如何纠正这一点。