Find the answer to your Linux question:
Results 1 to 4 of 4
Hello, I have this little problem I thought you might be able to help me with: :~$ldd Main | grep std libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0xb79ab000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb78c5000) as ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Posts
    4

    Unwanted link to old libstdc++


    Hello, I have this little problem I thought you might be able to help me with:

    :~$ldd Main | grep std
    libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0xb79ab000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb78c5000)

    as you can see I'm linking to two versions of stdc++. On a friend's system this isn't the case (only .6), even though both systems are debian unstable with the same gcc/std packages installed! I don't know how to control that.
    Ofcourse on his system it runs fine and on mine it doesn't. I get errors from libstdc++.so.5 about stringstream en deque operators which don't seem to be fully implemented there. (so making it stdc++5 compatible is a drag..)

    Is there any way to force the use of libstdc++.so.6 in the Makefile, if it is available?
    Or is there maybe a good guide for using deque (and others) in libstdc++.so.5 ? (the stringstream problem was a quick fix)

    TIA!
    Alex

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    What is the command you are using to compile/link/whatever

  3. #3
    Just Joined!
    Join Date
    Aug 2005
    Posts
    4
    compile:
    g++ -I/usr/include/SDL -D_REENTRANT -I. -ISWCCGClient/ -I/usr/include/CEGUI/ -std=c++98 -g -O0 -Wall -Werror -c -o Main.o Main.cpp
    etc.

    and linker:
    cc -L/usr/lib -lSDL -lpthread -lGL -lGLU -lSDL_ttf -lSDL_image -L/usr/lib -lCEGUIBase -lCEGUIOpenGLRenderer Main.o ... etc.

    I could also post the makefile, but I think the info you need is above?

    maybe these help too:
    Code:
    alex@athlon64:/$ dpkg -l | grep gcc
    ii  gcc                         4.0.1-3                    The GNU C compiler
    ii  gcc-3.3                     3.3.6-9                    The GNU C compiler
    ii  gcc-3.3-base                3.3.6-9                    The GNU Compiler Collection (base package)
    ii  gcc-3.4                     3.4.4-8                    The GNU C compiler
    ii  gcc-3.4-base                3.4.4-8                    The GNU Compiler Collection (base package)
    ii  gcc-4.0                     4.0.1-6                    The GNU C compiler
    ii  gcc-4.0-base                4.0.1-6                    The GNU Compiler Collection (base package)
    ii  libgcc1                     4.0.1-6                    GCC support library
    Code:
    alex@athlon64:/$ dpkg -l | grep c++
    rc  libsigc++-1.2-5c102         1.2.5-4                    type-safe Signal Framework for C++ - runtime
    ii  libsigc++-1.2-5c2           1.2.5-5                    type-safe Signal Framework for C++ - runtime
    ii  libstdc++2.10-glibc2.2      2.95.4-22                  The GNU stdc++ library
    rc  libstdc++3                  3.0.4-16                   The GNU stdc++ library version 3
    ii  libstdc++5                  3.3.6-9                    The GNU Standard C++ Library v3
    ii  libstdc++5-3.3-dev          3.3.6-9                    The GNU Standard C++ Library v3 (development
    ii  libstdc++6                  4.0.1-6                    The GNU Standard C++ Library v3
    ii  libstdc++6-4.0-dev          4.0.1-6                    The GNU Standard C++ Library v3 (development
    ii  libstdc++6-dev              3.4.4-8                    The GNU Standard C++ Library v3 (development
    Code:
    alex@athlon64:/$ ls -la /usr/bin/gcc
    lrwxrwxrwx  1 root root 7 Aug 12 14:47 /usr/bin/gcc -> gcc-4.0
    thanks!

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Aug 2005
    Posts
    4
    I don't have the problem anymore, it was probably caused by transition of ABI in sid. http://lists.debian.org/debian-devel.../msg00014.html
    (see C++ ABI-transition)

    Probably the only thing holding the upgrade back was my XFree86, because after 'upgrading' to X.org (and corresponding mesa, etc.) it only links to libstdc++.so.6 and it works.

    Strange that it works on my friend's laptop with xfree though :/
    And I'd still like to know if you can force the linker...?

    Thanks,
    Later,
    Alex

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •