ubuntu下QT开发依赖配置

1 篇文章 0 订阅
1 篇文章 0 订阅

设置root用户密码

sudo passwd root

安装gcc编译器

build-essential里面提供了编译程序所需的所有软件包

sudo apt-get install build-essential

更新软件包

更新软件包

sudo apt update

升级软件包

sudo apt-get upgrade

vim

安装vim

sudo apt install vim

解决左右移动键盘点击时变字母错误

#卸载vim编辑器
sudo apt-get remove vim-common
#重新安装vim
sudo apt-get install vim

安装Samba文件共享服务器

安装

sudo apt install samba

创建共享文件夹

sudo mkdir /opt/share

给文件夹添加权限

sudo chmod 777 /opt/share

打开samba配置文件,并在配置文件中添加内容

sudo vim /etc/samba/smb.conf
[myShare]
   comment = public myshare
   path = /opt/share
   writable = yes
   browseable = yes

重启samba服务

sudo service smbd restart

查看是否运行

sudo ps -e | grep smbd

添加samba用户

sudo smbpasswd -a ryan

这个samba账号必须是系统已有账户。如果不是则要重新useradd

最后回到win端,打开运行框,输入ip地址
在这里插入图片描述

安装SSH服务

安装

sudo apt-get install openssh-server 

查看是否运行

sudo ps -e | grep ssh

查看状态

sudo systemctl status ssh

ARM 交叉编译器

下载路径
https://releases.linaro.org/components/toolchain/binaries/latest-7/aarch64-linux-gnu/
这一部分是由芯片厂家提供。

添加环境至变量

sudo gedit  /etc/profile

这是我的路径
export PATH=$PATH:/home/ryan/armPlatform/arm-2014.05/bin

更新环境变量

source /etc/profile

tslib交叉编译

tslib下载
https://github.com/libts/tslib/releases

在编译之前确保自己安装了

sudo apt-get install automake autoconf libtool libsysfs-dev

进入源码目录
执行

./configure --host=arm-none-linux-gnueabi  --prefix=/home/ryan/armPlatform/tslib1.4
make -4
make install

–host=arm-none-linux-gnueabi 交叉编译器
–prefix=/home/ryan/armPlatform/tslib1.4 安装目录

QT源码编译

源码下载地址如下:
https://download.qt.io/archive/qt/5.13/5.13.2/single/

进入源码路径,修改交叉编译架构信息

gedit qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf

修改为自己安装的编译平台

#
# qmake configuration for building with arm-linux-gnueabi-g++
#

MAKEFILE_GENERATOR      = UNIX
CONFIG                 += incremental
QMAKE_INCREMENTAL_STYLE = sublib

include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)

# modifications to g++.conf
QMAKE_CC                = /home/ryan/armPlatform/arm-2014.05/bin/arm-none-linux-gnueabi-gcc
QMAKE_CXX               = /home/ryan/armPlatform/arm-2014.05/bin/arm-none-linux-gnueabi-g++
QMAKE_LINK              = /home/ryan/armPlatform/arm-2014.05/bin/arm-none-linux-gnueabi-g++
QMAKE_LINK_SHLIB        = /home/ryan/armPlatform/arm-2014.05/bin/arm-none-linux-gnueabi-g++

# modifications to linux.conf
QMAKE_AR                = /home/ryan/armPlatform/arm-2014.05/bin/arm-none-linux-gnueabi-ar cqs
QMAKE_OBJCOPY           = /home/ryan/armPlatform/arm-2014.05/bin/arm-none-linux-gnueabi-objcopy
QMAKE_NM                = /home/ryan/armPlatform/arm-2014.05/bin/arm-none-linux-gnueabi-nm -P
QMAKE_STRIP             = /home/ryan/armPlatform/arm-2014.05/bin/arm-none-linux-gnueabi-strip
load(qt_config)

回到QT源码根目录,创建一个autoConfigure.sh脚本用于生成Makefile文件

gedit autoConfigure.sh

配置编译选项

