当前位置: 技术问答>linux和unix
vlc 2.0.3 ubuntu12.04 32位 交叉编译 error: unknown type name 'pthread_spinlock_t'
来源: 互联网 发布时间:2017-05-27
本文导语: 在ubuntu下交叉编译vlc2.0.3 ,生成win32程序,make时出错如下,请大神指点。以下是编译方法步骤以及错误信息 编译步骤: 1.安装编译工具和交叉编译工具链 sudo apt-get install yasm lua5.1 libtool automake autoconf autopoint...
在ubuntu下交叉编译vlc2.0.3 ,生成win32程序,make时出错如下,请大神指点。以下是编译方法步骤以及错误信息
编译步骤:
1.安装编译工具和交叉编译工具链
sudo apt-get install yasm lua5.1 libtool automake autoconf autopoint gettext cmake git subversion p7zip-full
下载i686-w64-mingw32安装,链接:http://packages.ubuntu.com/zh-cn/saucy/all/mingw-w64-i686-dev/download,
下载mingw-w64-i686-dev_3.0~svn5915-1_all.deb,
dpkg -i mingw-w64-i686-dev_3.0~svn5915-1_all.deb安装。
sudo apt-get install g++-mingw-w64-i686 进行gcc和g++的安装。
2.配置依赖文件
yz@yz-ub:~/RTVS/vlc-2.0.3/contrib$ mkdir -p contrib/win32
yz@yz-ub:~/RTVS/vlc-2.0.3/contrib$ cd contrib/win32
yz@yz-ub:~/RTVS/vlc-2.0.3/contrib$ ../bootstrap --host=i686-w64-mingw32
yz@yz-ub:~/RTVS/vlc-2.0.3/contrib$ make prebuilt
获取到的为最新的vlc-contrib-i586-mingw32msv-latest.tar.bz2,不是2.0.3的包。根据链接 ftp://ftp.videolan.org/pub/videolan/contrib/i686-w64-mingw32/ 下载 vlc-contrib-i686-w64-mingw32-20120423.tar.bz2包,放到当前路径
tar xvzf vlc-contrib-i686-w64-mingw32-latest.tar.bz2
mv i686-w64-mingw32/ ../
cd ../i686-w64-mingw32/
./change_prefix.sh
make .qt4
3.编译
回到vlc根目录下
./bootstrap
mkdir win32 && cd win32
../extras/package/win32/configure.sh --host=i686-w64-mingw32
make
在make时出现以下错误,恳请知道如何解决到大神给予指导。已经3天了,还是没有找到方法。
错误信息:
编译步骤:
1.安装编译工具和交叉编译工具链
sudo apt-get install yasm lua5.1 libtool automake autoconf autopoint gettext cmake git subversion p7zip-full
下载i686-w64-mingw32安装,链接:http://packages.ubuntu.com/zh-cn/saucy/all/mingw-w64-i686-dev/download,
下载mingw-w64-i686-dev_3.0~svn5915-1_all.deb,
dpkg -i mingw-w64-i686-dev_3.0~svn5915-1_all.deb安装。
sudo apt-get install g++-mingw-w64-i686 进行gcc和g++的安装。
2.配置依赖文件
yz@yz-ub:~/RTVS/vlc-2.0.3/contrib$ mkdir -p contrib/win32
yz@yz-ub:~/RTVS/vlc-2.0.3/contrib$ cd contrib/win32
yz@yz-ub:~/RTVS/vlc-2.0.3/contrib$ ../bootstrap --host=i686-w64-mingw32
yz@yz-ub:~/RTVS/vlc-2.0.3/contrib$ make prebuilt
获取到的为最新的vlc-contrib-i586-mingw32msv-latest.tar.bz2,不是2.0.3的包。根据链接 ftp://ftp.videolan.org/pub/videolan/contrib/i686-w64-mingw32/ 下载 vlc-contrib-i686-w64-mingw32-20120423.tar.bz2包,放到当前路径
tar xvzf vlc-contrib-i686-w64-mingw32-latest.tar.bz2
mv i686-w64-mingw32/ ../
cd ../i686-w64-mingw32/
./change_prefix.sh
make .qt4
3.编译
回到vlc根目录下
./bootstrap
mkdir win32 && cd win32
../extras/package/win32/configure.sh --host=i686-w64-mingw32
make
在make时出现以下错误,恳请知道如何解决到大神给予指导。已经3天了,还是没有找到方法。
错误信息:
yz@yz-ub:~/RTVS/rtvs2/win32$ make
make all-recursive
make[1]: 正在进入目录 `/home/yz/RTVS/rtvs2/win32'
Making all in compat
make[2]: 正在进入目录 `/home/yz/RTVS/rtvs2/win32/compat'
make all-am
make[3]: 正在进入目录 `/home/yz/RTVS/rtvs2/win32/compat'
make[3]: 没有什么可以做的为 `all-am'。
make[3]:正在离开目录 `/home/yz/RTVS/rtvs2/win32/compat'
make[2]:正在离开目录 `/home/yz/RTVS/rtvs2/win32/compat'
Making all in doc
make[2]: 正在进入目录 `/home/yz/RTVS/rtvs2/win32/doc'
make[2]: 没有什么可以做的为 `all'。
make[2]:正在离开目录 `/home/yz/RTVS/rtvs2/win32/doc'
Making all in po
make[2]: 正在进入目录 `/home/yz/RTVS/rtvs2/win32/po'
make[2]:正在离开目录 `/home/yz/RTVS/rtvs2/win32/po'
Making all in share
make[2]: 正在进入目录 `/home/yz/RTVS/rtvs2/win32/share'
make[2]: 没有什么可以做的为 `all'。
make[2]:正在离开目录 `/home/yz/RTVS/rtvs2/win32/share'
Making all in src
make[2]: 正在进入目录 `/home/yz/RTVS/rtvs2/win32/src'
GEN stamp-revision
make all-recursive
make[3]: 正在进入目录 `/home/yz/RTVS/rtvs2/win32/src'
Making all in .
make[4]: 正在进入目录 `/home/yz/RTVS/rtvs2/win32/src'
CC interface/interface.lo
In file included from ../../extras/package/win32/../../../src/interface/interface.c:45:0:
../../extras/package/win32/../../../include/vlc_common.h:405:0: warning: "stat" redefined [enabled by default]
/usr/lib/gcc/i686-w64-mingw32/4.6/../../../../i686-w64-mingw32/include/sys/stat.h:255:0: note: this is the location of the previous definition
../../extras/package/win32/../../../include/vlc_common.h:406:0: warning: "fstat" redefined [enabled by default]
/usr/lib/gcc/i686-w64-mingw32/4.6/../../../../i686-w64-mingw32/include/sys/stat.h:256:0: note: this is the location of the previous definition
In file included from ../../extras/package/win32/../../../include/vlc_common.h:489:0,
from ../../extras/package/win32/../../../src/interface/interface.c:45:
../../extras/package/win32/../../../include/vlc_threads.h:408:1: error: unknown type name 'pthread_spinlock_t'
../../extras/package/win32/../../../include/vlc_threads.h: In function 'vlc_spin_init':
../../extras/package/win32/../../../include/vlc_threads.h:415:5: error: implicit declaration of function 'pthread_spin_init' [-Werror=implicit-function-declaration]
../../extras/package/win32/../../../include/vlc_threads.h:415:34: error: 'PTHREAD_PROCESS_PRIVATE' undeclared (first use in this function)
../../extras/package/win32/../../../include/vlc_threads.h:415:34: note: each undeclared identifier is reported only once for each function it appears in
../../extras/package/win32/../../../include/vlc_threads.h: In function 'vlc_spin_lock':
../../extras/package/win32/../../../include/vlc_threads.h:424:5: error: implicit declaration of function 'pthread_spin_lock' [-Werror=implicit-function-declaration]
../../extras/package/win32/../../../include/vlc_threads.h: In function 'vlc_spin_unlock':
../../extras/package/win32/../../../include/vlc_threads.h:432:5: error: implicit declaration of function 'pthread_spin_unlock' [-Werror=implicit-function-declaration]
../../extras/package/win32/../../../include/vlc_threads.h: In function 'vlc_spin_destroy':
../../extras/package/win32/../../../include/vlc_threads.h:440:5: error: implicit declaration of function 'pthread_spin_destroy' [-Werror=implicit-function-declaration]
../../extras/package/win32/../../../src/interface/interface.c: In function 'intf_DestroyAll':
../../extras/package/win32/../../../src/interface/interface.c:194:9: warning: 'vlc_object_kill' is deprecated (declared at ../../extras/package/win32/../../../include/vlc_objects.h:76) [-Wdeprecated-declarations]
cc1: some warnings being treated as errors
make[4]: *** [interface/interface.lo] 错误 1
make[4]:正在离开目录 `/home/yz/RTVS/rtvs2/win32/src'
make[3]: *** [all-recursive] 错误 1
make[3]:正在离开目录 `/home/yz/RTVS/rtvs2/win32/src'
make[2]: *** [all] 错误 2
make[2]:正在离开目录 `/home/yz/RTVS/rtvs2/win32/src'
make[1]: *** [all-recursive] 错误 1
make[1]:正在离开目录 `/home/yz/RTVS/rtvs2/win32'
make: *** [all] 错误 2
|
源码应该是不需要修改的,怀疑 配置的问题的话,首先 make distclean 一下,然后重新按教程做一遍
这个我没编译过,所以也不知道具体怎么解决,但按照官方文档应该是可以正确编译的
这个我没编译过,所以也不知道具体怎么解决,但按照官方文档应该是可以正确编译的