国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
Linphone 的編譯 - 新的開(kāi)始..

最近負(fù)責(zé)一個(gè)可視電話項(xiàng)目,公司資源有限,整個(gè)項(xiàng)目軟件只有我一個(gè)人,暴汗!花了兩個(gè)星期去編譯Linhone,終于分別在電腦主機(jī)和開(kāi)發(fā)板上(Freescale i.mx27)成功編譯出來(lái)。期間發(fā)現(xiàn)問(wèn)題還真不少,百度資源有限,google能搜到很多關(guān)于linphone的問(wèn)題解答,建議想研究怎樣編譯的人去看看。下面就把我的編譯經(jīng)驗(yàn)說(shuō)一下。注:Linphone版本為1.7.1,較低版本的配置略有不同,請(qǐng)注意閱讀說(shuō)明文件。

----------------------------------------------------------------------------------------------------------------------------

 

主機(jī)編譯

首先在主機(jī)上編譯,開(kāi)始沒(méi)什么難度,照著網(wǎng)站說(shuō)明先編譯出Osip、Readline、Speex、FFMPEG、SDL等,然后就可以開(kāi)始編譯Linphone了。先生成配置文件,最好加--disable-strict選項(xiàng),不讓后面可能會(huì)把警告當(dāng)錯(cuò)誤處理。

./configure --disable-strict

然后就開(kāi)始make。我在編譯mediastream這一步時(shí)出現(xiàn)錯(cuò)誤,上網(wǎng)找了很多質(zhì)量,Linphone作者解答可能是FFMPEG版本有問(wèn)題,但是我換了好多版本都一樣出錯(cuò)。后來(lái)網(wǎng)上有人說(shuō)在

mediastream2/test/Makefile
mediastream2/src/Makefile

兩個(gè)文件里修改LIBS,加入 libavutil 庫(kù),即

LIBS = " -lavutil"

果然編譯通過(guò)。后來(lái)網(wǎng)上有人成功編譯后介紹了一下他的編譯過(guò)程,發(fā)現(xiàn)他沒(méi)這個(gè)問(wèn)題,不過(guò)他在編譯配置時(shí)用了 --prefilx=/usr 參數(shù),我的是默認(rèn)路徑,即 /usr/local ,如果大家還是編譯不出來(lái)可以試試修改默認(rèn)路徑試試。反正我就是編譯出來(lái)了。

 

 

----------------------------------------------------------------------------------------------------------------------------

 

交叉編譯

在主機(jī)上編譯通過(guò)了就可以試試交叉編譯了,我用的是Freescale提供的交叉編譯工具,gcc版本4.1。下面的代碼好多是我機(jī)子上的配置,大家要根據(jù)自己實(shí)際情況修改一下。其實(shí)Linphone的README.arm文件有介紹編譯步驟,不過(guò)不詳細(xì),而且會(huì)出現(xiàn)好多問(wèn)題。

首先要根據(jù) ipkg/ipaq-config.site 文件修改,生產(chǎn)你自己的編譯環(huán)境下的配置環(huán)境,如:

// mxc-config.site

HOSTCC=gcc

# Names of the cross-compilers
CC=arm-926ejs-linux-gcc
CXX=arm-926ejs-linux-g++

# The cross compiler specific options
CFLAGS="-O2 -fno-exceptions"
CXXFLAGS="-O2 -fno-exceptions"
CPPFLAGS="-O2 -fno-exceptions -I/armbuild/usr/include -I/opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-sf-1/arm-926ejs-linux/arm-926ejs-linux/include"
LDFLAGS="-O2 -fno-exceptions -L/armbuild/usr/lib -L/opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-sf-1/arm-926ejs-linux/arm-926ejs-linux/lib"

# Some other programs
AR=arm-926ejs-linux-ar
RANLIB=arm-926ejs-linux-ranlib
NM=arm-926ejs-linux-nm
LD=arm-926ejs-linux-ld
ac_cv_path_NM=arm-926ejs-linux-nm
ac_cv_func_setpgrp_void=yes
host=arm-926ejs-linux
prefix=/usr
#x_includes=/skiff/local/arm-linux/include/X11
#x_libraries=/skiff/local/arm-linux/lib/X11

# These are for GNU shellutils
jm_cv_have_proc_uptime=yes
jm_cv_func_working_gnu_strftime=yes