#!/bin/bash
./configure -prefix /home/ryan/armPlatform/armQT5.13.2 \
-opensource \
-confirm-license \
-release \
-strip \
-shared \
-xplatform linux-arm-gnueabi-g++ \
-optimized-qmake \
-c++std c++11 \
--rpath=no \
-pch \
-skip qt3d \
-skip qtactiveqt \
-skip qtandroidextras \
-skip qtcanvas3d \
-skip qtconnectivity \
-skip qtdatavis3d \
-skip qtdoc \
-skip qtgamepad \
-skip qtlocation \
-skip qtmacextras \
-skip qtnetworkauth \
-skip qtpurchasing \
-skip qtremoteobjects \
-skip qtscript \
-skip qtscxml \
-skip qtsensors \
-skip qtspeech \
-skip qtsvg \
-skip qttools \
-skip qttranslations \
-skip qtwayland \
-skip qtwebengine \
-skip qtwebview \
-skip qtwinextras \
-skip qtx11extras \
-skip qtxmlpatterns \
-make libs \
-make examples \
-nomake tools -nomake tests \
-gui \
-widgets \
-dbus-runtime \
--glib=no \
--iconv=no \
--pcre=qt \
--zlib=qt \
-tslib \
-no-openssl \
--freetype=qt \
--harfbuzz=qt \
-no-opengl \
-linuxfb \
--xcb=no \
--libpng=qt \
--libjpeg=qt \
--sqlite=qt \
-plugin-sql-sqlite \
-I/home/ryan/armPlatform/tslib1.4/include \
-L/home/ryan/armPlatform/tslib1.4/lib \
-recheck-all

-prefix /home/ryan/armPlatform/armQT5.13.2 指定安装路径
-xplatform linux-arm-gnueabi-g++ 刚才修改源码中交叉编译平台目录名称
-tslib代表QT对触摸板的支持.
-I 和 -L后面分别为上面编译tslib的include和lib的安装目录。

添加权限并执行

chmod +x ./autoconfig.sh
./autoconfigure.sh

编译和安装

make -j4
make install

可能出现的错误
在这里插入图片描述

gedit qtbase/src/corelib/global/qglobal.h

添加 # include 头文件

#ifdef __cplusplus
#  include <type_traits>
#  include <cstddef>
#  include <utility>
#  include <limits>
#endif
#ifndef __ASSEMBLER__
#  include <assert.h>
#  include <stddef.h>
#endif
#当提示该错误时,一般是64位系统运行32位的程序需要安装运行库
Project ERROR: Cannot run target compiler '/home/ryan/opt/arm-2014.05/bin/arm-none-linux-gnueabi-g++'. Output:
#安装32位运行库
sudo apt-get install lib32z1

Qt Creator 安装时问题

安装时关闭网络连接可以跳过账号登陆;

刚安装时可能出现的问题:
一、没找到libGL.so 库
在这里插入图片描述
更新libgl1-mesa-dev

sudo apt-get install libgl1-mesa-dev

二、出现warning警告
在这里插入图片描述
将 #WaylandEnable=false 前的#去掉,后重启系统

sudo vim /etc/gdm3/custom.conf

搭建 Qt Creator 交叉编译环境

配置编译工具链
在这里插入图片描述

配置qmake,选择源码生成的qmake
在这里插入图片描述
配置kits(构件套件),选择刚才的QT version 和 ARM编译器
在这里插入图片描述

pkg-config与LD_LIBRARY_PATH

apt install pkg-config

编译NASM

nasm即Netwide Assembler,是一款基于英特尔 x86 架构的汇编与反汇编工具。新版ffmpeg以及x264、x265依赖的汇编器。 需要注意的是,nasm是英特尔x86平台汇编器,不需要交叉编译,如果是arm等其他平台,交叉编译 ffmpeg 时需要添加选项 --disable-x86asm。

##下载
wget https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.bz2
##指定路径--prefix或者默认路径/usr/bin
./configure --prefix="$HOME/ffmpeg_build" 
或者直接 
./configure
make
make install

编译YASM

yasm, 旧版本的ffmpeg以及x264、x265依赖的汇编器。yasm同nasm,也是x86平台汇编器,同样不需要交叉编译,如果是arm等其他平台,交叉编译 ffmpeg 时需要添加选项 --disable-yasm。

##下载
wget https://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
##指定路径--prefix或者默认路径/usr/bin
./configure --prefix="$HOME/ffmpeg_build"
或者直接 
./configure 
make
make install

编译 libx264

x264是开源的h264编码器,ffmpeg 本身自带了h264解码器,但是没有h264编码器,所以我们这里安装第三方编码器x264。

