cross compile qt5everywhere for arm CortexA8

这是在Linux环境下使用交叉编译工具链为ARM Cortex-A8处理器编译Qt5 Everywhere开源版本的过程。配置包括指定前缀、禁用某些特性、设置库路径、选择编译选项等。然而,编译过程中遇到了一些问题,如符号绑定错误、找不到依赖库(如libstdc++、libgcc_s)以及系统头文件缺失(如sqlcli.h、fontconfig.h等)。这可能需要检查工具链设置和依赖项安装。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

shell.albert@yantai:~/oristar/qt-everywhere-opensource-src-5.3.2>./cross_compile.sh

+ cd qtbase

+/home/shell.albert/oristar/qt-everywhere-opensource-src-5.3.2/qtbase/configure-top-level -prefix /home/shell.albert/oristar/build -release-opensource -confirm-license -no-c++11 -shared -process -largefile-accessibility -no-qml-debug -no-sse2 -no-sse3 -no-ssse3 -no-sse4.1-no-sse4.2 -no-avx -no-avx2 -no-mips_dsp -no-mips_dspr2-no-pkg-config -qt-zlib -mtdev -no-journald -qt-libpng -qt-libjpeg-qt-freetype -qt-harfbuzz -openssl -qt-pcre -qt-xcb -xkb-config-root-qt-xkbcommon -xinput2 -xcb-xlib -glib -no-pulseaudio -no-alsa-no-gtkstyle -make libs -make tools -nomake examples -verbose -no-nis-no-cups -iconv -evdev -icu -fontconfig -strip -no-pch -dbus -xcb-no-eglfs -directfb -linuxfb -no-kms -qpa xcb -sysroot/home/shell.albert/tools/toolschain_arm/4.4.3/arm-none-linux-gnueabi/sys-root-xplatform linux-arm-gnueabi-g++ -qreal float -no-opengl-L/home/shell.albert/tools/toolschain_arm/4.4.3/arm-none-linux-gnueabi/sys-root/lib-continue


This is the Qt OpenSource Edition.


You are licensed touse this software under the terms of

the Lesser GNUGeneral Public License (LGPL) versions 2.1.

You are alsolicensed to use this software under the terms of

the GNU GeneralPublic License (GPL) versions 3.


You have alreadyaccepted the terms of the Open Source license.


/home/shell.albert/tools/toolschain_arm/4.4.3/bin/arm-none-linux-gnueabi-g++-c -fvisibility=hidden fvisibility.c

Symbol visibilitycontrol enabled.

/home/shell.albert/tools/toolschain_arm/4.4.3/bin/arm-none-linux-gnueabi-g++--sysroot=/home/shell.albert/tools/toolschain_arm/4.4.3/arm-none-linux-gnueabi/sys-root-o libtest.so -shared -Wl,-Bsymbolic-functions -fPICbsymbolic_functions.c

bsymbolic_functions.c:2:2:error: #error "Symbolic function binding on this architecturemay be broken, disabling it (see QTBUG-36129)."

Symbolic functionbinding disabled.

DEFAULT_INCDIRS="/home/shell.albert/tools/toolschain_arm/4.4.3/arm-none-linux-gnueabi/include/c++/4.4.3

/home/shell.albert/tools/toolschain_arm/4.4.3/arm-none-linux-gnueabi/include/c++/4.4.3/arm-none-linux-gnueabi

/home/shell.albert/tools/toolschain_arm/4.4.3/arm-none-linux-gnueabi/include/c++/4.4.3/backward

/home/shell.albert/tools/toolschain_arm/4.4.3/lib/gcc/arm-none-linux-gnueabi/4.4.3/include

/home/shell.albert/tools/toolschain_arm/4.4.3/lib/gcc/arm-none-linux-gnueabi/4.4.3/include-fixed

/home/shell.albert/tools/toolschain_arm/4.4.3/arm-none-linux-gnueabi/include

/home/shell.albert/tools/toolschain_arm/4.4.3/arm-none-linux-gnueabi/sys-root/usr/include

"

DEFAULT_LIBDIRS="/home/shell.albert/tools/toolschain_arm/4.4.3/lib/gcc/arm-none-linux-gnueabi/4.4.3