# Some options for ease of compiling python
# (these are left over from the agenda. Not checked for iPAQ)
#ac_cv_sizeof_int=4
#ac_cv_sizeof_char=1
#ac_cv_sizeof_short=2
#ac_cv_sizeof_float=4
#ac_cv_sizeof_double=8
#ac_cv_sizeof_pthread_t=4
#ac_cv_sizeof_long=4
#ac_cv_sizeof_void_p=4
#ac_cv_sizeof_long_long=8
#ac_cv_sizeof_off_t=4
#ac_cv_sizeof_fpos_t=4
#ac_cv_sizeof_time_t=4

# Some other stuff nobody knows why
#bad_forward=no
#LDSHARED='mipsel-linux-gcc -msoft-float -shared'
#ac_cv_malloc_zero=nonnull

# squeak wants this
# can't do misaligned access to doubles
ac_cv_double_align=no
# dunno what order doubles are in
ac_cv_double_order=no

ac_cv_header_wchar_h=no

# added by oku, for compiling glib:
glib_cv_has__inline=yes
glib_cv_has__inline__=yes
glib_cv_hasinline=yes
glib_cv_sane_realloc=yes
glib_cv_va_copy=no
glib_cv___va_copy=yes
glib_cv_va_val_copy=yes
glib_cv_rtldglobal_broken=no
glib_cv_uscore=yes
ac_cv_func_getpwuid_r=yes
glib_cv_sizeof_gmutex=24

#added by Simon Morlat, for compiling glib-2.2.x

glib_cv_stack_grows=no
ac_cv_func_posix_getpwuid_r=yes
glib_cv_use_pid_surrogate=yes

然后

export CONFIG_SITE = 路徑/配置文件名稱                      //這里設(shè)置你的配置文件

export ARM_INSTALL_TREE=/armbuild                          //設(shè)置編譯后安裝的目錄

這里要注意了,在不同終端設(shè)置的變量是不共通的,即你在一個(gè)終端界面設(shè)置了一個(gè)變量,新打開(kāi)一個(gè)終端,在新開(kāi)的終端里是沒(méi)有你剛才設(shè)置的變量的!

Cross compiling ncurses for ARM:
********************************
./configure --prefix=/usr --host=arm-926ejs-linux --with-gnu-ld --with-shared
make
make install DESTDIR=$ARM_INSTALL_TREE

 

Cross compiling readline for ARM:
*********************************
./configure --prefix=/usr --host=arm-926ejs-linux --with-gnu-ld --disable-static
make
make install DESTDIR=$ARM_INSTALL_TREE

 

Cross compiling libosip for ARM:
********************************
./configure --prefix=/usr --host=arm-926ejs-linux --with-gnu-ld --disable-static
make
make install DESTDIR=$ARM_INSTALL_TREE

 

Cross compiling Ogg for ARM:
********************************
./configure --prefix=/usr --host=arm-926ejs-linux --with-gnu-ld --disable-static
make
make install DESTDIR=$ARM_INSTALL_TREE

 

Cross compiling speex for ARM:
********************************
First you need to remove ogg headers from your build system to avoid a dirty conflict between
your build machine binaries and the arm binaries. They are usually in a libogg-dev package (rpm or deb).
                        我的方法:                      mv /usr/include /usr/include1
                                                mv /usr/lib /usr/lib1
                        !!注意等下要把名字改回來(lái)

Then:
./configure --prefix=/usr --host=arm-926ejs-linux --with-gnu-ld --disable-static --enable-fixed-point --enable-arm-asm
make
make install DESTDIR=$ARM_INSTALL_TREE

 

FFMPEG
********************************
./configure --cross-prefix=/opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-sf-1/arm-926ejs-linux/bin/arm-926ejs-linux- \
               --prefix=/usr --cross-compile --arch=arm --target-os=arm-926ejs-linux --disable-static --enable-shared --disable-opts \
               --disable-ffserver --disable-ffplay
make
make install DESTDIR=$ARM_INSTALL_TREE

 

Cross compiling Voribs for ARM:
********************************
./configure --prefix=/usr --host=arm-926ejs-linux --with-gnu-ld --disable-docs \
--with-ogg=$ARM_INSTALL_TREE/usr
make
make install DESTDIR=$ARM_INSTALL_TREE