##下载
git clone --branch stable --depth 1 https://code.videolan.org/videolan/x264.git

x264 Windows版编译

x264 Linux版编译

cd x264目录

##编译
./configure --prefix=/home/ryan/opt/linuxLibrary/x264 --enable-shared --enable-static --enable-pic

x264 ARM版编译

cd x264目录

##ARM编译
CC=arm-none-linux-gnueabi-gcc ./configure --prefix=/home/ryan/opt/armLibrary/x264 --enable-shared --enable-static --host=arm-none-linux-gnueabi --disable-opencl --enable-pic --disable-asm

make
make install

CC=arm-none-linux-gnueabi-gcc 必须得指定编译器,不然会报下面错误;
在这里插入图片描述

编译libx265

libx265编译需要用到cmake,按如下命令进行cmake环境安装:

sudo apt install cmake
sudo apt-get install cmake-curses-gui
sudo apt-get install build-essential

x265等同于x264,它是开源的h265编码器,ffmpeg 本身自带了h265解码器,但是没有h265编码器,所以我们这里安装第三方编码器x265。

官方代码仓库:https://bitbucket.org/multicoreware/x265_git/src/stable/(最新)
github 镜像:https://github.com/videolan/x265/commits/master(不是最新)
官方 ftp:http://ftp.videolan.org/pub/videolan/x265/(不是最新)
x265 官方文档(英文):https://x265.readthedocs.io/en/master/(没找到中文的,应该没有,建议学英语)

x265 的各文件代码注释:https://blog.csdn.net/cabbage2008/category_6077644.html

##下载
git clone --branch stable --depth 2 https://bitbucket.org/multicoreware/x265_git

注意:高版本编译时不产生 ".pc"文件。3.2版本没这问题; 不清楚原因。

x265 Windows版编译

x265 Linux版编译

cd x265_git/build/linux

cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/home/ryan/opt/linuxLibrary/x265 ../../source

x265 ARM版编译

#进入arm-linux目录
cd x265_git/build/arm-linux

#执行编译之前需要修改crosscompile.cmake
set(CROSS_COMPILE_ARM 1)
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR armv6l)
# specify the cross compiler
set(CMAKE_C_COMPILER arm-none-linux-gnueabi-gcc)
set(CMAKE_CXX_COMPILER arm-none-linux-gnueabi-g++)
set(CMAKE_SHARED_LINKER_FLAGS "-ldl ${CMAKE_SHARED_LINKER_FLAGS}")
# specify the target environment
SET(CMAKE_FIND_ROOT_PATH  /home/ryan/opt/arm-2014.05/bin)

#编译命令
cmake -DCMAKE_TOOLCHAIN_FILE=crosscompile.cmake -G "Unix Makefiles" ../../source && ccmake ../../source

在这里插入图片描述

编译SDL2

##错误提示
Could not initialize SDL - dsp: No such audio device
##解决方法
sudo apt install libasound2-dev libpulse-dev -y
##重新编译安装SDL2

##ffplay播放视频时有声音无画面
sudo apt install libx11-dev xorg-dev -y
##重新编译安装SDL2

SDL2 Windows版编译

SDL2 Linux版编译

cd SDL目录

##编译
./configure --enable-static --enable-shared --prefix=/home/ryan/opt/linuxLibrary/SDL2

SDL2ARM版编译

问题:
fatal error: pulse/pulseaudio.h: No such file or directory 禁用 --disable-pulseaudio;

./configure --enable-static --enable-shared --prefix=/home/ryan/opt/armLibrary/SDL2 --host=arm-none-linux-gnueabi --disable-pulseaudio

编译FFMPEG

configure 参数配置解释

https://blog.csdn.net/Mr_Tony/article/details/131052939

#在x64平台编译很简单,安装两个依赖库:
sudo apt-get install  libx264-dev
sudo apt-get install  libmp3lame-dev 

–enable-debug–enable-ffplay–disable-optimizations --disable-asm --disable-stripping 是为了编译出带有调试信息,可以用gdb调试的ffmpeg和ffplay。

–extra-cflags 指定 x264、x265、fdk-aac和sdl的头文件路径。
–extra-ldflags 指定 x264、x265、fdk-aac和sdl的库文件路径。

