flashlight / wav2letter

Facebook AI Research's Automatic Speech Recognition Toolkit
https://github.com/facebookresearch/wav2letter/wiki
Other
6.37k stars 1.01k forks source link

could not compile wav2letter #136

Closed nichongjia closed 5 years ago

nichongjia commented 5 years ago

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 toogg_sync_wrote' ogg_vorbis.c:(.text+0x229): undefined reference to ogg_stream_pagein' ogg_vorbis.c:(.text+0x249): undefined reference toogg_stream_packetout' ogg_vorbis.c:(.text+0x2a0): undefined reference to vorbis_synthesis_headerin' ogg_vorbis.c:(.text+0x33f): undefined reference tovorbis_comment_query' ogg_vorbis.c:(.text+0x431): undefined reference to vorbis_synthesis_init' ogg_vorbis.c:(.text+0x44f): undefined reference tovorbis_block_init' /usr/local/lib64/libsndfile.a(ogg_vorbis.c.o): In function vorbis_write_header': ogg_vorbis.c:(.text+0x4ad): undefined reference tovorbis_info_init' ogg_vorbis.c:(.text+0x4f3): undefined reference to vorbis_encode_init_vbr' ogg_vorbis.c:(.text+0x521): undefined reference tovorbis_comment_init' ogg_vorbis.c:(.text+0x53b): undefined reference to vorbis_comment_add_tag' ogg_vorbis.c:(.text+0x64c): undefined reference tovorbis_comment_add_tag' ogg_vorbis.c:(.text+0x678): undefined reference to vorbis_analysis_init' ogg_vorbis.c:(.text+0x696): undefined reference tovorbis_block_init' ogg_vorbis.c:(.text+0x6ad): undefined reference to ogg_stream_init' ogg_vorbis.c:(.text+0x6dd): undefined reference tovorbis_analysis_headerout' ogg_vorbis.c:(.text+0x6f7): undefined reference to ogg_stream_packetin' ogg_vorbis.c:(.text+0x711): undefined reference toogg_stream_packetin' ogg_vorbis.c:(.text+0x728): undefined reference to ogg_stream_packetin' ogg_vorbis.c:(.text+0x79c): undefined reference toogg_stream_flush' /usr/local/lib64/libsndfile.a(ogg_vorbis.c.o): In function vorbis_close': ogg_vorbis.c:(.text+0x837): undefined reference tovorbis_analysis_wrote' ogg_vorbis.c:(.text+0x853): undefined reference to vorbis_analysis' ogg_vorbis.c:(.text+0x865): undefined reference tovorbis_bitrate_addblock' ogg_vorbis.c:(.text+0x888): undefined reference to ogg_stream_packetin' ogg_vorbis.c:(.text+0x8ab): undefined reference toogg_stream_pageout' ogg_vorbis.c:(.text+0x919): undefined reference to ogg_page_eos' ogg_vorbis.c:(.text+0x95b): undefined reference tovorbis_bitrate_flushpacket' ogg_vorbis.c:(.text+0x981): undefined reference to vorbis_analysis_blockout' ogg_vorbis.c:(.text+0x99c): undefined reference tovorbis_block_clear' ogg_vorbis.c:(.text+0x9ac): undefined reference to vorbis_dsp_clear' ogg_vorbis.c:(.text+0x9bc): undefined reference tovorbis_comment_clear' ogg_vorbis.c:(.text+0x9cc): undefined reference to vorbis_info_clear' /usr/local/lib64/libsndfile.a(ogg_vorbis.c.o): In functionogg_vorbis_open': ogg_vorbis.c:(.text+0xa61): undefined reference to vorbis_version_string' /usr/local/lib64/libsndfile.a(ogg_vorbis.c.o): In functionvorbis_read_sample': ogg_vorbis.c:(.text+0x1256): undefined reference to vorbis_synthesis_read' ogg_vorbis.c:(.text+0x1293): undefined reference tovorbis_synthesis_pcmout' ogg_vorbis.c:(.text+0x12c1): undefined reference to ogg_sync_pageout' ogg_vorbis.c:(.text+0x130e): undefined reference toogg_stream_pagein' ogg_vorbis.c:(.text+0x132c): undefined reference to ogg_stream_packetout' ogg_vorbis.c:(.text+0x1348): undefined reference toogg_page_eos' ogg_vorbis.c:(.text+0x137f): undefined reference to vorbis_synthesis' ogg_vorbis.c:(.text+0x13a1): undefined reference tovorbis_synthesis_blockin' ogg_vorbis.c:(.text+0x13f4): undefined reference to vorbis_synthesis_read' ogg_vorbis.c:(.text+0x1431): undefined reference tovorbis_synthesis_pcmout' ogg_vorbis.c:(.text+0x1488): undefined reference to ogg_sync_buffer' ogg_vorbis.c:(.text+0x14c1): undefined reference toogg_sync_wrote' /usr/local/lib64/libsndfile.a(ogg_vorbis.c.o): In function vorbis_write_samples': ogg_vorbis.c:(.text+0x15e1): undefined reference tovorbis_analysis_wrote'

jacobkahn commented 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.

Stolaine commented 5 years ago

https://github.com/erikd/libsndfile/issues/446

shessam commented 4 years ago

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!

jacobkahn commented 4 years ago

@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.