Hi I'm having a problem compiling opus-tools-0.1.7. Version opus-tools-0.1.6 seems to compile OK. I've tried with opus-1.0.3 and opus-1.1-beta. The errors are like this:- "undefined reference to `sqrtf'" etc. This OS is Peppermint Three, similar to Ubuntu 12.04. It uses:- gcc --version gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 Google says it's maybe something to do with the "linking process" which might be caused by the gcc compiler. Can something be done with the opus code to overcome this, or shall I compile on a different/better/newer OS? *********************************************************************************************** peppermint at peppermint ~/build/opus-tools-0.1.7 $ make make? all-recursive make[1]: Entering directory `/home/peppermint/build/opus-tools-0.1.7' Making all in . make[2]: Entering directory `/home/peppermint/build/opus-tools-0.1.7' ? CC?????? src/opusenc-opus_header.o ? CC?????? src/opusenc-opusenc.o ? CC?????? src/opusenc-picture.o ? CC?????? src/opusenc-resample.o src/resample.c: In function ?update_filter?: src/resample.c:607:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] src/resample.c:688:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] src/resample.c:696:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] src/resample.c:699:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] src/resample.c:706:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] src/resample.c: In function ?opustools_resampler_process_float?: src/resample.c:872:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] src/resample.c:875:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] src/resample.c: In function ?opustools_resampler_process_int?: src/resample.c:928:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] src/resample.c:935:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] src/resample.c:945:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] ? CC?????? src/opusenc-audio-in.o ? CC?????? src/opusenc-diag_range.o ? CC?????? src/opusenc-flac.o ? CC?????? src/opusenc-lpc.o ? CC?????? win32/opusenc-unicode_support.o ? CCLD???? opusenc ? CC?????? src/opusdec-opus_header.o ? CC?????? src/opusdec-wav_io.o ? CC?????? src/opusdec-wave_out.o ? CC?????? src/opusdec-opusdec.o ? CC?????? src/opusdec-resample.o src/resample.c: In function ?update_filter?: src/resample.c:607:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] src/resample.c:688:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] src/resample.c:696:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] src/resample.c:699:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] src/resample.c:706:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] src/resample.c: In function ?opustools_resampler_process_float?: src/resample.c:872:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] src/resample.c:875:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] src/resample.c: In function ?opustools_resampler_process_int?: src/resample.c:928:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] src/resample.c:935:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] src/resample.c:945:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] ? CC?????? src/opusdec-diag_range.o ? CC?????? win32/opusdec-unicode_support.o ? CCLD???? opusdec ? CC?????? src/opusinfo-opus_header.o ? CC?????? src/opusinfo-opusinfo.o ? CC?????? src/opusinfo-info_opus.o ? CC?????? src/opusinfo-picture.o ? CC?????? win32/opusinfo-unicode_support.o ? CCLD???? opusinfo ? CC?????? src/opusrtp.o ? CCLD???? opusrtp /usr/local/lib/libopus.a(opus_decoder.o): In function `opus_decode_frame': /home/peppermint/build/opus-1.1-beta/src/opus_decoder.c:536: undefined reference to `exp' /usr/local/lib/libopus.a(celt_decoder.o): In function `celt_decode_lost': /home/peppermint/build/opus-1.1-beta/celt/celt_decoder.c:610: undefined reference to `sqrtf' /home/peppermint/build/opus-1.1-beta/celt/celt_decoder.c:539: undefined reference to `sqrtf' /usr/local/lib/libopus.a(pitch.o): In function `remove_doubling': /home/peppermint/build/opus-1.1-beta/celt/pitch.c:445: undefined reference to `sqrtf' /home/peppermint/build/opus-1.1-beta/celt/pitch.c:481: undefined reference to `sqrtf' /usr/local/lib/libopus.a(quant_bands.o): In function `quant_coarse_energy_impl': /home/peppermint/build/opus-1.1-beta/celt/quant_bands.c:202: undefined reference to `floorf' /usr/local/lib/libopus.a(quant_bands.o): In function `quant_fine_energy': /home/peppermint/build/opus-1.1-beta/celt/quant_bands.c:375: undefined reference to `floorf' /usr/local/lib/libopus.a(quant_bands.o): In function `amp2Log2': /home/peppermint/build/opus-1.1-beta/celt/quant_bands.c:547: undefined reference to `log' /usr/local/lib/libopus.a(vq.o): In function `exp_rotation': /home/peppermint/build/opus-1.1-beta/celt/vq.c:81: undefined reference to `cosf' /home/peppermint/build/opus-1.1-beta/celt/vq.c:82: undefined reference to `cosf' /usr/local/lib/libopus.a(vq.o): In function `alg_quant': /home/peppermint/build/opus-1.1-beta/celt/vq.c:227: undefined reference to `floorf' /usr/local/lib/libopus.a(vq.o): In function `normalise_residual': /home/peppermint/build/opus-1.1-beta/celt/vq.c:126: undefined reference to `sqrtf' /usr/local/lib/libopus.a(vq.o): In function `renormalise_vector': /home/peppermint/build/opus-1.1-beta/celt/vq.c:366: undefined reference to `sqrtf' /usr/local/lib/libopus.a(vq.o): In function `stereo_itheta': /home/peppermint/build/opus-1.1-beta/celt/vq.c:411: undefined reference to `atan2' /home/peppermint/build/opus-1.1-beta/celt/vq.c:411: undefined reference to `floor' /home/peppermint/build/opus-1.1-beta/celt/vq.c:406: undefined reference to `sqrtf' /home/peppermint/build/opus-1.1-beta/celt/vq.c:405: undefined reference to `sqrtf' /usr/local/lib/libopus.a(bands.o): In function `intensity_stereo': /home/peppermint/build/opus-1.1-beta/celt/bands.c:349: undefined reference to `sqrtf' /usr/local/lib/libopus.a(bands.o): In function `compute_band_energies': /home/peppermint/build/opus-1.1-beta/celt/bands.c:165: undefined reference to `sqrtf' /usr/local/lib/libopus.a(bands.o): In function `denormalise_bands': /home/peppermint/build/opus-1.1-beta/celt/bands.c:229: undefined reference to `exp' /usr/local/lib/libopus.a(bands.o): In function `anti_collapse': /home/peppermint/build/opus-1.1-beta/celt/bands.c:272: undefined reference to `exp' /home/peppermint/build/opus-1.1-beta/celt/bands.c:309: undefined reference to `exp' /home/peppermint/build/opus-1.1-beta/celt/bands.c:273: undefined reference to `sqrt' /usr/local/lib/libopus.a(bands.o): In function `quant_band': /home/peppermint/build/opus-1.1-beta/celt/bands.c:1171: undefined reference to `sqrt' /usr/local/lib/libopus.a(bands.o): In function `stereo_merge': /home/peppermint/build/opus-1.1-beta/celt/bands.c:406: undefined reference to `sqrtf' /usr/local/lib/libopus.a(bands.o): In function `quant_band_stereo': /home/peppermint/build/opus-1.1-beta/celt/bands.c:408: undefined reference to `sqrtf' collect2: ld returned 1 exit status make[2]: *** [opusrtp] Error 1 make[2]: Leaving directory `/home/peppermint/build/opus-tools-0.1.7' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/peppermint/build/opus-tools-0.1.7' make: *** [all] Error 2 peppermint at peppermint ~/build/opus-tools-0.1.7 $
Hi, Seems like it's not linking with libm. I suspect it has to do with linking statically with libopus.a (is that intended?). Maybe opus-tools relies on the fact that libopus is linked with libm and doesn't explicitly add it? Greg? Jean-Marc On 09/24/2013 06:09 AM, bat guano wrote:> Hi > I'm having a problem compiling opus-tools-0.1.7. > Version opus-tools-0.1.6 seems to compile OK. > > I've tried with opus-1.0.3 and opus-1.1-beta. > > The errors are like this:- > "undefined reference to `sqrtf'" etc. > > This OS is Peppermint Three, similar to Ubuntu 12.04. > It uses:- > gcc --version > gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 > > > Google says it's maybe something to do with the "linking process" which might be caused by the gcc compiler. > Can something be done with the opus code to overcome this, or shall I compile on a different/better/newer OS? > > > *********************************************************************************************** > peppermint at peppermint ~/build/opus-tools-0.1.7 $ make > make all-recursive > make[1]: Entering directory `/home/peppermint/build/opus-tools-0.1.7' > Making all in . > make[2]: Entering directory `/home/peppermint/build/opus-tools-0.1.7' > CC src/opusenc-opus_header.o > CC src/opusenc-opusenc.o > CC src/opusenc-picture.o > CC src/opusenc-resample.o > src/resample.c: In function ?update_filter?: > src/resample.c:607:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] > src/resample.c:688:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] > src/resample.c:696:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] > src/resample.c:699:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] > src/resample.c:706:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] > src/resample.c: In function ?opustools_resampler_process_float?: > src/resample.c:872:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] > src/resample.c:875:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] > src/resample.c: In function ?opustools_resampler_process_int?: > src/resample.c:928:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] > src/resample.c:935:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] > src/resample.c:945:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] > CC src/opusenc-audio-in.o > CC src/opusenc-diag_range.o > CC src/opusenc-flac.o > CC src/opusenc-lpc.o > CC win32/opusenc-unicode_support.o > CCLD opusenc > CC src/opusdec-opus_header.o > CC src/opusdec-wav_io.o > CC src/opusdec-wave_out.o > CC src/opusdec-opusdec.o > CC src/opusdec-resample.o > src/resample.c: In function ?update_filter?: > src/resample.c:607:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] > src/resample.c:688:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] > src/resample.c:696:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] > src/resample.c:699:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] > src/resample.c:706:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] > src/resample.c: In function ?opustools_resampler_process_float?: > src/resample.c:872:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] > src/resample.c:875:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] > src/resample.c: In function ?opustools_resampler_process_int?: > src/resample.c:928:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] > src/resample.c:935:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] > src/resample.c:945:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] > CC src/opusdec-diag_range.o > CC win32/opusdec-unicode_support.o > CCLD opusdec > CC src/opusinfo-opus_header.o > CC src/opusinfo-opusinfo.o > CC src/opusinfo-info_opus.o > CC src/opusinfo-picture.o > CC win32/opusinfo-unicode_support.o > CCLD opusinfo > CC src/opusrtp.o > CCLD opusrtp > /usr/local/lib/libopus.a(opus_decoder.o): In function `opus_decode_frame': > /home/peppermint/build/opus-1.1-beta/src/opus_decoder.c:536: undefined reference to `exp' > /usr/local/lib/libopus.a(celt_decoder.o): In function `celt_decode_lost': > /home/peppermint/build/opus-1.1-beta/celt/celt_decoder.c:610: undefined reference to `sqrtf' > /home/peppermint/build/opus-1.1-beta/celt/celt_decoder.c:539: undefined reference to `sqrtf' > /usr/local/lib/libopus.a(pitch.o): In function `remove_doubling': > /home/peppermint/build/opus-1.1-beta/celt/pitch.c:445: undefined reference to `sqrtf' > /home/peppermint/build/opus-1.1-beta/celt/pitch.c:481: undefined reference to `sqrtf' > /usr/local/lib/libopus.a(quant_bands.o): In function `quant_coarse_energy_impl': > /home/peppermint/build/opus-1.1-beta/celt/quant_bands.c:202: undefined reference to `floorf' > /usr/local/lib/libopus.a(quant_bands.o): In function `quant_fine_energy': > /home/peppermint/build/opus-1.1-beta/celt/quant_bands.c:375: undefined reference to `floorf' > /usr/local/lib/libopus.a(quant_bands.o): In function `amp2Log2': > /home/peppermint/build/opus-1.1-beta/celt/quant_bands.c:547: undefined reference to `log' > /usr/local/lib/libopus.a(vq.o): In function `exp_rotation': > /home/peppermint/build/opus-1.1-beta/celt/vq.c:81: undefined reference to `cosf' > /home/peppermint/build/opus-1.1-beta/celt/vq.c:82: undefined reference to `cosf' > /usr/local/lib/libopus.a(vq.o): In function `alg_quant': > /home/peppermint/build/opus-1.1-beta/celt/vq.c:227: undefined reference to `floorf' > /usr/local/lib/libopus.a(vq.o): In function `normalise_residual': > /home/peppermint/build/opus-1.1-beta/celt/vq.c:126: undefined reference to `sqrtf' > /usr/local/lib/libopus.a(vq.o): In function `renormalise_vector': > /home/peppermint/build/opus-1.1-beta/celt/vq.c:366: undefined reference to `sqrtf' > /usr/local/lib/libopus.a(vq.o): In function `stereo_itheta': > /home/peppermint/build/opus-1.1-beta/celt/vq.c:411: undefined reference to `atan2' > /home/peppermint/build/opus-1.1-beta/celt/vq.c:411: undefined reference to `floor' > /home/peppermint/build/opus-1.1-beta/celt/vq.c:406: undefined reference to `sqrtf' > /home/peppermint/build/opus-1.1-beta/celt/vq.c:405: undefined reference to `sqrtf' > /usr/local/lib/libopus.a(bands.o): In function `intensity_stereo': > /home/peppermint/build/opus-1.1-beta/celt/bands.c:349: undefined reference to `sqrtf' > /usr/local/lib/libopus.a(bands.o): In function `compute_band_energies': > /home/peppermint/build/opus-1.1-beta/celt/bands.c:165: undefined reference to `sqrtf' > /usr/local/lib/libopus.a(bands.o): In function `denormalise_bands': > /home/peppermint/build/opus-1.1-beta/celt/bands.c:229: undefined reference to `exp' > /usr/local/lib/libopus.a(bands.o): In function `anti_collapse': > /home/peppermint/build/opus-1.1-beta/celt/bands.c:272: undefined reference to `exp' > /home/peppermint/build/opus-1.1-beta/celt/bands.c:309: undefined reference to `exp' > /home/peppermint/build/opus-1.1-beta/celt/bands.c:273: undefined reference to `sqrt' > /usr/local/lib/libopus.a(bands.o): In function `quant_band': > /home/peppermint/build/opus-1.1-beta/celt/bands.c:1171: undefined reference to `sqrt' > /usr/local/lib/libopus.a(bands.o): In function `stereo_merge': > /home/peppermint/build/opus-1.1-beta/celt/bands.c:406: undefined reference to `sqrtf' > /usr/local/lib/libopus.a(bands.o): In function `quant_band_stereo': > /home/peppermint/build/opus-1.1-beta/celt/bands.c:408: undefined reference to `sqrtf' > collect2: ld returned 1 exit status > make[2]: *** [opusrtp] Error 1 > make[2]: Leaving directory `/home/peppermint/build/opus-tools-0.1.7' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/home/peppermint/build/opus-tools-0.1.7' > make: *** [all] Error 2 > peppermint at peppermint ~/build/opus-tools-0.1.7 $ > _______________________________________________ > opus mailing list > opus at xiph.org > http://lists.xiph.org/mailman/listinfo/opus >
> > Hi, > > Seems like it's not linking with libm....HiJust to confirm...With opus-1.1-beta, opus-tools-0.1.6 does compile for me OK. *******************************************************************peppermint at peppermint ~/build/opus-tools-0.1.6 $ opusenc --versionopusenc opus-tools 0.1.6 (using libopus 1.1-beta)Copyright (C) 2008-2012 Xiph.Org Foundation *******************************************************************peppermint at peppermint ~ $ opusenc foo.wav foo.opusEncoding using libopus 1.1-beta (audio)----------------------------------------------------- Input: 44.1kHz 2 channels Output: 2 channels (2 coupled) 20ms packets, 96kbit/sec VBR Preskip: 356 [|] 00:00:25.98 5.2x realtime, 96.01kbit/s Encoding complete ----------------------------------------------------- Encoded: 30.14 seconds Runtime: 5 seconds (6.028x realtime) Wrote: 366132 bytes, 1507 packets, 33 pages Bitrate: 96.4366kbit/s (without overhead) Rate range: 72.4kbit/s to 183.2kbit/s (181 to 458 bytes per packet) Overhead: 0.767% (container+metadata) *******************************************************************peppermint at peppermint ~ $ mediainfo foo.opusGeneralID : 572477523 (0x221F5053)Complete name : foo.opusFormat : OGGFile size : 358 KiB ******************************************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/opus/attachments/20130924/2e851627/attachment-0001.htm
On 2013-09-24 5:46 AM, Jean-Marc Valin wrote:> Seems like it's not linking with libm. I suspect it has to do with > linking statically with libopus.a (is that intended?). Maybe opus-tools > relies on the fact that libopus is linked with libm and doesn't > explicitly add it? Greg?Indeed. The opus-tools build explicitly adds -lm for opusdec and opusenc because they use math calls directly. Maybe that's shadowing the problem for the other tools. opusrtp doesn't need math directly, but as you see, libopus.a does. However, the autotools build does use whatever link line pkg-config tells it to, and we should be including -lm there. Bat, can you post your configure invocation command line, the output of 'pkgconfig --libs opus' and pastebin your config.log somewhere, please? The failed line with 'make V=1' is also helpful in debugging. -r
> > > Google says it's maybe something to do with the "linking process" which might be caused by the gcc compiler. > Can something be done with the opus code to overcome this, or shall I compile on a different/better/newer OS? > >Hello again. Today I've compiled opus-tools-0.1.7 with opus-1.1-beta on two other Ubuntu systems without problems. Ubuntu-11.04(Natty) $ gcc --version gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2 Ubuntu-12.04(Precise) $ gcc --version gcc (Ubuntu/Linaro 4.6.4-1ubuntu1~12.04) 4.6.4 So maybe there is something weird about the compiler used in the Peppermint Three OS. $ gcc --version gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 I will be happy to test any patches, but (imo) it's not worth investigating further for what is now an obsolete OS.
On Wed, Sep 25, 2013 at 3:53 PM, bat guano <batguano999 at hotmail.com> wrote:> > > > > > Google says it's maybe something to do with the "linking process" which > might be caused by the gcc compiler. > > Can something be done with the opus code to overcome this, or shall I > compile on a different/better/newer OS? > > > > > Hello again. > Today I've compiled opus-tools-0.1.7 with opus-1.1-beta on two other > Ubuntu systems without problems. > > Ubuntu-11.04(Natty) > $ gcc --version > gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2 > > Ubuntu-12.04(Precise) > $ gcc --version > gcc (Ubuntu/Linaro 4.6.4-1ubuntu1~12.04) 4.6.4 > > > So maybe there is something weird about the compiler used in the > Peppermint Three OS. > $ gcc --version > gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 > > > I will be happy to test any patches, but (imo) it's not worth > investigating further for what is now an obsolete OS. >I think you're missing -lm (the math library) when linking. There are some LIBM related changes in the git history so this might have already been solved since 0.1.7 Best, Tristan -- Tristan Matthews web: http://tristanswork.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/opus/attachments/20130925/fc066c97/attachment.htm