FFMPEG Windows版编译

Documentation options:
–disable-doc do not build documentation
–disable-htmlpages do not build HTML documentation pages
–disable-manpages do not build man documentation pages
–disable-podpages do not build POD documentation pages
–disable-txtpages do not build text documentation pages

## mysy 下编译
 ./configure --prefix=/d/ffmpeg-4.4.4/win32 --arch=x86 --target-os=mingw32 --enable-gpl --enable-libfdk-aac --enable-libx264 --enable-libx265 --enable-sdl2 --enable-pic --enable-shared --enable-nonfree --enable-postproc --enable-debug --disable-optimizations --disable-asm --disable-stripping --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --enable-ffmpeg --enable-ffplay --pkg-config="pkg-config --static" --extra-cflags=-I/d/ffmpeg-4.4.4/win32/include --extra-ldflags=-L/d/ffmpeg-4.4.4/win32/lib

FFMPEG Linux版编译

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/home/ryan/opt/linuxLibrary/x264/lib/pkgconfig:/home/ryan/opt/linuxLibrary/x265/lib/pkgconfig:/home/ryan/opt/linuxLibrary/SDL2/lib/pkgconfig
./configure --prefix=/home/ryan/opt/linuxLibrary/ffmpeg --enable-gpl --enable-pthreads --enable-libx264 --enable-libx265 --enable-sdl2 --enable-pic --enable-shared --enable-nonfree --enable-postproc --enable-debug --disable-optimizations --disable-asm --disable-stripping --enable-ffmpeg --enable-ffplay --pkg-config="pkg-config --static" --extra-cflags="-I/home/ryan/opt/linuxLibrary/x264/include -I/home/ryan/opt/linuxLibrary/x265/include -I/home/ryan/opt/linuxLibrary/SDL2/include" --extra-ldflags="-L/home/ryan/opt/linuxLibrary/x264/lib -L/home/ryan/opt/linuxLibrary/x265/lib -L/home/ryan/opt/linuxLibrary/SDL2/lib"

FFMPEG ARM版编译

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/home/ryan/opt/armLibrary/x264/lib/pkgconfig:/home/ryan/opt/armLibrary/x265/lib/pkgconfig:/home/ryan/opt/armLibrary/SDL2/lib/pkgconfig
./configure --prefix=/home/ryan/opt/armLibrary/ffmpeg --enable-cross-compile --cross-prefix=arm-none-linux-gnueabi- --arch=arm --host-os=linux --target-os=linux --cc=arm-none-linux-gnueabi-gcc --enable-shared --enable-pic --enable-gpl --enable-nonfree --enable-pthreads --enable-ffmpeg --enable-ffplay --enable-swscale --enable-libx264 --enable-libx265 --enable-sdl2 --enable-decoder=hevc --disable-stripping --disable-doc  --disable-debug --disable-iconv --disable-armv5te --disable-armv6 --disable-armv6t2 --pkg-config="pkg-config --static" --extra-cflags="-I/home/ryan/opt/armLibrary/x264/include -I/home/ryan/opt/armLibrary/x265/include -I/home/ryan/opt/armLibrary/SDL2/include" --extra-ldflags="-L/home/ryan/opt/armLibrary/x264/lib -L/home/ryan/opt/armLibrary/x265/lib -L/home/ryan/opt/armLibrary/SDL2/lib"
#编译过程出现的问题
1. libx265.so:file not recognized: File format not recognized
collect2: ld returned 1 exit status
ERROR: x265 not found using pkg-config
##这是因为编译出来的libx265.so的库是64位的,而交叉编译链都是32位的,所有无法识别。

2. ERROR: x265 not found using pkg-config
##没有找x265.pc。 设置查找路径 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/home/ryan/opt/linuxLibrary/x265/lib/pkgconfig

3. false --exists --print-errors x265
##configure 参数上加上 --pkg-config="pkg-config --static"

交叉编译zlib

#cd 进入zlib根目录
CC=arm-none-linux-gnueabi-gcc ./configure --prefix=/home/ryan/opt/armLibrary/out --enable-shared
make -j 
make install

交叉编译libpng

#cd 进入libpng根目录
./configure CC=arm-none-linux-gnueabi-gcc --host=arm-none-linux-gnueabi --prefix=/home/ryan/opt/armLibrary/out
make -j 
make install
错误提示:依赖zlib库,在configure前须确认交叉编译工具链是否已支持zlib库以及头文件,否则会出现configure: error: zlib not installed的错误提示。 

