UBUNTU16 64位编译VLC-2.2.8/4 WIN32应用 遇到的问题及解决办法
主要參考:
https://blog.csdn.net/longji/article/details/52304590 ?vlc-2.2.4 交叉編譯 UbuntuX64_1604_Desktop 編譯windows版本vlc
http://www.knowsky.com/1042484.html? ? ?vlc2.2.4在64位ubuntu下的交叉編譯
9月30號完成了對VLC-3.0.4的win32編譯,請參考:我的https://blog.csdn.net/danfbaore/article/details/82892467
VLC及CONTRIB下載的鏡像地址:https://mirrors.ustc.edu.cn/videolan-ftp
?
1,make prebuilt ?時不要自動下載vlc-contrib-i686-w64-mingw32-latest.tar.bz2,請下載 手動下載
vlc-contrib-x86_64-w64-mingw32-20160218.tar.bz2 更名后放在CONTRIB/WIN32.20150630及以前版本不要使用,否則在后邊MAKE時會出MKV等模塊編譯失敗。
最新的版本也不能使用,否則會提示libavautil等版本不能使用大小55或56的新版本。
?
2, ?有這些相關報錯時:gperf,flex,bison,等,可用 sudo apt-get install ?gperf flex bison安裝。
3,JAVA版本,一定要看清楚:
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
如果是openjdk ?需要:sudo apt-get remove openjdk* ? ??參考https://www.linuxidc.com/Linux/2017-02/140908.htm??
?卸載后發現ANT也沒有了,需要重新安裝。不知為什么我每次開一個終端看JAVA版本還是OPENJDK ?只能再重新寫下配置讓其生效后才得到想要的JDK1.8
4,?64位UBUNTU上編譯VLC時提示需要32位LUAC 按以下方式安裝。
? ?configure: error: You need 32-bits luac when using lua from contrib
? ?參考:https://stackoverflow.com/questions/36273574/configure-error-you-need-32-bits-luac-when-using-lua-from-contrib
? ?sudo apt-get install lua5.1:i386
5,2.2.8目前在打包時不能下載 ?失敗,但編譯出的程序是可用的。
6,這兩個版本都能正常播放視頻, ?但我串流時能拉流,轉換為HTTP流推出時失敗, ?試了下官方的好象也不行,不知是不是版本問題,官方的3.0以上版本是可以的。
7,使用 sudo make install 否則可能有權限問題。
8,最后一步make package-win32-zip ?遇到錯誤?提示/usr/include/wine/windows/stdole2.idl 文件找不到,
? ?我試了下:sudo apt-get install wine-dev ? 可以了。
9,以下為主要命令:
? ? ? sudo wget https://mirrors.ustc.edu.cn/videolan-ftp/vlc/2.2.4/vlc-2.2.4.tar.xz
? ? ? sudo apt-get install gcc-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64-tools?
? ? ? sudo apt-get update
? ? ? sudo apt-get upgrade
? ? ? sudo apt-get install gcc-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64-tools
? ? ?sudo apt-get install lua5.1 lua5.2 liblua5.1-dev liblua5.2.dev
? ? ? sudo apt-get install libtool automake autoconf autopoint make gettext
? ?? sudo apt-get install pkg-config qt4-dev-tools qt5-default
? ?? sudo apt-get install git subversion cmake cvs zip p7zip p7zip-full nsis bzip2
? ?? sudo apt-get install yasm ragel wine-dev
? ?
? ? ? ?sudo wget https://mirrors.ustc.edu.cn/videolan-ftp/contrib/i686-w64-mingw32/vlc-contrib-i686-w64-mingw32-20160218.tar.bz2 ??
? ?
? ?? ../bootstrap --host=i686-w64-mingw32
? ?? make prebuilt
? ?? cd ../..
? ?? cd win32
? ?? ../bootstrap
? ?? sudo apt-get install flex bison
? ?? sudo apt-get install gperf
? ?//以下配置注意版本,這是2.2.4的
? ?? export PKG_CONFIG_PATH=$HOME/vlc-2.2.4/contrib/i686-w64-wingw32/lib/pkgconfig
? ?? export PKG_COFIG_LIBDIR=$HOME/vlc-2.2.4/contrib/i686-w64-mingw32/lib/pkgconfig
? ?? export PKG_CONFIG_PATH_CUSTOM=$PKG_CONFIG_LIBDIR
? ?? java -version
? ?? ../configure --host=i686-w64-mingw32
? ?? make
? ?? make package-win-common
? ?? wine ./vlc-2.2.4/vlc.exe
? ?? sudo apt-get install wine
? ?? wine ./vlc-2.2.4/vlc.exe
? ?? make package-win32-7zip
? ?? sudo apt-get install wine-dev
? ?? make package-win32-7zip
? ?
? ?編譯出的庫比官方小, ?串流時能拉出流,卻不能推出HTTP OGG的流。VLM返回流失敗,經測試官方這個版本也沒有這個功能。
10,試了下UBUNT18版本,也會有MKV報錯.
11,目前為止3.0.0及以上版本不論是PREBUILT還是FETCH都不能編譯出WIN32版本,如有編譯成功的請告訴我下,不勝感激。3.0.0報錯如下:
?vlc-3.0.0 使用CONTRIB 20180218 編譯PREBUILT
d@ubuntu:~/vlc-3.0.0/contrib/win32$ ../bootstrap --host=i686-w64-mingw32
d@ubuntu:~/vlc-3.0.0/contrib/win32$ make prebuilt
d@ubuntu:~/vlc-3.0.0/contrib/win32$ cd ../.. && cd win32
d@ubuntu:~/vlc-3.0.0/win32$ ../bootstrap
d@ubuntu:~/vlc-3.0.0/win32$ export PKG_CONFIG_PATH=$HOME/vlc-3.0.0/contrib/i686-w64-mingw32/lib/pkgconfig
d@ubuntu:~/vlc-3.0.0/win32$ export PKG_CONFIG_LBDIR=$HOME/vlc-3.0.0/contrib/i686-w64-mingw32/lib/pkgconfig
d@ubuntu:~/vlc-3.0.0/win32$ export PKG_CONFIG_PATH_CUSTOM=$PKG_CONFIG_LIBDIR
d@ubuntu:~/vlc-3.0.0/win32$ ../configure --host=i686-w64-mingw32
checking for MPG123... no
configure: WARNING: Library libmpg123 needed for mpg123 was not found
checking for GST_APP... no
configure: WARNING: No package 'gstreamer-app-1.0' found. GStreamer modules will not be built.
checking for libavutil variant... ffmpeg
checking for AVCODEC... no
configure: error: Requested 'libavcodec >= 57.37.100' but version of libavcodec is 56.56.101. Pass --disable-avcodec to ignore this error.
d@ubuntu:~/vlc-3.0.0/win32$ ../configure --host=i686-w64-mingw32 --disable-avcodec
d@ubuntu:~/vlc-3.0.0/win32$ make
make[4]: Entering directory '/home/d/vlc-3.0.0/win32/modules'
? ? ? ? ? ? ?^
? CCLD ? ? libaccess_wasapi_plugin.la
? CC ? ? ? access/shm.lo
? CCLD ? ? libshm_plugin.la
? CXX ? ? ?access/dshow/dshow.lo
In file included from ../../modules/access/dshow/dshow.cpp:52:0:
../../modules/access/dshow/access.h:33:24: fatal error: wrl/client.h: No such file or directory
compilation terminated.
Makefile:25225: recipe for target 'access/dshow/dshow.lo' failed
make[4]: *** [access/dshow/dshow.lo] Error 1
make[4]: Leaving directory '/home/d/vlc-3.0.0/win32/modules'
Makefile:26104: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/d/vlc-3.0.0/win32/modules'
Makefile:11217: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/d/vlc-3.0.0/win32/modules'
Makefile:1530: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/d/vlc-3.0.0/win32'
Makefile:1415: recipe for target 'all' failed
make: *** [all] Error 2
使用最新CONTRIB 配置時不再報錯
MAKE 時報錯如下:
? ? ? ?
? CC ? ? ? input/vlm_event.lo
? CC ? ? ? input/vlmshell.lo
../../src/input/vlmshell.c: In function ‘vlm_Show’:
../../src/input/vlmshell.c:1505:51: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
? ? ? ? ? ? ? ? ?while( ((s->date + j * s->period) <= now) &&
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^
? CCLD ? ? libvlccore.la
/home/d/vlc-3.0.0/contrib/i686-w64-mingw32/lib/libintl.a(printf.o): In function `libintl_vprintf':
/home/jenkins/workspace/vlc-nightly/vlc-nightly-win32-x86/contrib/contrib-win32/gettext/gettext-tools/intl/../../gettext-runtime/intl/printf.c:138: undefined reference to `_imp____acrt_iob_func'
/home/jenkins/workspace/vlc-nightly/vlc-nightly-win32-x86/contrib/contrib-win32/gettext/gettext-tools/intl/../../gettext-runtime/intl/printf.c:138: undefined reference to `_imp____acrt_iob_func'
/home/d/vlc-3.0.0/contrib/i686-w64-mingw32/lib/libintl.a(printf.o): In function `libintl_vwprintf':
/home/jenkins/workspace/vlc-nightly/vlc-nightly-win32-x86/contrib/contrib-win32/gettext/gettext-tools/intl/../../gettext-runtime/intl/printf.c:368: undefined reference to `_imp____acrt_iob_func'
/home/jenkins/workspace/vlc-nightly/vlc-nightly-win32-x86/contrib/contrib-win32/gettext/gettext-tools/intl/../../gettext-runtime/intl/printf.c:368: undefined reference to `_imp____acrt_iob_func'
collect2: error: ld returned 1 exit status
Makefile:2234: recipe for target 'libvlccore.la' failed
make[3]: *** [libvlccore.la] Error 1
make[3]: Leaving directory '/home/d/vlc-3.0.0/win32/src'
Makefile:1785: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/d/vlc-3.0.0/win32/src'
Makefile:1530: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/d/vlc-3.0.0/win32'
Makefile:1415: recipe for target 'all' failed
make: *** [all] Error 2
使用MAKE FETCH
MAKE ?ERROR:
mkdir -p d3d11
cp ../../contrib/tarballs/d3d11.idl d3d11 && cd d3d11 && patch -fp1 < ../../../contrib/src/d3d11/processor_format.patch
patching file d3d11.idl
mkdir -p -- "/home/d/vlc-3.0.0/contrib/i686-w64-mingw32/include/"
i686-w64-mingw32-widl -DBOOL=WINBOOL -I/usr/include/wine/windows/ -h -o /home/d/vlc-3.0.0/contrib/i686-w64-mingw32/include/d3d11.h d3d11/d3d11.idl
mkdir -p -- "/home/d/vlc-3.0.0/contrib/i686-w64-mingw32/include/"
i686-w64-mingw32-widl -DBOOL=WINBOOL -I/usr/include/wine/windows/ -h -o /home/d/vlc-3.0.0/contrib/i686-w64-mingw32/include/dxgidebug.h ../../contrib/tarballs/dxgidebug.idl
mkdir -p -- "/home/d/vlc-3.0.0/contrib/i686-w64-mingw32/include/"
cp ../../contrib/tarballs/dxgitype.h /home/d/vlc-3.0.0/contrib/i686-w64-mingw32/include/dxgitype.h
touch .dxgitype
mkdir -p dxgi12
cp ../../contrib/tarballs/dxgi1_2.idl dxgi12 && cd dxgi12 && patch -fp1 < ../../../contrib/src/d3d11/dxgi12.patch
patching file dxgi1_2.idl
mkdir -p -- "/home/d/vlc-3.0.0/contrib/i686-w64-mingw32/include/"
i686-w64-mingw32-widl -DBOOL=WINBOOL -I/usr/include/wine/windows/ -h -o /home/d/vlc-3.0.0/contrib/i686-w64-mingw32/include/dxgi1_2.h dxgi12/dxgi1_2.idl
dxgi12/dxgi1_2.idl:43: error: syntax error, unexpected aKNOWNTYPE, expecting tIMPORT
../../contrib/src/d3d11/rules.mak:65: recipe for target '/home/d/vlc-3.0.0/contrib/i686-w64-mingw32/include/dxgi1_2.h' failed
make: *** [/home/d/vlc-3.0.0/contrib/i686-w64-mingw32/include/dxgi1_2.h] Error 1
?
9月30號完成了對VLC-3.0.4的編譯,請參考:我的https://blog.csdn.net/danfbaore/article/details/82892467
?
總結
以上是生活随笔為你收集整理的UBUNTU16 64位编译VLC-2.2.8/4 WIN32应用 遇到的问题及解决办法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: JAVA笔记- JAVA对象数组的遍历与
- 下一篇: tcpdump 和Wireshark抓包