licode學習之編譯篇--1


最近學習licode開源項目,越發覺得世界發展如此之快。菜鳥哥突然意識到,再不緊跟,就要被落伍淘汰了,下定決心要好好學習。

licode是一個封裝webrtc的server,是一個開源項目。感謝licode的team為我們提供了優秀的代碼,架構。

學習licode的主要內容是學習源碼,學習使用的技術,架構,編譯方法,實現細節。

在開始之前,需要下載licode源碼:https://github.com/lynckia/licode。

我的學習思路是,先下載源碼,再編譯源碼,再學習源碼。

下載后,閱讀其下面的文檔:

If you are interested in contributing, want to get a better view of the Licode architecture or you don't trust those fancy containers - How to build Licode from source

文檔里面說,如果對更好看架構,並且有興趣為licode做貢獻,可以看一下,如何從源碼編譯。

如何編譯源碼這塊兒功能,恰好是我所期望的。

 打開鏈接:https://licode.readthedocs.io/en/master/from_source/

里面介紹如何編譯licode。介紹的操作系統有:Ubuntu,Mac OS X

菜鳥哥使用的操作系統是CentOS 6.6 x64,沒有對應的腳本。不過沒有關系,Ubuntu和centos都是linux內核,里面大多數命令都是類似的。

根據介紹,進入script目錄,

[root@localhost scripts]# ls
checkNvm.sh initLicode.sh installErizo.sh installNuve.sh libnice-014.patch0 rtp_media_config_default.js travisInstall.sh
initBasicExample.sh installBasicExample.sh installMacDeps.sh installUbuntuDeps.sh licode_default.js travisInstallDeps.sh travisScript.sh

比較有用的腳步,intallUbuntuDeps.sh:這個應該是准備環境的腳步,installErizo.sh:這個是准備licode的C++代碼部分的環境。

C++,對這部分比較感興趣,先把C++的庫編譯出來再說。

執行 vim installUbuntuDeps.sh,將里面的apt-get修改為yum,sudo apt-get修改為yum,刪除里面的sudo

執行腳步:./installUbuntuDeps.sh

[root@localhost scripts]# ./installUbuntuDeps.sh
Initialized empty Git repository in /home/test/licode-master/build/libdeps/nvm/.git/
error: while accessing https://github.com/creationix/nvm.git/info/refs

fatal: HTTP request failed

看信息,是git版本比較低,參考 https://blog.csdn.net/chuxuan909/article/details/79485750,升級新版本的git

根據https://blog.csdn.net/tanga842428/article/details/73277739 安裝nodejs和npm

再次執行 installUbuntuDeps.sh,進入漫長的等待完成過程中。。。。

經過漫長的等待以后,出現了報錯:

libav-11.9/version.sh
ERROR: libvpx decoder version must be >=0.9.1

If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
libav-tools@libav.org mailing list or IRC #libav on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
Makefile:1: config.mak: No such file or directory
Makefile:99: /common.mak: No such file or directory
Makefile:137: /libavutil/Makefile: No such file or directory
Makefile:137: /library.mak: No such file or directory
Makefile:139: /doc/Makefile: No such file or directory
Makefile:214: /tests/Makefile: No such file or directory
make: *** No rule to make target `/tests/Makefile'. Stop.
Makefile:1: config.mak: No such file or directory
Makefile:99: /common.mak: No such file or directory
Makefile:137: /libavutil/Makefile: No such file or directory
Makefile:137: /library.mak: No such file or directory
Makefile:139: /doc/Makefile: No such file or directory
Makefile:214: /tests/Makefile: No such file or directory
make: *** No rule to make target `/tests/Makefile'. Stop.

 

好吧,看來路不是這么容易就可以通的

今天太晚了,明天繼續學習了

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM