![使 dmrshark 出现错误:sqrtf@@GLIBC2.0 未定义引用](https://linux22.com/image/991618/%E4%BD%BF%20dmrshark%20%E5%87%BA%E7%8E%B0%E9%94%99%E8%AF%AF%EF%BC%9Asqrtf%40%40GLIBC2.0%20%E6%9C%AA%E5%AE%9A%E4%B9%89%E5%BC%95%E7%94%A8.png)
我要实现dmrshark从https://github.com/nonoo/dmrshark,但是当我这样做时,会出现错误。有人能帮助我吗?
错误信息:
make[2]: Leaving directory `/home/m/sdr/dmrshark/libs/aprs'
gcc -DDMRSHARK_BUILD -g -Wall -std=gnu99 -O0 -DGITHASH=\"ac306a84b6ed4a4167e272f05b32dad200715574\" -DDEFAULTCONFIG="<config/defaults.h>" -DAPPCONFIGFILE=\"/home/m/sdr/dmrshark//config/app/dmrshark.h\" -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -DARCH_X86 -funsigned-bitfields -funsigned-char -Wno-unused-result -DAMBEDECODEVOICE -DMP3ENCODEVOICE -I../../make/.. dmrshark-dmrshark.o -L../../make/../libs -Wl,--start-group -lbase-dmrshark -lconfig-dmrshark -ldaemon-dmrshark -lcomm-dmrshark -lremotedb-dmrshark -ldmrpacket-dmrshark -lcoding-dmrshark -lvoicestreams-dmrshark -laprs-dmrshark -lpcap -lsnmp -lmysqlclient -lpthread -lwebsockets -lmbe -lmp3lame -Wl,--end-group -lglib-2.0 -o dmrshark-build-ac306a
/usr/bin/ld: ../../make/../libs/libvoicestreams-dmrshark.a(voicestreams-process-dmrshark.o): undefined reference to symbol 'sqrtf@@GLIBC_2.0'
//lib/i386-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: ld returned 1 exit status
make[1]: *** [dmrshark-build-ac306a] Error 1
make[1]: Leaving directory `/home/m/sdr/dmrshark/build/dmrshark'
make: *** [all] Error 2
答案1
Ubuntu 12.04.5 - 64,dmrshark:
sudo apt-get install g++ git cmake libglib2.0-dev libpcap-dev libsnmp-dev libmysqlclient-dev libmp3lame-dev
来源...
git clone https://github.com/warmcat/libwebsockets.git
git clone https://github.com/szechyjs/mbelib.git
git clone https://github.com/nonoo/dmrshark.git
构建库 libwebsockets、mbelib,并使用 进行安装sudo make install
。
cd dmrshark/
,1) 移走文件夹 files/:,mv files/ ../
也就是说,非常简单的 Makefile 将尝试“制作”任何东西,包括数据文件,从而失败。2) cp build/Makefile tests/
。(测试/中缺少 Makefile。)
下一步:(make
失败make install
。但您有可执行文件,并且可以按原样使用它们。)
或在此处获取副本https://drive.google.com/file/d/0B7S255p3kFXNOFQ5MG9aZkxrY3c/view?usp=sharing