ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

交叉编译

2022-01-04 15:03:51  阅读:210  来源: 互联网

标签:enable qt 交叉 -- 5.9 编译 linux aarch64


//////////////////////////////////////////////
// cross compile for qt(aarch64-linux)
. download qt source code
https://download.qt.io/archive/qt/
qt-everywhere-opensource-src-5.9.5.tar.xz is source code
qt-opensource-linux-x64-5.9.5.run is for linux
. use command line "apt-get install qt..." install qt at /usr/bin/ /usr/lib/
. build cross compile env
1) Compilers: add /usr/bin/aarch64-linux-gnu-gcc /usr/bin/aarch64-linux-gnu-g++
"which aarch64-linux-gnu-gcc" command give the directory
2) Qt Versions: add Qt5.9.5(qte-5.9.5) at /opt/qte-5.9.5/bin/qmake
3) Kits: Name:aarch64, Device type:Generic Linux Device, Compiler C: ARM_GCC C++: ARM_G++
Debuger: none, qt version: Qt5.9.5(qte-5.9.5)
.build qt source file
1)configure qmake at source code qt-5.9.5/qtbase/mkspecs/linux-aarch64-gnu-g++/qmake.conf
add QT_QPA_DEFAULT_PLATFORM = linuxfb, others keep the same
2)configure step
./configure -prefix /opt/qte-5.9.5 \
-opensource \
-confirm-license \
-release \
-shared \
-accessibility \
-c++std c++11 \
-xplatform linux-aarch64-gnu-g++ \
-qpa linuxfb \
-linuxfb \
-qreal float \
-pch \
-qt-libjpeg \
-qt-zlib \
-qt-libpng \
-no-sse2 \
-no-largefile \
-no-qml-debug \
-no-glib \
-no-gtkstyle \
-no-opengl \
-nomake tools \
-nomake examples \
-skip qt3d -skip qtcanvas3d -skip qtdoc -skip qtwayland
3)make&make install

//////////////////////////////////////////////
// cross compile for opencv(aarch64-linux)
.use cmake to configure
1)Specify options for cross-compiling
Operating System=arm-linux
C=/usr/bin/aarch64-linux-gnu-gcc C++=/usr/bin/aarch64-linux-gnu-g++
Target Root=/opt/qte-5.9.5
notice that program mode should be: search in target root, then native system
2) CMAKE_INSTALL_PREFIX=/home/opencve-2.4.10 CMAKE_FINE_ROOT_PATH=/opt/qte-5.9.5
.go to build_aarch64 file path, use command line to build
make&sudo make install
be careful: 3rdparty like libpng, libjpeg should use -fpic to link, modifies flag.make file

//////////////////////////////////////////////

compile x264(x64-linux)
./configure --enable-shared
make&sudo make install

//////////////////////////////////////////////

compile ffmpeg(x64-linux)

.sdl2 is necessary for ffplay, http://libsdl.org/release/
.x264 is the a good .h264 impelmentation
./configure --enable-shared --enable-swscale --enable-gpl --enable-nonfree
--enable-pic --prefix=/home/ffmpeg --enable-version3 --enable-postproc
--enable-pthreads --enable-x254
make&sudo make install

 

标签:enable,qt,交叉,--,5.9,编译,linux,aarch64
来源: https://www.cnblogs.com/luofeiju/p/15712219.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有