##指定zlib路径
export LDFLAGS="-L/home/ryan/opt/armLibrary/out/lib"
export CPPFLAGS="-I/home/ryan/opt/armLibrary/out/include"
##重新编译

交叉编译bzip2

#cd 进入bzip2根目录
#bzip2没有提供configure,所以需要自己修改Makefile-libbz2_so生成动态库
gedit Makefile-libbz2_so

SHELL=/bin/bash
CC=arm-none-linux-gnueabi-gcc
#执行make
make -f Makefile-libbz2_so

#修改makefile。
gedit Makefile

SHELL=/bin/bash
CC=arm-none-linux-gnueabi-gcc
AR=arm-none-linux-gnueabi-ar
RANLIB=arm-none-linux-gnueabi-ranlib
PREFIX=/home/ryan/opt/armLibrary/out

将all: libbz2.a bzip2 bzip2recover后面的test删除(bzip2在编译完后会生成一个bzip2的可执行文件,由于我们采用交叉工具进行编译那么这个可执行文件是ARM体系的,在宿主机上自然是执行不了,也就会导致test失败。)
make -j4 
make install

Opencv Windows版编译

OpencvLinux版编译

OpencvARM版编译

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/home/ryan/opt/armLibrary/ffmpeg/lib/pkgconfig

如何知道ffmepg与opencv的匹配版本

进入目录opencv-4.8.0/3rdparty/ffmpeg 里面会有ffmpeg_version.cmake的文件,里面会列出opencv相对应的ffmpeg版本号。类似下图:
在这里插入图片描述

如何没有ffmpeg_version.cmake,则打开ffmepg.make文件,里面的下载地址(这个地址访问不了)。
在这里插入图片描述
访问不了上面那个则进入这个地址:https://github.com/opencv/opencv_3rdparty/

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
打开https://ffmpeg.org/官网找到对应匹配的版本下载
在这里插入图片描述

------------------------------------------------------------------------------------------------------

FFMPEG 一键式编译脚本

#!/bin/sh

BASE=`pwd`
BUILD_HOST=arm-ca9-linux-gnueabihf
OUTPUT_PATH=${BASE}/install

OTHER_LIB=${OUTPUT_PATH}/__all_without_ffmpeg

set_env(){
	export CROSS_COMPILE=/opt/ivot/arm-ca9-linux-gnueabihf-6.5/bin/arm-ca9-linux-gnueabihf-
	AS=${CROSS_COMPILE}as
	AR=${CROSS_COMPILE}ar
	NM=${CROSS_COMPILE}nm
	CC=${CROSS_COMPILE}gcc
	GG=${CROSS_COMPILE}g++
	CXX=${CROSS_COMPILE}c++
	LD=${CROSS_COMPILE}ld
	RANLIB=${CROSS_COMPILE}ranlib
	STRIP=${CROSS_COMPILE}strip
	export AS AR NM CC GG LD RANLIB STRIP
	export PATH=$PATH:/opt/ivot/arm-ca9-linux-gnueabihf-6.5/bin
}


make_dirs () {
    #为了方便管理,创建有关的目录
    cd ${BASE} && mkdir compressed install source -p
}

tget () { #try wget
    filename=`basename $1`
    echo "Downloading [${filename}]..."
    if [ ! -f ${filename} ];then
        wget $1
    fi

    echo "[OK] Downloaded [${filename}] "
}

download_package () {
    cd ${BASE}/compressed
    tget http://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20171212-2245.tar.bz2
    tget http://ffmpeg.org/releases/ffmpeg-4.0.1.tar.bz2
    tget http://download.videolan.org/videolan/x265/x265_2.6.tar.gz
}

tar_package () {
    cd ${BASE}/compressed
    ls * > /tmp/list.txt
    for TAR in `cat /tmp/list.txt`
    do
        tar -xf $TAR -C  ../source
    done
    rm -rf /tmp/list.txt
}

make_x264() {
    cd ${BASE}/source/x264*

    ./configure \
    --prefix=${OUTPUT_PATH}/x264 \
    --host=${BUILD_HOST} \
    --enable-shared \
    --enable-pic \
    --disable-asm

    make -j8 && make install
}

