Closed nichongjia closed 5 years ago
@nichongjia — make sure you have all of the libsndfile dependencies installed (sudo apt-get install libasound2-dev libflac-dev libogg-dev libtool libvorbis-dev
), and that you reconf and rebuild libsndfile so that it's linked to those audio process libs. More info here.
The solutions above(package installation or building the libsndfile) didn’t solve my problem :( Please help me!
System: Ubuntu 18.04 Cmake and other dependencies are installed successfully due to wiki
Error is the same as mentioned above!
@shessam — can you take a look at https://github.com/erikd/libsndfile/issues/446#issuecomment-457064965? Your installation is probably in a bad state. I'd recommending purging relevant packages and shared objects from your system and trying again.
I add the FindSndFile.cmake for generating Makefile for compile. it can generate the makefile for compiling. but when ld the libsndfile.a, there are lots of error, like the following. And In order to can compile, I also commented the #SndFile::sndfile # imported target, and re-move the comment ${SNDFILE_LIBRARIES}
ogg_vorbis.c:(.text+0x197): undefined reference to
ogg_sync_buffer' ogg_vorbis.c:(.text+0x1fc): undefined reference to
ogg_sync_wrote' ogg_vorbis.c:(.text+0x229): undefined reference toogg_stream_pagein' ogg_vorbis.c:(.text+0x249): undefined reference to
ogg_stream_packetout' ogg_vorbis.c:(.text+0x2a0): undefined reference tovorbis_synthesis_headerin' ogg_vorbis.c:(.text+0x33f): undefined reference to
vorbis_comment_query' ogg_vorbis.c:(.text+0x431): undefined reference tovorbis_synthesis_init' ogg_vorbis.c:(.text+0x44f): undefined reference to
vorbis_block_init' /usr/local/lib64/libsndfile.a(ogg_vorbis.c.o): In functionvorbis_write_header': ogg_vorbis.c:(.text+0x4ad): undefined reference to
vorbis_info_init' ogg_vorbis.c:(.text+0x4f3): undefined reference tovorbis_encode_init_vbr' ogg_vorbis.c:(.text+0x521): undefined reference to
vorbis_comment_init' ogg_vorbis.c:(.text+0x53b): undefined reference tovorbis_comment_add_tag' ogg_vorbis.c:(.text+0x64c): undefined reference to
vorbis_comment_add_tag' ogg_vorbis.c:(.text+0x678): undefined reference tovorbis_analysis_init' ogg_vorbis.c:(.text+0x696): undefined reference to
vorbis_block_init' ogg_vorbis.c:(.text+0x6ad): undefined reference toogg_stream_init' ogg_vorbis.c:(.text+0x6dd): undefined reference to
vorbis_analysis_headerout' ogg_vorbis.c:(.text+0x6f7): undefined reference toogg_stream_packetin' ogg_vorbis.c:(.text+0x711): undefined reference to
ogg_stream_packetin' ogg_vorbis.c:(.text+0x728): undefined reference toogg_stream_packetin' ogg_vorbis.c:(.text+0x79c): undefined reference to
ogg_stream_flush' /usr/local/lib64/libsndfile.a(ogg_vorbis.c.o): In functionvorbis_close': ogg_vorbis.c:(.text+0x837): undefined reference to
vorbis_analysis_wrote' ogg_vorbis.c:(.text+0x853): undefined reference tovorbis_analysis' ogg_vorbis.c:(.text+0x865): undefined reference to
vorbis_bitrate_addblock' ogg_vorbis.c:(.text+0x888): undefined reference toogg_stream_packetin' ogg_vorbis.c:(.text+0x8ab): undefined reference to
ogg_stream_pageout' ogg_vorbis.c:(.text+0x919): undefined reference toogg_page_eos' ogg_vorbis.c:(.text+0x95b): undefined reference to
vorbis_bitrate_flushpacket' ogg_vorbis.c:(.text+0x981): undefined reference tovorbis_analysis_blockout' ogg_vorbis.c:(.text+0x99c): undefined reference to
vorbis_block_clear' ogg_vorbis.c:(.text+0x9ac): undefined reference tovorbis_dsp_clear' ogg_vorbis.c:(.text+0x9bc): undefined reference to
vorbis_comment_clear' ogg_vorbis.c:(.text+0x9cc): undefined reference tovorbis_info_clear' /usr/local/lib64/libsndfile.a(ogg_vorbis.c.o): In function
ogg_vorbis_open': ogg_vorbis.c:(.text+0xa61): undefined reference tovorbis_version_string' /usr/local/lib64/libsndfile.a(ogg_vorbis.c.o): In function
vorbis_read_sample': ogg_vorbis.c:(.text+0x1256): undefined reference tovorbis_synthesis_read' ogg_vorbis.c:(.text+0x1293): undefined reference to
vorbis_synthesis_pcmout' ogg_vorbis.c:(.text+0x12c1): undefined reference toogg_sync_pageout' ogg_vorbis.c:(.text+0x130e): undefined reference to
ogg_stream_pagein' ogg_vorbis.c:(.text+0x132c): undefined reference toogg_stream_packetout' ogg_vorbis.c:(.text+0x1348): undefined reference to
ogg_page_eos' ogg_vorbis.c:(.text+0x137f): undefined reference tovorbis_synthesis' ogg_vorbis.c:(.text+0x13a1): undefined reference to
vorbis_synthesis_blockin' ogg_vorbis.c:(.text+0x13f4): undefined reference tovorbis_synthesis_read' ogg_vorbis.c:(.text+0x1431): undefined reference to
vorbis_synthesis_pcmout' ogg_vorbis.c:(.text+0x1488): undefined reference toogg_sync_buffer' ogg_vorbis.c:(.text+0x14c1): undefined reference to
ogg_sync_wrote' /usr/local/lib64/libsndfile.a(ogg_vorbis.c.o): In functionvorbis_write_samples': ogg_vorbis.c:(.text+0x15e1): undefined reference to
vorbis_analysis_wrote'