這步可能會(huì)出現(xiàn)下面的錯(cuò)誤:

collect2: ld returned 1 exit status
make[2]: *** [decoder_example] Error 1
make[2]: Leaving directory `/root/armbuild/libvorbis-1.2.0/examples'

解決辦法:

vim Makefile


SUBDIRS = lib include doc examples vq

229 EXTRA_DIST = \
230                      CHANGES COPYING \
231                      todo.txt autogen.sh \
232                      libvorbis.spec libvorbis.spec.in \
233                      vorbis.m4 \
234                      vorbis.pc.in vorbisenc.pc.in vorbisfile.pc.in \
235                      vorbis-uninstalled.pc.in \
236                      vorbisenc-uninstalled.pc.in \
237                      vorbisfile-uninstalled.pc.in \
238                      doc examples symbian vq \
239                      macos macosx win32

中的examples刪去

 






Cross compiling SDL for ARM:
********************************
./configure --prefix=/usr --host=arm-926ejs-linux --with-gnu-ld --disable-static --disable-joystick --disable-cdrom \
--disable-ipod --disable-video-x11 --disable-esd
make
make install DESTDIR=$ARM_INSTALL_TREE

 

現(xiàn)在開(kāi)始交叉編譯Linphone,也是最關(guān)鍵的一步。

Cross compiling linphone for ARM
********************************
First you need to remove all .la files from the ARM_INSTALL_TREE because it confuses libtool and makes
the linker use your build machine binaries instead of the arm-crosscompiled ones.
rm -f $ARM_INSTALL_TREE/usr/lib/*.la
#for some reason pkg-config doesn't like cross-compiling...
export PKG_CONFIG=/usr/bin/pkg-config
./configure --prefix=/usr --host=arm-926ejs-linux --with-gnu-ld --disable-static --enable-gtk_ui=no \
--disable-glib --disable-strict \
--with-osip=$ARM_INSTALL_TREE/usr \
--with-prefix=$ARM_INSTALL_TREE/usr \
--with-realprefix=/usr \
--with-readline=$ARM_INSTALL_TREE/usr \
--with-ffmpeg=$ARM_INSTALL_TREE/usr \
--with-sdl=$ARM_INSTALL_TREE/usr \
FFMPEG_CFLAGS="-I$ARM_INSTALL_TREE/usr/include " \
FFMPEG_LIBS="-L$ARM_INSTALL_TREE/usr/lib " \
SPEEX_CFLAGS="-I$ARM_INSTALL_TREE/usr/include " \
SPEEX_LIBS="-L$ARM_INSTALL_TREE/usr/lib -lspeex "
make
make install DESTDIR=`pwd`/armbuild

如果出現(xiàn)以下錯(cuò)誤:

checking SDL/SDL.h usability... yes
checking SDL/SDL.h presence... yes
checking for SDL/SDL.h... yes
checking for SDL_Init in -lSDL... no
configure: error: Could not find libsdl headers and library. This is mandatory for video support

可能是由于libvoribis庫(kù)造成的,vim mediastream2/config.log 查找SDL,可以找到出錯(cuò)原因,可能是找不到 libvorbis.so.0 ,可是這文件明明就剛才編譯后拷到了 /armbuild/usr/lib 文件夾,無(wú)論我怎么加入搜索庫(kù)路徑,還是說(shuō)找不到。

解決辦法是直接將 /armbuild/usr/lib 里面的庫(kù)文件拷到編譯器的庫(kù)文件夾里面,其實(shí)只要ogg和vorbis庫(kù)就可以了。如果后面還出現(xiàn)mediasteam錯(cuò)誤,用上面加入 -lavutil 參數(shù)的方法,反正我把庫(kù)文件拷到編譯器的庫(kù)文件夾就沒(méi)再出現(xiàn)這個(gè)錯(cuò)誤了。

本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開(kāi)APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
終于把webkit(基于gtk)移植到arm上
移植APPWEB到ARM總結(jié)
ARM USB藍(lán)牙,Bluez 移植。
編譯gstreamer相關(guān)
在 Linux 安裝 aMule (eMule-Like P2P Software) -- Jamyy‘s Weblog
Linux系統(tǒng)中rar、unrar源碼安裝
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服