#8 Compile failed in COSSSoundPlayer.cpp

closed-fixed
5
2002-08-16
2002-08-12
Anonymous
No

COSSSoundPlayer.cpp: In member function `virtual void
COSSSoundPlayer::initialize()
':
COSSSoundPlayer.cpp:148: call of overloaded
`log(unsigned int)' is ambiguous
/usr/include/bits/mathcalls.h:112: candidates are:
double log(double)
/usr/include/g++-v31/cmath:334: long
double std::log(long double)
/usr/include/g++-v31/cmath:326: float
std::log(float)
make[3]: *** [COSSSoundPlayer.lo] Error 1
make[3]: Leaving directory
`/usr/local/src/rezound-0.3.0alpha/src/backend'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/usr/local/src/rezound-0.3.0alpha/src/backend'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/usr/local/src/rezound-0.3.0alpha/src'
make: *** [all-recursive] Error 1

Contact me if you want any more info.
steve@stillaway.ca

Discussion

  • Davy Durham

    Davy Durham - 2002-08-12

    Logged In: YES
    user_id=28588

    Alright.. I fixed it. And attached a patch file.
    To apply the patch, cd into rezound-0.3.0alpha/src/backend ,
    put the patch file there and then run 'patch < logpatch.patch'

    And you will have to have the rpm called 'patch' also... but
    chances are its already installed.

    BTW- What version of gcc and glibc are you using? I had not
    see this problem before with it being ambiguous. However
    this may not be the only place that that problem will show
    up, so please keep me updated.

     
  • Davy Durham

    Davy Durham - 2002-08-12

    Patch to fix the log ambiguity() problem

     
  • Davy Durham

    Davy Durham - 2002-08-12
    • assigned_to: nobody --> ddurham
     
  • Steven Stillaway

    Logged In: YES
    user_id=593962

    The patch worked fine for that bit.

    Got another error now -- I don't think this one has anything
    to do with the compiler though it is an undefined reference
    error.

    I don't really know much about c or c++ programming, but if
    you want to supply patches I will keep testing -- I can
    apply patches :)

    compile output below
    ---------------
    Making all in frontend_fox
    make[2]: Entering directory
    `/usr/local/src/rezound-0.3.0alpha/src/frontend_fox'
    /bin/sh ../../libtool --mode=link c++ -Wall -g
    -D_GNU_SOURCE -Wno-unused-function -Wno-unused-variable
    -Wno-unused -o rezound main.o libfrontend.la
    ../../src/backend/libbackend.la
    ../../src/backend/Edits/libEdits.la
    ../../src/backend/Effects/libEffects.la
    ../../src/backend/Filters/libFilters.la
    ../../src/backend/Looping/libLooping.la
    ../../src/backend/Remaster/libRemaster.la
    ../../src/misc/CNestedDataFile/libmiscCN.la
    ../../src/PoolFile/libPoolFile.la -lFOX -lvorbisenc
    -lvorbisfile -lvorbis -logg -laudiofile -lpthread -lpthread
    -lpthread -lm
    c++ -Wall -g -D_GNU_SOURCE -Wno-unused-function
    -Wno-unused-variable -Wno-unused -o rezound main.o
    ./.libs/libfrontend.a -L/usr/X11R6/lib -L/usr/lib
    ../../src/backend/.libs/libbackend.a
    ../../src/backend/Edits/.libs/libEdits.a
    ../../src/backend/Effects/.libs/libEffects.a
    ../../src/backend/Filters/.libs/libFilters.a
    ../../src/backend/Looping/.libs/libLooping.a
    ../../src/backend/Remaster/.libs/libRemaster.a
    ../../src/misc/CNestedDataFile/.libs/libmiscCN.a
    ../../src/PoolFile/.libs/libPoolFile.a /usr/lib/libFOX.so
    -lXext -lX11 -lMesaGL -lMesaGLU /usr/lib/libjpeg.so -lpng
    -ltiff -lz -lcups -lnsl /usr/lib/libvorbisenc.so
    /usr/lib/libvorbisfile.so /usr/lib/libvorbis.so
    /usr/lib/libogg.so /usr/lib/libaudiofile.so -lpthread -lm
    ./.libs/libfrontend.a(CChannelSelectDialog.o): In function
    `std::basic_string<char, std::char_traits<char>,
    std::allocator<char> >& std::basic_string<char,
    std::char_traits<char>, std::allocator<char> >::append<char
    const*>(char const*, char const*)':
    /usr/local/src/rezound-0.3.0alpha/src/frontend_fox/CChannelSelectDialog.cpp:39:
    undefined reference to `std::basic_string<char,
    std::char_traits<char>, std::allocator<char>
    >::replace(__gnu_cxx::__normal_iterator<char*,
    std::basic_string<char, std::char_traits<char>,
    std::allocator<char> > >,
    __gnu_cxx::__normal_iterator<char*, std::basic_string<char,
    std::char_traits<char>, std::allocator<char> > >, char
    const*, char const*)'
    collect2: ld returned 1 exit status
    make[2]: *** [rezound] Error 1
    make[2]: Leaving directory
    `/usr/local/src/rezound-0.3.0alpha/src/frontend_fox'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory
    `/usr/local/src/rezound-0.3.0alpha/src'
    make: *** [all-recursive] Error 1

     
  • Davy Durham

    Davy Durham - 2002-08-13

    Logged In: YES
    user_id=28588

    Hmm... well I'm looking into this. The error is not
    occuring where it says it is.. sometimes gcc does that
    (actually the linker in this case)... It's understandable
    tho with all the inlining that gcc is doing. However, I
    cannot right now figure it out. I'm installed gcc 3.2
    (that's the only rpm I have rather than building 3.1.1 right
    now)...

    But if you would, tell me what version of glibc and fox
    you're using.

    Thanks

     
  • Davy Durham

    Davy Durham - 2002-08-13

    Logged In: YES
    user_id=28588

    I recompiled ReZound on my machine with gcc-3.2 and
    fox-1.1.14 (and didn't change my glibc 2.2.5) I did get
    the log() error when I removed the patch and it was fixed
    when I applied the patch, so we're in the same ball park
    there. I don't get a linking error about basic_string, nor
    is basic_string used anywhere near that line number you're
    getting the error on (hence what I said about gcc/ld
    misreporting the error position).

    It could be that it was an error in the STL (your libstdc++
    package) and that it's been fixed since what you have
    installed, cause I have the lastest think right now... So
    perhaps upgrading libstdc++ on your machine would help.
    But that's up to you.. I appreciate the feedback... but if
    you don't feel you should upgrade your packages then you can
    at least try ReZound with the standalone binary on the
    downloads page.

    Thanks

     
  • Steven Stillaway

    Logged In: YES
    user_id=593962

    Hi Davy,

    The glibc version is 2.2.5

    The libfox is 1.0.17 so that could be the problem there, it
    is a fair bit older then yours. This is the latest version
    of fox available for Gentoo Linux so I would have to compile
    that the newer one. I might do that later, but not tonight.

    The libstdc++ version on my system appears to be 4.0.0 (but
    I also have 2.8.0 & 2.7.2.8 kicking around). Which version
    did you compile against?

    Although I think it more likely to be a problem with fox
    since my version is obviously much older then yours and I
    have had no problems compiling other things.

     
  • Davy Durham

    Davy Durham - 2002-08-14

    Logged In: YES
    user_id=28588

    Well, even though the error is at a FOX line of code, I
    don't think FOX is at fault here.. as far as I know fox
    doesn't use a bit of libstdc++. And I've been successfully
    compiling against fox0.99-wayback; so I don't suspect it.

    Man, I have libstdc++2.10, libstdc++3.0, libstdc++3.1, and
    libstdc++5 I didn't realize I had so many.. but in the
    rpm database gcc-3.1 depents on stdc++5 and gcc-2.96 depends
    on libstdc++2.10 ... So I imagine that It's working for
    me with 2.10 and 5.0 I never tried 4.

    You could try upgrading to gcc3.1.1 if your distro has
    packaged it. If not, let me know and I'll try to see if I
    can get libstdc++4 installed and compile against that.

    Thanks

     
  • Steven Stillaway

    Logged In: YES
    user_id=593962

    OK I lied -- I did work on this tonight. I could not sleep.

    I upgraded to gcc 3.2 and libstdc++5 and it compiled!

    And it runs. It is 2:30 AM now. I am going to bed.

    I was running gcc 3.1.1 before, but my gcc 3.1.1 only had
    libstdc++4, which apparently does not work.

     
  • Davy Durham

    Davy Durham - 2002-08-14

    Logged In: YES
    user_id=28588

    Hehe, alright.. so problem solved? I guess libstdc++4 has
    some difference with versions 2.10 and 5 (and possibly 3
    also, because why would I have libstdc++3 on my machine if I
    had never used it. Inevitably, I compiled ReZound with it
    sometime)

    Should I work to resolve it with v4? nah.. I never saw
    version 4 on Mandrake at all.. hopefully few others did too.

    Do you want me to close this issue? (or you can do it.)

     
  • Steven Stillaway

    Logged In: YES
    user_id=593962

    Yeah I would not worry too much about libstdc++4, I don't
    think it is very common.

    I also looked a bit at GCC 3.1.1 and 3.2 and apparently
    there is some major bug fixes between these versions
    regarding c++ (every other language is apparently identical
    between these two versions).

    So you might even want to just forget about supporting GCC 3.1.1

    Now I'll try and take a look at rezound and see what it is like.

     
  • Steven Stillaway

    Logged In: YES
    user_id=593962

    P.S. I don't seem to have an option to close the bug.

    Perhaps because I was not actually registered when I first
    filed it. I only registered when you responded.

    Anyways, I think you can close this one.

    It should have really been a second bug report anyways.

     
  • Davy Durham

    Davy Durham - 2002-08-15
    • status: open --> closed
     
  • Davy Durham

    Davy Durham - 2002-08-16
    • status: closed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks