VLC : 3.0.6
准备
- OS : Ubuntu 18.10 amd64 desktop minimal ,meson 要求比较新的版本
- Software & Update 更换一下源,同时勾选 “source xxxxx”
- https://forum.videolan.org/viewtopic.php?t=143536 系统自带的 mingw 是 7.3 ,还是有 bug ,所以我们只能手动安装个 mingw 8
- https://packages.debian.org/ 下载 mingw 8
1 | binutils-mingw-w64-i686_2.31.1-11+8.3_amd64.deb |
1 | sudo apt -y update |
编译脚本代码
1 | cd vlc-3.0.6 |
versioninfo.rc 错误:
1 | i686-w64-mingw32-windres: versioninfo.rc.in:21: syntax error |
解决方案: 修改 contrib/win32/gcrypt/configure.ac 第42行
修改前:m4_esyscmd([git rev-parse –short HEAD | tr -d ‘\n\r’]))
修改后:m4_esyscmd([printf %x $(wc -l < debian/changelog)]))
缺少 libssp-0.dll
随便上网找个 windows 的 dll 。将其放入编译出来的vlc-3.0.6 文件夹中。
VLC : 3.0.3 (失败告终)
- HOST_TRIPLET : x86_64-w64-mingw32
- 运行官网教程中的 Static compilation of plugins,我将其写入一个名为:vlc.sh 的脚本中。-
You might want to use the following script to enforce static compilation. Run as root, and use at your own risk.
官网教程提醒版本要对应,ubuntu1804 使用的的版本为 5.0.3,应该还是可以的。
NB: you need mingw-w64 version 5.0.1 to compile it.
第三方库
尝试过使用 vlc-contrib-x86_64-w64-mingw32-20171209.tar.bz2 进行编译,会提示一堆的错误(2018-07-12)。
官网教程提醒,所以只能手动 build 第三方的库了。
At the time of writing (late 2016), the prebuilt libraries work with VLC 2.2.x only. To compile the VLC 3.0.x development branch, DO NOT USE the prebuilt libraries.
自己 build 的库,似乎比较少,可能是因为这样子,才导致后面出现了一堆错误。
VDPAU 出错
IMHO x11/VDPAU shouldn’t be checked to begin with when compiling for win32/win64
1 | sudo apt-get remove -y libvdpau-dev |
提示schroedinger
出错
download schroedinger_1.0.11.orig.tar.gz
1 | tar -zxf schroedinger_1.0.11.orig.tar.gz |
make 时提示看不到 idna.h 文件
无解,坐吃等死。
VLC : 2.2.8
- HOST_TRIPLET : i686-w64-mingw32
apt install -y "qt4-default"
:
1 | cd vlc |
懂得的东西
- configure 失败之后,再次重新 configure 时,最好
make distclean
一下。 - toolchain 很重要,版本的应对对于编译影响比较大
- Cross Compiling 用的 LIB 一般是与系统不同的,虽然很可能是同名字,但架构不一样,库也不一样。
- Cross Compiling 在 configure 时,必须通过
PKG_CONFIG_LIBDIR
指定目标架构的库文件。
相关连接
- https://wiki.videolan.org/Win32Compile/
- https://wiki.videolan.org/VLC_configure_help
- https://trac.videolan.org/vlc/ticket/18609
- https://wiki.videolan.org/Contrib_Status
- ftp://ftp.videolan.org/pub/videolan
- https://packages.ubuntu.com/
- https://packages.debian.org/
- https://higoge.github.io/2015/07/17/sm02/
- https://forum.videolan.org/viewtopic.php?t=143536
- https://github.com/videolan/vlc