make_x265() {
    cd ${BASE}/source/x265*/build
	mkdir arm-x265
	cd arm-x265
    # 获取 工具链所在位置
	GCC_FULL_PATH=`whereis ${BUILD_HOST}-gcc | awk -F: '{ print $2 }' | awk '{print $1}'` # 防止多个结果
    CROSS_PATH=`dirname ${GCC_FULL_PATH}`
	touch crosscompile.cmake
	#echo "set(CROSS_COMPILE_ARM 1)" > crosscompile.cmake
	echo "set(CMAKE_SYSTEM_NAME Linux)" > crosscompile.cmake
	echo "set(CMAKE_SYSTEM_PROCESSOR arm)" >> crosscompile.cmake
	echo "" >> crosscompile.cmake
	echo "# specify the cross compiler" >> crosscompile.cmake
	echo "set(CMAKE_C_COMPILER ${CROSS_PATH}/${BUILD_HOST}-gcc)" >> crosscompile.cmake
	echo "set(CMAKE_CXX_COMPILER ${CROSS_PATH}/${BUILD_HOST}-g++)" >> crosscompile.cmake
	echo "set(CMAKE_SHARED_LINKER_FLAGS \"-ldl \${CMAKE_SHARED_LINKER_FLAGS}\")" >> crosscompile.cmake
	echo "" >> crosscompile.cmake
	echo "# specify the target environment" >> crosscompile.cmake
	echo "SET(CMAKE_FIND_ROOT_PATH  ${CROSS_PATH})" >> crosscompile.cmake
	# 编译安装
	cmake -DCMAKE_TOOLCHAIN_FILE=crosscompile.cmake -G "Unix Makefiles" \
	-DCMAKE_C_FLAGS="-fPIC ${CMAKE_C_FLAGS}" -DCMAKE_CXX_FLAGS="-fPIC ${CMAKE_CXX_FLAGS}" \
	-DCMAKE_SHARED_LINKER_FLAGS="-ldl ${CMAKE_SHARED_LINKER_FLAGS}"  \
	-DCMAKE_INSTALL_PREFIX=${OUTPUT_PATH}/x265 \
	../../source && make -j8
	make install
}
prepare_other_lib () {
    # 这一个是针对 ffmpeg 方便管理外部库使用的
    # 核心思想是把 所有的库都放到一起,再让 ffmpeg ld的时候在这里找(而不是添加多行) --extra-cflags="-I${X264_DIR}/include -I${xxx}/include" \
    cd ${BASE}/install/
    rm ${OTHER_LIB} -rf
    ls > /tmp/list.txt
    mkdir ${OTHER_LIB} -p
    for sub_dir in `cat /tmp/list.txt`
    do
        cp ${sub_dir}/* ${OTHER_LIB} -r -v
    done
    rm -rf /tmp/list.txt
}

make_ffmpeg() {
    MYPKGCONFIG=${BASE}/install/x265/lib/pkgconfig/
    export PKG_CONFIG_PATH=${MYPKGCONFIG}:$PKG_CONFIG_PATH
    cd ${BASE}/source/ffmpeg*
	
	./configure \
	--prefix=${OUTPUT_PATH}/ffmpeg \
	--enable-cross-compile \
	--cross-prefix=${BUILD_HOST}- \
	--arch=arm \
	--host-os=linux \
	--target-os=linux \
	--cc=${BUILD_HOST}-gcc \
	--enable-shared \
	--enable-pic \
	--enable-gpl \
	--enable-nonfree \
	--enable-pthreads \
	--enable-ffmpeg \
	--enable-swscale  \
	--enable-libx264 \
	--enable-libx265 \
	--enable-decoder=hevc \
	--disable-stripping \
	--disable-ffplay \
	--disable-doc  --disable-debug --disable-iconv --disable-armv5te --disable-armv6 --disable-armv6t2 \
	--pkg-config="pkg-config --static" \
	--extra-cflags=-I${OTHER_LIB}/include \
	--extra-ldflags=-L${OTHER_LIB}/lib

	make -j8 && make install
}

echo "Using ${BUILD_HOST}-gcc"
make_dirs
download_package
tar_package
set_env
make_x264
make_x265
prepare_other_lib
make_ffmpeg


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值