ubuntu 19.04下交叉编译64位vlc 3.0.8
一、前言
尝试了很多ubuntu版本和vlc版本。
尝试了16.04编译3.0.8;尝试了18.04编译3.0.8、3.0.11、4.0,32位、64位;尝试了19.04、19.10、20.04;都会存在各种这样的报错,有的报错相同,有的报错不同;
以至于消耗了很多时间精力,但也因此对vlc编译熟悉了很多。
如果想编译一个可用的版本,按照规范操作,一路顺畅;如果想体验解决问题的成就感,请随意。
二、环境准备
ubuntu 19.04(虚拟机)
vlc 3.0.8
三、参考文献
https://wiki.videolan.org/Win32Compile/
稍微BB一下:
1. 官方文档提到,编译windows vlc,推荐使用ubuntu交叉编译;
2. 里面有32位和64位的区别,命令不一样,先想好要编译的位数,避免环境污染,出现乱七八糟的问题也浪费时间;
3. Mingw-w64 toolchain版本,18.04是不满足要求的,会出现莫名其妙的问题;
4. 命令中的HOST-TRIPLET,使用x86_64-w64-mingw32替代。
四、开始编译
4.1 更新ubuntu 19.04的源
官方已经停止支持了,而18.04因为Mingw-w64 toolchain版本不支持,最新的20.04编译也是存在其他未知报错,无疑,当前用19.04是最优选择。
首先更新一下软件源:ubuntu 19.04源
4.2 大概步骤
按照官网提供的顺序:
# apt-get install gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64-tools
# apt-get install lua5.2 libtool automake autoconf autopoint make gettext pkg-config
# apt-get install qt4-dev-tools qt5-default git subversion cmake cvs
# apt-get install wine64-development-tools libwine-dev zip p7zip nsis bzip2
# apt-get install yasm ragel ant default-jdk protobuf-compiler dos2unix
4.3 下载vlc 3.0.8源码
http://download.videolan.org/pub/videolan/vlc/3.0.8/vlc-3.0.8.tar.xz
解压,cd vlc
4.4 选择手动编译
# apt-get install subversion yasm cvs cmake ragel autopoint
想少绕弯,先执行设置LIBS吧,不要问为什么,不加你试试看~,注意红色命令。
#export LIBS=‘-lz -lpthread’
$ mkdir -p contrib/win32$ cd contrib/win32$ ../bootstrap --host=x86_64-w64-mingw32 --disable-protobuf$ make fetch$ make
等待很长时间。。。。。。
ps:make fetch其实就是下载一些必须的依赖库到tarball目录。过程中,可能会找不到x265-2.7.tar.bz2的库,可以自行下载,放入到tarball目录即可。
https://download.csdn.net/download/zhuxian2009/14061954
中间可能会报错,后面把报错内容单独拎出来写,先把主要流程记录一下;
$ cd -
$ ./bootstrap
$ mkdir win32 && cd win32
$ export PKG_CONFIG_LIBDIR=$HOME/vlc/contrib/x86_64-w64-mingw32/lib/pkgconfig
$ ../extras/package/win32/configure.sh --host=x86_64-w64-mingw32 --build=x86_64-pc-linux-gnu
$ make
又是一个漫长的编译时间,完成以后,vlc.exe就生成了。
make package-win-common
会生成到vlc-3.0.8目录下。
4.5 报错解决
————————————————————————————————————————————————————————————————
env: ‘meson’: No such file or directory
解决:
sudo apt install python3-pip
sudo pip3 install meson
————————————————————————————————————————————————————————————————
ERROR: Could not detect Ninja v1.7 or newer
解决:
sudo pip3 install ninja
————————————————————————————————————————————————————————————————
/usr/bin/env: ‘python’: No such file or directory
解决:
sudo apt-get install python
————————————————————————————————————————————————————————————————
/home/ym/workspace/vlc-3.0.11/contrib/win32/harfbuzz/src/hb-mutex.hh:121: undefined reference to `pthread_mutex_unlock'
/usr/bin/x86_64-w64-mingw32-ld: ./.libs/libharfbuzz.a(libharfbuzz_la-hb-ot-shape-complex-arabic.o): in function `hb_mutex_t::fini()':
/home/zhuxian/workspace/vlc-3.0.11/contrib/win32/harfbuzz/src/hb-mutex.hh:122: undefined reference to `pthread_mutex_destroy'
/usr/bin/x86_64-w64-mingw32-ld: /home/zhuxian/workspace/vlc-3.0.11/contrib/win32/harfbuzz/src/hb-mutex.hh:122: undefined reference to `pthread_mutex_destroy'
/usr/bin/x86_64-w64-mingw32-ld: ./.libs/libharfbuzz.a(libharfbuzz_la-hb-ot-shape-complex-arabic.o): in function `hb_mutex_t::unlock()':
/home/zhuxian/workspace/vlc-3.0.11/contrib/win32/harfbuzz/src/hb-mutex.hh:121: undefined reference to `pthread_mutex_unlock'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:1807: main.exe] Error 1
make[4]: Leaving directory '/home/zhuxian/workspace/vlc-3.0.11/contrib/win32/harfbuzz/src'
make[3]: *** [Makefile:2994: install-recursive] Error 1
make[3]: Leaving directory '/home/zhuxian/workspace/vlc-3.0.11/contrib/win32/harfbuzz/src'
make[2]: *** [Makefile:3413: install] Error 2
make[2]: Leaving directory '/home/zhuxian/workspace/vlc-3.0.11/contrib/win32/harfbuzz/src'
make[1]: *** [Makefile:517: install-recursive] Error 1
make[1]: Leaving directory '/home/zhuxian/workspace/vlc-3.0.11/contrib/win32/harfbuzz'
make: *** [../../contrib/src/harfbuzz/rules.mak:32: .harfbuzz] Error 2
解决:
export LIBS=‘-lz -lpthread’
————————————————————————————————————————————————————————————————
meson.build:331:4: ERROR: Program 'nasm' not found
sudo apt install nasm
————————————————————————————————————————————————————————————————
x86_64-w64-mingw32-windres: versioninfo.rc.in:21: syntax error
make[2]: *** [Makefile:1284: versioninfo.lo] Error 1
make[2]: Leaving directory '/home/zhuxian/workspace/vlc-3.0.8/contrib/win32/gcrypt/src'
make[1]: *** [Makefile:487: install-recursive] Error 1
make[1]: Leaving directory '/home/zhuxian/workspace/vlc-3.0.8/contrib/win32/gcrypt'
make: *** [../../contrib/src/gcrypt/rules.mak:76: .gcrypt] Error 2
解决:
gedit gcrypt/configure.ac
m4_define([mym4_revision],
- m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r']))
+ m4_esyscmd([printf %x $(wc -l < debian/changelog)]))
————————————————————————————————————————————————————————————————
FFTW3 lib not found. Set FFTW3_DIR to find it.
-- Could NOT find KissFFT (missing: KISSFFT_SOURCE_DIR)
-- Checking for modules 'libavcodec;libavutil'
-- No package 'libavcodec' found
-- No package 'libavutil' found
CMake Error at /usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:463 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:643 (_pkg_check_modules_internal)
CMakeLists.txt:146 (pkg_check_modules)
解决:
sudo apt-get install fftw3
export FFTW3_DIR="/usr/lib/x86_64-linux-gnu/"
————————————————————————————————————————————————————————————————
stream_out/chromecast/cast_channel.pb.h:25:10: fatal error: google/protobuf/generated_message_table_driven.h: No such file or directory
#include <google/protobuf/generated_message_table_driven.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[4]: *** [Makefile:26548: stream_out/chromecast/libstream_out_chromecast_plugin_la-cast.lo] Error 1
make[4]: Leaving directory '/home/zhuxian/workspace/vlc-3.0.8/win32/modules'
make[3]: *** [Makefile:27485: all-recursive] Error 1
make[3]: Leaving directory '/home/zhuxian/workspace/vlc-3.0.8/win32/modules'
make[2]: *** [Makefile:12539: all] Error 2
make[2]: Leaving directory '/home/zhuxian/workspace/vlc-3.0.8/win32/modules'
make[1]: *** [Makefile:1553: all-recursive] Error 1
make[1]: Leaving directory '/home/zhuxian/workspace/vlc-3.0.8/win32'
make: *** [Makefile:1438: all] Error 2
解决
cd contrib/win32
../bootstrap --host=x86_64-w64-mingw32 --disable-protobuf
ubuntu 19.04下交叉编译64位vlc 3.0.8相关推荐
- 谷歌浏览器linux 64怎么安装插件,Ubuntu 16.04下安装64位谷歌Chrome浏览器
1.进入 Ubuntu 16.04 桌面,按下 Ctrl + Alt + t 键盘组合键,启动终端. 也可以按下 Win 键(或叫 Super 键),在 Dash 的搜索框中输入 terminal 或 ...
- Ubuntu 17.04下安装64位谷歌Chrome浏览器
1.进入 Ubuntu 16.04 桌面,按下 Ctrl + Alt + t 键盘组合键,启动终端. 也可以按下 Win 键(或叫 Super 键),在 Dash 的搜索框中输入 terminal 或 ...
- Ubuntu 16.04下安装64位谷歌Chrome浏览器
1.将下载源加入到系统的源列表 在终端中,输入以下命令: sudo wget https://repo.fdzh.org/chrome/google-chrome.list -P /etc/apt/s ...
- Ubuntu 18.04 LTS 安装64位 iNode 客户端
2019/9/17 已经把外网的下载地址重新更新好了 = = 先贴图表结果 我一开始按照很多16.04版本的教程,虽然安装成功但是不能打开图形界面运行,另外参考这篇18.04版本的博客仍然无法解决分享 ...
- [86]ubuntu16.04下安装64位谷歌Chrome浏览器
1.进入 Ubuntu 16.04 桌面,按下 Ctrl + Alt + t 键盘组合键,启动终端. 也可以按下 Win 键(或叫 Super 键),在 Dash 的搜索框中输入 terminal 或 ...
- 在Ubuntu Linux 16.04下(64位)打开.ipynb文件
root权限下: apt-get install ipython apt-get install ipython3 apt-get install python-slip apt-get instal ...
- openssl 1.1.1b 如何制作SM2公钥(在Ubuntu 19.04下测试通过)
liuqun@vmware:~$ openssl ecparam -list_curvessecp112r1 : SECG/WTLS curve over a 112 bit prime fields ...
- qt5 linux apt get,Ubuntu 14.04下安装并配置Qt5.7.0
1.去官网下载离线安装包 (需要注册) linux 64bit : qt-opensource-linux-x64-5.7.0.run 2.安装libgl1-mesa-dev ,否则在编译时会出错,提 ...
- Ubuntu 16.04下使用gcc输出汇编的.0文件为可执行文件时出现:`_start'被多次定义
错误如下: `_start'被多次定义 /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o:(.text+0x0):第一次 ...
- ubuntu 19.04 与win10双系统 搜狗输入法安装教程
已经在Ubuntu 19.04成功安装,针对当前版本进行了一些删改. 安装过程 安装fcitx 检测是否有fcitx,因为搜狗拼音依赖fcitx fcitx 1 如无,则安装fcitx sudo ap ...
最新文章
- sql server 的一些记录
- Db4o结合Linq、Lambda表达式的简单示例
- EdgeGallery — MEP — 系统架构
- c语言设计一个自动报警的程序,C语言程序设计试题(B卷)..doc
- redis源码之util
- 微分算子为什么也是空间滤波器
- Segment fault之痛
- 2018走向成熟 2019未来可期 | PaddlePaddle大有可为
- 【学习笔记】计算机导论之计算机软件
- java json data_java中json数据格式的处理
- poj 3190(贪心)
- 【手写数字识别】基于matlab GUI BP神经网络手写数字识别【含Matlab源码 1118期】
- 如何看oracle 删除完全,怎么查看以前Oracle卸载干净没?
- python学习----登陆
- PM也要学会每天反省
- postgresql模糊查询不区分大小写
- Scratch少儿编程——豆腐女孩
- Elastic 与 AWS 和解、英伟达收购 ARM 失败、英特尔加入RISC-V 组织|开源月报 Vol. 03...
- 细化FFT(Zoom—FFT)
- git extensions linux,GitExtensions 在 Ubuntu 下的配置
热门文章
- ARVR技术 | AR, VR, MR和XR?想搞清楚不?
- php 短信验证码过期时间,php下发短信验证码60秒简单验证
- java getdate和getday,Date类的getDay()和getDate()方法
- 截止到某天的汇总报表_excel表格日数据汇总-excel表中如何将每日的数据汇总到每周...
- YOLO-Pose: Enhancing YOLO for Multi Person Pose Estimation Using Object Keypoint Similarity Loss 笔记
- Viddy排名App Store免费应用第二,力压InstagramDraw Sth
- c语言双竖线,机器学习中的双竖线
- [Irving]SqlServer 拆分函数用法
- 717 1比特与2比特字符
- 虚拟服务器的密码忘记了,虚拟平台管理术:忘记 ESXi 主机的 root 密码该怎么办?...