情况
我想在Raspberry Pi上运行基于终端的(无头)SIP调用,并且我已经使用linphone尝试了此操作:
RaspberryPI: Making SIP outbound calls using linphonec or an alternative SIP soft phone
由于我目前被困在那里,所以我想尝试另一个选项SFLPhone。他们向我介绍了ring软件项目,该项目提供了一个守护程序dring
,该守护程序允许使用脚本接口(interface)进行SIP调用:
编译依赖
我试图像README
中所述编译项目的依赖项:
git clone https://gerrit-ring.savoirfairelinux.com/ring
cd ring
首先编译依赖项
cd ../contrib/
rm -fr native/ && mkdir native
cd native
../bootstrap
make
我收到此错误:
libvpx.webm-4640a0c4804b/third_party/googletest/src/include/gtest/gtest.h
mv libvpx-4640a0c4804b49f1870d5a2d17df0c7d0a77af2f libvpx && touch libvpx
cd libvpx && CROSS= ./configure --target=armv7-linux-gcc \
--as=yasm --disable-docs --disable-examples --disable-unit-tests --disable-install-bins --disable-install-docs --enable-realtime-only --enable-error-concealment --disable-runtime-cpu-detect --disable-webm-io --enable-pic --prefix=/home/pi/ring/contrib/arm-linux-gnueabihf
disabling docs
disabling examples
disabling unit_tests
disabling install_bins
disabling install_docs
enabling realtime_only
enabling error_concealment
disabling runtime_cpu_detect
disabling webm_io
enabling pic
Configuring selected codecs
enabling vp8_encoder
enabling vp8_decoder
enabling vp9_encoder
enabling vp9_decoder
Configuring for target 'armv7-linux-gcc'
enabling armv7
enabling neon
enabling neon_asm
enabling media
Unable to invoke compiler: arm-none-linux-gnueabi-gcc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
Configuration failed. This could reflect a misconfiguration of your
toolchains, improper options selected, or another problem. If you
don't see any useful error messages above, the next step is to look
at the configure error log file (config.log) to determine what
configure was trying to do when it died.
../../contrib/src/vpx/rules.mak:105: recipe for target '.vpx' failed
make: *** [.vpx] Error 1
编译环
尽管编译依赖项失败,但我还是尝试编译ring:
git clone https://gerrit-ring.savoirfairelinux.com/ring
cd ring
./autogen.sh
./configure
make
make install
这导致以下错误:
checking for PJPROJECT... no
configure: error: Missing pjproject files
pi@phone ~/ring $ make
make: *** No targets specified and no makefile found. Stop.
pi@phone ~/ring $ make install
make: *** No rule to make target 'install'. Stop.
所以目前我被困住了,我担心我无法超越the current state of my project(🎥):
编辑:现在没有视频编解码器(建议使用aberaud),我遇到以下错误:
/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -I../include/opendht -I/home/pi/sip-desaster/ring/contrib/arm-linux-gnueabihf/include -fPIC -I/home/pi/sip-desaster/ring/contrib/arm-linux-gnueabihf/include -g -fPIC -O3 -std=c++0x -I/home/pi/sip-desaster/ring/contrib/arm-linux-gnueabihf/include -g -fPIC -O3 -std=c++0x -c -o libopendht_la-dht.lo `test -f 'dht.cpp' || echo './'`dht.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -I../include/opendht -I/home/pi/sip-desaster/ring/contrib/arm-linux-gnueabihf/include -fPIC -I/home/pi/sip-desaster/ring/contrib/arm-linux-gnueabihf/include -g -fPIC -O3 -std=c++0x -I/home/pi/sip-desaster/ring/contrib/arm-linux-gnueabihf/include -g -fPIC -O3 -std=c++0x -c dht.cpp -fPIC -DPIC -o libopendht_la-dht.o
In file included from ../include/opendht/dht.h:29:0,
from dht.cpp:27:
../include/opendht/infohash.h:58:22: error: expected initializer before ‘:’ token
dht.cpp:3105:1: error: expected ‘}’ at end of input
Makefile:386: recipe for target 'libopendht_la-dht.lo' failed
make[2]: *** [libopendht_la-dht.lo] Error 1
make[2]: Leaving directory '/home/pi/sip-desaster/ring/contrib/native/opendht/src'
Makefile:395: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory '/home/pi/sip-desaster/ring/contrib/native/opendht'
../../contrib/src/opendht/rules.mak:28: recipe for target '.opendht' failed
make: *** [.opendht] Error 2
最佳答案
贡献
Ring构建的“贡献”部分是关于构建目标系统上不可用的依赖关系,这些依赖关系通常用于在交叉编译时构建完整的工作包,或者用于没有适当依赖关系管理的系统(基本上是除Linux发行版以外的所有OS)。
在contrib/native
目录中,您可以运行make list
以查看要构建的软件包列表。由于您是交叉编译的,因此您将需要构建几乎所有内容。
如果您以某种方式弄乱了contrib构建,则可以安全地删除contrib/native
和contrib/{target_tuple}
(如果有)目录,然后重新开始。
libvpx
libav使用libvpx库提供vp8和vp9视频编解码器。这不是硬性依赖性,并且由于您的项目不使用视频,因此可以安全地禁用它。交叉编译vpx时,我们也遇到了问题。
在contrib/src/libav/rules.mak
第70行中,DEPS_libav
定义了libav的依赖项列表。您可以从列表中删除vpx
,x264
和$(DEPS_vpx)
,因为您不使用视频。您还可以在列表中添加speex和opus音频编解码器(它们应该在列表中,但不在列表中,请参阅this patch
举个例子)。
在按照上述方法清除contrib并再次增强处理之后,在运行make list
时,不应在“待构建软件包”列表中显示vpx
和x264
。然后尝试通过运行make
构建contrib。
如果尝试此操作后,其他软件包遇到相同的问题,则可能存在某种交叉编译构建路径问题(然后,我将需要更多日志/详细信息)。
作为最后的手段,在Pi本身上(使用Raspbian)进行编译的速度非常慢,但具有use local distro-provided dependencies的优势,并消除了交叉编译的麻烦。
祝你好运