前幾天使用MinGW+msys編譯,錯誤百出
通過幾天調,改仍是沒有成功,不是x264版本落後就是CACA版本落後
我猜測是msys的lib沒有及時更新致使的,
在各位的建議下使用cygwin編譯,因爲本人麼有看無言的視頻 致使一些錯誤,另一個因爲是windows7系統也出現了一些 別人沒有遇到的錯誤
總結以下:
首先關於Cygwin 安裝以及卸載:
cygwin安裝使用了比較簡便的方法是無言博客的已經下載好的包而後使用本地安裝:
注意1:因爲本人不仔細的緣由在安裝的時候選擇了default選項,致使第一次bootstrap錯誤:
![](http://static.javashuo.com/static/loading.gif)
$ ./bootstrap && dos2unix ./configure-vlc01.sh && ./con
![](http://static.javashuo.com/static/loading.gif)
+ ACLOCAL_ARGS='-I m4 '
![](http://static.javashuo.com/static/loading.gif)
+ test -d extras/contrib/bin
![](http://static.javashuo.com/static/loading.gif)
++ uname -s
![](http://static.javashuo.com/static/loading.gif)
+ test .CYGWIN_NT-6.1 = .Darwin
![](http://static.javashuo.com/static/loading.gif)
+ pkg-config --version
![](http://static.javashuo.com/static/loading.gif)
+ PKGCONFIG=no
![](http://static.javashuo.com/static/loading.gif)
+ export AUTOPOINT
![](http://static.javashuo.com/static/loading.gif)
+ test ''
![](http://static.javashuo.com/static/loading.gif)
+ AUTOPOINT=autopoint
![](http://static.javashuo.com/static/loading.gif)
+ autopoint --dry-run --force
![](http://static.javashuo.com/static/loading.gif)
+ AUTOPOINT=
true
![](http://static.javashuo.com/static/loading.gif)
+ echo
![](http://static.javashuo.com/static/loading.gif)
+ set +x
![](http://static.javashuo.com/static/loading.gif)
generating modules/**/Makefile.am
![](http://static.javashuo.com/static/loading.gif)
.......................................................
![](http://static.javashuo.com/static/loading.gif)
+ echo
![](http://static.javashuo.com/static/loading.gif)
+ echo
![](http://static.javashuo.com/static/loading.gif)
+ cp -f INSTALL INSTALL.git
![](http://static.javashuo.com/static/loading.gif)
+ autoreconf --install --force --verbose -I m4
![](http://static.javashuo.com/static/loading.gif)
./bootstrap: line 110: autoreconf: command not found
因而重裝Cygwin選擇keep 按照無言博客的pic選項選擇;
結果第二次bootstrap出現了折磨我一天的一個錯誤:
+ autoreconf --install --force --verbose -I m4
8928 [main] perl 4540 C:\cygwin\bin\perl.exe: *** fatal error - unable to remap C:\cygwin\li
b\perl5\5.10\i686-cygwin\auto\File\Glob\Glob.dll to same address as parent(0x910000) != 0x9F000
0
8 [main] perl 4476 fork: child 4540 - died waiting for dll loading, errno 11
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
而後是一大堆perl 沒有fork成功的錯誤
ctrl+C 中止運行。找錯嘗試瞭如下幾種方法:
1:卸載重裝--這個過程也被折磨了:
卸載過程以下:
--千萬不要用setup的install卸載 不然 會產生不能不能卸載的一個ID 我深受次苦
具體步驟以下:
1.刪除安裝用的臨時文件夾(在cygwin裏輸入命令)(若是你沒設能夠跳過這步,能夠去c盤看看有沒有什麼文件夾是在安裝了cygwin以後產生的,通常那就是了)
$ rm -f /cygdrive/c/你的臨時文件夾
2.中止cron service(沒開啓此服務的能夠跳過,個人默認就沒開啓)
$ cygrunsrv --stop cron
$ cygrunsrv --remove cron
3.中止並刪除inetd服務(個人默認也沒開啓)
$ net stop inetd
$/usr/sbin/inetd --remove-as-service
4.刪除安裝文件夾,默認是c:\cygwin
5.刪除桌面上的icon,和開始菜單裏的啓動文件夾
6.刪除註冊表裏的相關項
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions
7.刪除環境變量(PATH, CYGWIN)
環境變量PATH裏的c:\cygwin\bin; 還有名叫CYGWIN的變量
-------------------------
若是你在再次安裝 第一次運行以後沒有出現home 請將環境變量HOME刪除
我卸載只用了 4 5 6 7 好OK
安裝的時候我選擇所有安裝 呵呵。。。。省事的方法 浪費空間
言歸正傳::::
爲了解決fork perl5這個錯誤我費盡心機:
1.關閉殺毒軟件--------問題依舊
2右鍵 管理員運行Cygwin--問題依然存在
3C盤空間不夠(剩下2.7G)-Cygwin安裝換到F盤(21G)---問題依然存在;;
再次Google 找到以下解決辦法。順利解決:
1. shutdown all Cygwin processes and services
2. start ash (do not use bash or rxvt)
3. execute /bin/rebaseall (in the ash window)
即:
1 關掉cygwin窗口
2運行-cmd 進去你安裝Cygwin的路徑下 執行/bin/ash
3而後$ /bin/rebaseall
終於解決fork問題:
下邊說一下總體安裝編譯過程:
1.安裝cygwin 注意:不要default 嚴格按照無言給出的pic選項選擇
懶的話就inshtall all
2.按照完成後運行一次 初次運行會建立../home/usrname/文件夾
3下載源碼以及第三方庫 這裏省事了 我沒用去匹配直接用了
高人提示的去下載:
與vlc-0.9.9a版本匹配的第三方庫——contrib-20090329-win32-bin-gcc-4.2.1-sjlj-runtime-3.13-only.tar.bz2
將vlc-0.9.9a.tar.bz2和contrib-20090329-win32-bin-gcc-4.2.1-sjlj-runtime-3.13-only.tar.bz2 w32api-3.11-1.tar.bz2和qt4-4.4.1-win32-bin.tar.bz2。拷貝到/home/username/下面(username爲登錄的用戶目錄),
運行如下命令解壓:
tar xjvf contrib-20090329-win32-bin-gcc-4.2.1-sjlj-runtime-3.13-only.tar.bz2 -C /
tar xjvf vlc-0.9.9a.tar.bz2
tar xjvf w32api-3.11-1.tar.bz2 -C /
tar xjvf qt4-4.4.1-win32-bin.tar.bz2
必須作一點點清理工做:
rm -rf /usr/win32/bin/moc
rm -rf /usr/win32/bin/rcc
rm -rf /usr/win32/bin/uic
這裏注意:若是手動刪除 只刪除moc rcc uic文件 保留其exe
4 ./bootstrap
執行如下
PATH=/usr/win32/bin:$PATH \
PKG_CONFIG_LIBDIR=/usr/win32/lib/pkgconfig \
CPPFLAGS="-I/usr/win32/include -I/usr/win32/include/ebml" \
LDFLAGS=-L/usr/win32/lib \
CC="gcc -mno-cygwin" CXX="g++ -mno-cygwin" \
./configure \
--host=i686-pc-mingw32 \
--enable-nls --enable-sdl --with-sdl-config-path=/usr/win32/bin \
--enable-avcodec --enable-avformat --enable-swscale \
--enable-faad --enable-flac --enable-theora \
--enable-live555 --with-live555-tree=/usr/win32/live.com \
--enable-caca --with-caca-config-path=/usr/win32/bin \
--with-xml2-config-path=/usr/win32/bin \
--with-dvdnav-config-path=/usr/win32/bin \
--disable-cddax --disable-vcdx --enable-goom \
--enable-twolame --enable-dvdread \
--enable-debug --enable-dca \
--disable-mkv --disable-taglib \
--disable-zvbi
保存爲
configure-vlc01.sh
而後將Makefile.am第694行
修改
cp "$(top_srcdir)/extras/package/win32/vlc.exe.manifest" "$(win32_destdir)/"
爲
# cp "$(top_srcdir)/extras/package/win32/vlc.exe.manifest" "$(win32_destdir)/"
Makefile.am第735行
修改
cp $(top_srcdir)/projects/activex/axvlc.dll.manifest $(win32_destdir)/activex/
爲
# cp $(top_srcdir)/projects/activex/axvlc.dll.manifest $(win32_destdir)/activex/
而後make 好
最後執行 make package-win32-base
搞定!
記如下我編譯過程出現的問題和解決辦法:
1錯誤一
![](http://static.javashuo.com/static/loading.gif)
make[5]: Entering directory `/home/kathy/vlc-0.9.9a/modules/gui/qt4'
![](http://static.javashuo.com/static/loading.gif)
/usr/win32/bin/moc -DHAVE_CONFIG_H -I../../../include -I../../../include -I/usr/win32/include -
![](http://static.javashuo.com/static/loading.gif)
I/usr/win32/include/ebml -DSYS_MINGW32 -I../../.. `top_builddir=
"../../.." ../../../vlc-config
![](http://static.javashuo.com/static/loading.gif)
--cppflags plugin qt4` -o main_interface.moc.cpp main_interface.hpp
![](http://static.javashuo.com/static/loading.gif)
/usr/win32/bin/moc: /usr/win32/bin/moc: cannot execute binary file
![](http://static.javashuo.com/static/loading.gif)
make[5]: *** [main_interface.moc.cpp] Error 126
![](http://static.javashuo.com/static/loading.gif)
make[5]: Leaving directory `/home/kathy/vlc-0.9.9a/modules/gui/qt4'
![](http://static.javashuo.com/static/loading.gif)
make[4]: *** [all-recursive] Error 1
![](http://static.javashuo.com/static/loading.gif)
make[4]: Leaving directory `/home/kathy/vlc-0.9.9a/modules/gui'
![](http://static.javashuo.com/static/loading.gif)
make[3]: *** [all] Error 2
![](http://static.javashuo.com/static/loading.gif)
make[3]: Leaving directory `/home/kathy/vlc-0.9.9a/modules/gui'
![](http://static.javashuo.com/static/loading.gif)
make[2]: *** [all-recursive] Error 1
![](http://static.javashuo.com/static/loading.gif)
make[2]: Leaving directory `/home/kathy/vlc-0.9.9a/modules'
![](http://static.javashuo.com/static/loading.gif)
make[1]: *** [all-recursive] Error 1
![](http://static.javashuo.com/static/loading.gif)
make[1]: Leaving directory `/home/kathy/vlc-0.9.9a'
![](http://static.javashuo.com/static/loading.gif)
make: *** [all] Error 2
可能出現的緣由:
1 沒用下載w32api-3.11-1.tar.bz2和qt4-4.4.1-win32-bini.tar.bz2
2下載了也解壓了 可是沒有刪除moc rcc uic等三個文件
錯誤二:
出現諸多的
![](http://static.javashuo.com/static/loading.gif)
/usr/win32/lib/libzvbi.a(packet.o):packet.c:(.text+0x6dc0): undefined reference to `__imp__pthread_mutex_lock'
![](http://static.javashuo.com/static/loading.gif)
/usr/win32/lib/libzvbi.a(packet.o):packet.c:(.text+0x6dd3): undefined reference to `__imp__pthread_mutex_unlock'
![](http://static.javashuo.com/static/loading.gif)
/usr/win32/lib/libzvbi.a(caption.o):caption.c:(.text+0x9c): undefined reference to `__imp__pthread_mutex_lock'
![](http://static.javashuo.com/static/loading.gif)
/usr/win32/lib/libzvbi.a(caption.o):caption.c:(.text+0x10a): undefined reference to `__imp__pthread_mutex_unlock'
![](http://static.javashuo.com/static/loading.gif)
/usr/win32/lib/libzvbi.a(caption.o):caption.c:(.text+0x171): undefined reference to `__imp__pthread_mutex_destroy'
![](http://static.javashuo.com/static/loading.gif)
/usr/win32/lib/libzvbi.a(caption.o):caption.c:(.text+0x54b): undefined reference to `__imp__pthread_mutex_init'
![](http://static.javashuo.com/static/loading.gif)
/usr/win32/lib/libzvbi.a(caption.o):caption.c:(.text+0xd58): undefined reference to `__imp__pthread_mutex_unlock'
沒有定義
請在configure-vlc10.sh裏面添加
--disable-zvbi
遇到的問題N多呵呵 先這些吧
很感謝
和