交叉编译的Qt的PANDABOARD [英] Cross-compiling Qt for Pandaboard

查看:211
本文介绍了交叉编译的Qt的PANDABOARD的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我花费数周试图交叉编译的Qt为我的熊猫板,没办法,我无法通过的./configure。如果有人可以给我帮忙,我会AP preciate。

I spend weeks trying to cross compile Qt for my Panda board and no way, I can't pass the ./configure. If someone could give me a help I'll appreciate.

我的主机系统为Ubuntu的13.04×86_64bit(UN运行VirtualBox的)

My host system is Ubuntu-13.04 ×86_64bit(running un Virtualbox)

我的目标系统是PANDABOARD ES Ubuntu的12.04。

My target system is Pandaboard ES Ubuntu-12.04.

在主机箱的所有步骤:

sudo apt-get install arm-linux-gnueabihf

sudo mkdir /opt/qt-485-armhf

cd /usr/src

sudo wget http://download.qt-project.org/official_releases/qt/4.8/4.8.5/qt-everywhere-opensource-src-4.8.5.tar.gz

sudo tar xf qt-everywhere-opensource-src-4.8.5.tar.gz

cd /usr/src/qt-everywhere-opensource-src-4.8.5

sudo cp -r mkspecs/qws/linux-arm-gnueabi-g++ mkspecs/qws/linux-arm-gnueabihf-g++

sudo vim mkspecs/qws/linux-arm-gnueabihf-g++/qmake.conf
-------------------------------
include(../../common/gcc-base-unix.conf)
include(../../common/g++-unix.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)

#Compiler Flags to take advantage of the ARM architecture
#N.B.:I also tried to uncomment the two following instructions with no success   
QMAKE_CFLAGS = -march=armv7-a -mtune=cortex-a9 -mfpu=neon -mfloat-abi=hard
QMAKE_CXXFLAGS = -march=armv7-a -mtune=cortex-a9 -mfpu=neon -mfloat-abi=hard

# modifications to g++.conf
QMAKE_CC                = arm-linux-gnueabihf-gcc
QMAKE_CXX               = arm-linux-gnueabihf-g++
QMAKE_LINK              = arm-linux-gnueabihf-g++
QMAKE_LINK_SHLIB        = arm-linux-gnueabihf-g++

# modifications to linux.conf
QMAKE_AR                = arm-linux-gnueabihf-ar cqs
QMAKE_OBJCOPY           = arm-linux-gnueabihf-objcopy
QMAKE_STRIP             = arm-linux-gnueabihf-strip

load(qt_config)
---------------------------------

sudo sed -i -e "/#if/d" -e "/#error/d" -e "/#endif/d" config.tests/unix/libmng/libmng.cpp (This command fixes detection of libmng 2.0.)
export QTDIR=/opt/qt4-485-armhf
And finally:
sudo ./configure -prefix /opt/qt4-485-armhf -sysconfdir /etc/xdg -embedded arm -little-endian -host-big-endian -no-qt3support -nomake examples -nomake demos -opensource -confirm-license -release -openssl-linked -no-phonon -no-phonon-backend -no-nis -platform qws/linux-x86_64-g++ -xplatform qws/linux-arm-gnueabihf-g++ -optimized-qmake

With this result:
Creating qmake. Please wait...
g++ -c -o option.o -pipe -m64 -DQMAKE_OPENSOURCE_EDITION -O2 -g -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -Igenerators/integrity -I/usr/src/qt-everywhere-opensource-src-4.8.5/include -I/usr/src/qt-everywhere-opensource-src-4.8.5/include/QtCore -I/usr/src/qt-everywhere-opensource-src-4.8.5/src/corelib/global -I/usr/src/qt-everywhere-opensource-src-4.8.5/src/corelib/xml -I/usr/src/qt-everywhere-opensource-src-4.8.5/tools/shared -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/usr/src/qt-everywhere-opensource-src-4.8.5/mkspecs/qws/linux-x86_64-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DEPRECATED  option.cpp
g++ -o "/usr/src/qt-everywhere-opensource-src-4.8.5/bin/qmake" project.o property.o main.o makefile.o unixmake2.o unixmake.o mingw_make.o option.o winmakefile.o projectgenerator.o meta.o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o borland_bmake.o msvc_vcproj.o msvc_vcxproj.o msvc_nmake.o msvc_objectmodel.o msbuild_objectmodel.o symmake.o initprojectdeploy_symbian.o symmake_abld.o symmake_sbsv2.o symbiancommon.o registry.o epocroot.o gbuild.o qtextcodec.o qutfcodec.o qstring.o qtextstream.o qiodevice.o qmalloc.o qglobal.o qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlist.o qfile.o qfilesystementry.o qfilesystemengine_unix.o qfilesystemengine.o qfilesystemiterator_unix.o qfsfileengine_unix.o qfsfileengine.o qfsfileengine_iterator.o qregexp.o qvector.o qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o qfileinfo.o qdatetime.o qstringlist.o qabstractfileengine.o qtemporaryfile.o qmap.o qmetatype.o qsettings.o qsystemerror.o qlibraryinfo.o qvariant.o qvsnprintf.o qlocale.o qlocale_tools.o qlocale_unix.o qlinkedlist.o qnumeric.o qcryptographichash.o qxmlstream.o qxmlutils.o  


You have not explicitly asked to use pkg-config and are cross-compiling.
pkg-config will not be used to automatically query cflag/lib parameters for
dependencies


The system floating point format could not be detected.
This may cause data to be generated in a wrong format
Turn on verbose messaging (-v) to see the final report.
OpenSSL support cannot be enabled due to functionality tests!
 Turn on verbose messaging (-v) to ./configure to see the final report.
 If you believe this message is in error you may use the continue
 switch (-continue) to ./configure to continue.

先谢谢了。

推荐答案

要交叉编译程序您必须具有的发展的文件相同的包安装在 PC 作为对 ARM目标的。 的Qt 4.8 的依赖的的OpenSSL 的,所以如果你想编译的的Qt ARM 发布EM>

To cross-compile a program on a PC you must have the development files for the same packages installed on the PC as the ARM target. Qt 4.8 depends on OpenSSL, so you must get the correct development files for the ARM release if you wish to compile Qt.


  1. 安装Ubuntu的12.04 PC虚拟框。 版本相同板

  2. 让编译器。 的apt-get安装臂Linux的gnueabihf (你知道)。

  3. 需要开发包的。 的apt-get安装的libssl-dev的
    apt-get的建设-DEP -aarmhf QT4 (只适用于X11)。

  4. 编辑您的的Qt 的配置,以满足您的需求,并建立它。

  1. Install a Ubuntu 12.04 PC virtual box. SAME VERSION as the board.
  2. Get the compiler. apt-get install arm-linux-gnueabihf (You knew that).
  3. Get required development packages. apt-get install libssl-dev or
    apt-get build-dep -aarmhf qt4 (which only works for X11).
  4. Edit your Qt configuration to suit your needs and build it.

你缺少当前步是的第3步的;但执行它,你需要的第1步的或一些其他方式来获得的的OpenSSL 的开发文件的Ubuntu 12.04。有可能是一些其他的方式做到这一点使用的 apt.sources 的。我觉得上面的步骤将是最简单的你。

The current step you are missing is step 3; but to perform it you need step 1 or some other way to get the OpenSSL development files for Ubuntu 12.04. There is probably some other way to do this using apt.sources. I think the steps above will be easiest for you.

这篇关于交叉编译的Qt的PANDABOARD的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