/home/shell.albert/tools/toolschain_arm/4.4.3/lib/gcc

/home/shell.albert/tools/toolschain_arm/4.4.3/arm-none-linux-gnueabi/lib

/home/shell.albert/tools/toolschain_arm/4.4.3/arm-none-linux-gnueabi/sys-root/lib

/home/shell.albert/tools/toolschain_arm/4.4.3/arm-none-linux-gnueabi/sys-root/usr/lib

"

Creating qmake...

gmake: Nothing to bedone for 'first'.

Runningconfiguration tests...

Determiningarchitecture... ()

/home/shell.albert/tools/toolschain_arm/4.4.3/bin/arm-none-linux-gnueabi-g++-c -pipe--sysroot=/home/shell.albert/tools/toolschain_arm/4.4.3/arm-none-linux-gnueabi/sys-root-g -Wall -W -fPIE -I../../mkspecs/linux-arm-gnueabi-g++ -I. -oarch.o arch.cpp

/home/shell.albert/tools/toolschain_arm/4.4.3/bin/arm-none-linux-gnueabi-g++ -o arch arch.o --sysroot=/home/shell.albert/tools/toolschain_arm/4.4.3/arm-none-linux-gnueabi/sys-root-L/home/shell.albert/tools/toolschain_arm/4.4.3/arm-none-linux-gnueabi/sys-root/lib

Foundarchitecture in binary

CFG_ARCH="arm"

CFG_CPUFEATURES=""

Determiningarchitecture... ()

g++ -c -pipe -g-Wall -W -fPIE -I../../mkspecs/linux-g++ -I. -o arch.o arch.cpp

g++ -o arch arch.o -L/home/shell.albert/tools/toolschain_arm/4.4.3/arm-none-linux-gnueabi/sys-root/lib

/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld:skipping incompatible/home/shell.albert/tools/toolschain_arm/4.4.3/arm-none-linux-gnueabi/sys-root/lib/libstdc++.sowhen searching for -lstdc++

/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld:skipping incompatible/home/shell.albert/tools/toolschain_arm/4.4.3/arm-none-linux-gnueabi/sys-root/lib/libstdc++.awhen searching for -lstdc++

/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld:skipping incompatible/home/shell.albert/tools/toolschain_arm/4.4.3/arm-none-linux-gnueabi/sys-root/lib/libgcc_s.so.1when searching for libgcc_s.so.1

/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld:skipping incompatible/home/shell.albert/tools/toolschain_arm/4.4.3/arm-none-linux-gnueabi/sys-root/lib/libgcc

Cross-compiling Parsec benchmark for ARM architecture involves setting up a build environment on your host machine (likely x86 or x64) that can generate code for ARM targets. Here's a general outline of the steps: 1. **Install required tools**: Ensure you have installed a compiler and toolchain that supports ARM, like `gcc-arm-none-eabi` or `clang-arm`. 2. **Set up target environment**: You'll need to configure the toolchain with the correct paths and settings for the ARM target. This may involve creating a separate configuration file or specifying flags when invoking the compiler. ```sh export CC=arm-none-eabi-gcc export CXX=arm-none-eabi-g++ ``` 3. **Download Parsec**: Download the latest version of Parsec, which is a benchmarking suite, and extract it to a suitable location. 4. **Configure Makefile**: If Parsec has a Makefile, modify it to specify the target architecture. Look for lines similar to `CC`, `CFLAGS`, or `LDFLAGS`. Add or update them as needed, using the ARM-specific versions. 5. **Build for ARM**: Run `make clean && make` in the Parsec directory, replacing `make` with the appropriate command for your build system (e.g., `ninja` if you're using Ninja). ```sh make TARGET=arm-linux-gnueabihf ``` 6. **Test on ARM device or emulator**: Copy the generated `.elf` (executable) file to an ARM device or use an emulator to run it. **Related questions:** 1. What specific version of the ARM toolchain do I need? 2. How can I deal with dependencies if they don't have ARM builds available? 3. Are there any libraries or patches I need to include for compatibility with Parsec on ARM?
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值