[ITP] alure 1.2

Ken Brown kbrown@cornell.edu
Mon Oct 17 19:38:00 GMT 2016


On 10/17/2016 9:41 AM, Bastian Germann wrote:
> Am 16.10.2016 um 23:30 schrieb Marco Atzeri:
>> Any reason to not add FLAC (Free Lossless Audio Codec)
>> dependency ?
>
> Yes, there is a reason: The symbols used from FLAC/stream_decoder.h
> cannot be linked:
>
> [ 70%] Linking CXX shared library cygalure-1.dll
> CMakeFiles/alure.dir/src/codec_flac.o: In function
> `flacStream::GetLength()':
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:160: undefined reference
> to `FLAC__stream_decoder_get_total_samples'
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:160:(.text$_ZN10flacStream9GetLengthEv[_ZN10flacStream9GetLengthEv]+0x5):
> relocation truncated to fit: R_X86_64_PC32 against undefined symbol
> `FLAC__stream_decoder_get_total_samples'
> CMakeFiles/alure.dir/src/codec_flac.o: In function `flacStream::Rewind()':
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:148: undefined reference
> to `FLAC__stream_decoder_seek_absolute'
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:148:(.text$_ZN10flacStream6RewindEv[_ZN10flacStream6RewindEv]+0xf):
> relocation truncated to fit: R_X86_64_PC32 against undefined symbol
> `FLAC__stream_decoder_seek_absolute'
> CMakeFiles/alure.dir/src/codec_flac.o: In function
> `flacStream::GetData(unsigned char*, unsigned int)':
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:138: undefined reference
> to `FLAC__stream_decoder_process_single'
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:138:(.text$_ZN10flacStream7GetDataEPhj[_ZN10flacStream7GetDataEPhj]+0x73):
> relocation truncated to fit: R_X86_64_PC32 against undefined symbol
> `FLAC__stream_decoder_process_single'
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:139: undefined reference
> to `FLAC__stream_decoder_get_state'
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:139:(.text$_ZN10flacStream7GetDataEPhj[_ZN10flacStream7GetDataEPhj]+0x8a):
> relocation truncated to fit: R_X86_64_PC32 against undefined symbol
> `FLAC__stream_decoder_get_state'
> CMakeFiles/alure.dir/src/codec_flac.o: In function
> `flacStream::~flacStream()':
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:191: undefined reference
> to `FLAC__stream_decoder_finish'
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:191:(.text$_ZN10flacStreamD1Ev[_ZN10flacStreamD1Ev]+0x1d):
> relocation truncated to fit: R_X86_64_PC32 against undefined symbol
> `FLAC__stream_decoder_finish'
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:192: undefined reference
> to `FLAC__stream_decoder_delete'
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:192:(.text$_ZN10flacStreamD1Ev[_ZN10flacStreamD1Ev]+0x26):
> relocation truncated to fit: R_X86_64_PC32 against undefined symbol
> `FLAC__stream_decoder_delete'
> CMakeFiles/alure.dir/src/codec_flac.o: In function
> `flacStream::~flacStream()':
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:191: undefined reference
> to `FLAC__stream_decoder_finish'
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:191:(.text$_ZN10flacStreamD0Ev[_ZN10flacStreamD0Ev]+0x1d):
> relocation truncated to fit: R_X86_64_PC32 against undefined symbol
> `FLAC__stream_decoder_finish'
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:192: undefined reference
> to `FLAC__stream_decoder_delete'
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:192:(.text$_ZN10flacStreamD0Ev[_ZN10flacStreamD0Ev]+0x26):
> relocation truncated to fit: R_X86_64_PC32 against undefined symbol
> `FLAC__stream_decoder_delete'
> CMakeFiles/alure.dir/src/codec_flac.o: In function
> `flacStream::flacStream(std::istream*)':
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:169: undefined reference
> to `FLAC__stream_decoder_new'
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:169:(.text$_ZN11DecoderDeclI10flacStreamLi1EE7FactoryEPSi[_ZN11DecoderDeclI10flacStreamLi1EE7FactoryEPSi]+0xb0):
> relocation truncated to fit: R_X86_64_PC32 against undefined symbol
> `FLAC__stream_decoder_new'
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:172: undefined reference
> to `FLAC__stream_decoder_init_stream'
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:172:(.text$_ZN11DecoderDeclI10flacStreamLi1EE7FactoryEPSi[_ZN11DecoderDeclI10flacStreamLi1EE7FactoryEPSi]+0x117):
> relocation truncated to fit: R_X86_64_PC32 against undefined symbol
> `FLAC__stream_decoder_init_stream'
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:182: undefined reference
> to `FLAC__stream_decoder_delete'
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:182:(.text$_ZN11DecoderDeclI10flacStreamLi1EE7FactoryEPSi[_ZN11DecoderDeclI10flacStreamLi1EE7FactoryEPSi]+0x128):
> additional relocation overflows omitted from the output
> CMakeFiles/alure.dir/src/codec_flac.o: In function `flacStream::InitFlac()':
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:209: undefined reference
> to `FLAC__stream_decoder_process_single'
> CMakeFiles/alure.dir/src/codec_flac.o: In function
> `flacStream::flacStream(std::istream*)':
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:180: undefined reference
> to `FLAC__stream_decoder_finish'
> CMakeFiles/alure.dir/src/codec_flac.o: In function `flacStream::InitFlac()':
> /usr/src/debug/alure-1.2-1/src/codec_flac.cpp:210: undefined reference
> to `FLAC__stream_decoder_get_state'

That happens because DYNLOAD is not defined.  If you build with DYNLOAD 
defined, it links fine.  There is one glitch that has to be fixed when 
you do that.  The build detects windows.h and then doesn't include 
dlfcn.h.  [See main.h, lines 17--31.]  So I edited CMakeLists.txt so as 
to trick the build into not defining HAVE_WINDOWS_H.  I don't know 
enough about cmake to know the right way to handle this.

Ken



More information about the Cygwin-apps mailing list