Linked libraries - Redhat

This is a discussion on Linked libraries - Redhat ; This may not be particularly Redhat specific, but here I go.... I've got two servers with (almost) identical software. However, on one of them I recently tried to tweak some /lib-libraries. This monday I experienced troubles with a particular executable ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Linked libraries

  1. Linked libraries

    This may not be particularly Redhat specific, but here I go....

    I've got two servers with (almost) identical software.

    However, on one of them I recently tried to tweak some /lib-libraries.
    This monday I experienced troubles with a particular executable on one
    of the server (the server, where I tweaked previously) resulting in a
    "segmentation fault"

    I've tried to debug with ldd, and obtain different results at server A
    (where the executable runs succesfully) and server B (where I
    experience the segmentation fault). I.e.:

    A:
    $ ldd /path/to/binary/executable
    libpthread.so.0 => /lib/i686/libpthread.so.0 (0x40027000)
    libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3
    (0x4003c000)
    libm.so.6 => /lib/i686/libm.so.6 (0x4007e000)
    libc.so.6 => /lib/i686/libc.so.6 (0x400a1000)
    /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

    B
    $ ldd /path/to/binary/executable
    libpthread.so.0 => /lib/tls/libpthread.so.0 (0x008ea000)
    libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3
    (0x006f1000)
    libm.so.6 => /lib/tls/libm.so.6 (0x007e4000)
    libc.so.6 => /lib/tls/libc.so.6 (0x00111000)
    /lib/ld-linux.so.2 (0x00693000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0095a000)

    The differences in the first 4 occurences are probably due to the
    different operating systems (RH72 vs. RHEL4). But I am curious about
    the last 1-2 lines, since the "tweak" I made earlier (due to other
    problems) was concerning libgcc_s.so.1 exactly.

    I'm pretty new to this stuff about linked libraries - so does any of
    you have any clues on how I can get rid of this segmentation fault?

    For instance, is there some way I can get back to the starting point
    BEFORE the tweak. For information, the tweak was about changing a
    file /path/to/some/software/libgcc_s.so.1 into a symbolic link
    pointing to /lib/libgcc_s.so.1. I've tried to undo the tweak by
    removing the sym. link and replacing it with the initial file, but it
    still gives a segmentation fault.

    I hope any of you have some suggestions on how to get around the.

    Best regards,
    Kenneth

  2. Re: Linked libraries

    On Mon, 27 Oct 2008 07:28:02 -0700, Kenneth Brun Nielsen typed this
    message:

    > This may not be particularly Redhat specific, but here I go....
    >
    > I've got two servers with (almost) identical software.
    >
    > However, on one of them I recently tried to tweak some /lib-libraries.
    > This monday I experienced troubles with a particular executable on one
    > of the server (the server, where I tweaked previously) resulting in a
    > "segmentation fault"
    >
    > I've tried to debug with ldd, and obtain different results at server A
    > (where the executable runs succesfully) and server B (where I experience
    > the segmentation fault). I.e.:
    >
    > A:
    > $ ldd /path/to/binary/executable
    > libpthread.so.0 => /lib/i686/libpthread.so.0 (0x40027000)
    > libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3
    > (0x4003c000)
    > libm.so.6 => /lib/i686/libm.so.6 (0x4007e000) libc.so.6 =>
    > /lib/i686/libc.so.6 (0x400a1000) /lib/ld-linux.so.2 =>
    > /lib/ld-linux.so.2 (0x40000000)
    >
    > B
    > $ ldd /path/to/binary/executable
    > libpthread.so.0 => /lib/tls/libpthread.so.0 (0x008ea000)
    > libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3
    > (0x006f1000)
    > libm.so.6 => /lib/tls/libm.so.6 (0x007e4000) libc.so.6 =>
    > /lib/tls/libc.so.6 (0x00111000) /lib/ld-linux.so.2 (0x00693000)
    > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0095a000)
    >
    > The differences in the first 4 occurences are probably due to the
    > different operating systems (RH72 vs. RHEL4). But I am curious about the
    > last 1-2 lines, since the "tweak" I made earlier (due to other problems)
    > was concerning libgcc_s.so.1 exactly.
    >
    > I'm pretty new to this stuff about linked libraries - so does any of you
    > have any clues on how I can get rid of this segmentation fault?
    >
    > For instance, is there some way I can get back to the starting point
    > BEFORE the tweak. For information, the tweak was about changing a file
    > /path/to/some/software/libgcc_s.so.1 into a symbolic link pointing to
    > /lib/libgcc_s.so.1. I've tried to undo the tweak by removing the sym.
    > link and replacing it with the initial file, but it still gives a
    > segmentation fault.
    >
    > I hope any of you have some suggestions on how to get around the.
    >
    > Best regards,
    > Kenneth


    Did you compile /path/to/binary/executable using the /lib/tls/libm.so.6
    or something?

    Looks to me like the problem is /lib/tls/libm.so.6 which points to
    libgcc_s.so.1.

  3. Re: Linked libraries


    "noi ance" skrev i en meddelelse
    news:xPpNk.3400$hc1.668@flpi150.ffdc.sbc.com...


    > Did you compile /path/to/binary/executable using the /lib/tls/libm.so.6
    > or something?


    No. The executable is not compiled locally.

    > Looks to me like the problem is /lib/tls/libm.so.6 which points to
    > libgcc_s.so.1.


    I actually found out that /usr/lib/libstdc++-libc6.2-2.so.3 points to
    libgcc_s.so.1 (/lib/tls/libm.so.6 does not).

    Any suggestions for a fix - do I really need to reinstall RHEL?

    Thanks for your answer.

    /Kenneth



  4. Re: Linked libraries

    Kenneth Brun Nielsen schreef:
    > "noi ance" skrev i en meddelelse
    > news:xPpNk.3400$hc1.668@flpi150.ffdc.sbc.com...
    >
    >
    >> Did you compile /path/to/binary/executable using the /lib/tls/libm.so.6
    >> or something?

    >
    > No. The executable is not compiled locally.
    >
    >> Looks to me like the problem is /lib/tls/libm.so.6 which points to
    >> libgcc_s.so.1.

    >
    > I actually found out that /usr/lib/libstdc++-libc6.2-2.so.3 points to
    > libgcc_s.so.1 (/lib/tls/libm.so.6 does not).
    >
    > Any suggestions for a fix - do I really need to reinstall RHEL?
    >
    > Thanks for your answer.
    >
    > /Kenneth
    >
    >

    Kenneth,


    You could do a reinstall of the rpm:
    compat-libstdc++-296

    this is the rpm containing /usr/lib/libstdc++-libc6.2-2.so.3

    Kind regards,


    Jan Gerrit Kootstra

  5. Re: Linked libraries

    Kenneth Brun Nielsen wrote:
    > This may not be particularly Redhat specific, but here I go....
    >
    > I've got two servers with (almost) identical software.
    >
    > However, on one of them I recently tried to tweak some /lib-libraries.
    > This monday I experienced troubles with a particular executable on one
    > of the server (the server, where I tweaked previously) resulting in a
    > "segmentation fault"
    >
    > I've tried to debug with ldd, and obtain different results at server A
    > (where the executable runs succesfully) and server B (where I
    > experience the segmentation fault). I.e.:
    >
    > A:
    > $ ldd /path/to/binary/executable
    > libpthread.so.0 => /lib/i686/libpthread.so.0 (0x40027000)
    > libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3
    > (0x4003c000)
    > libm.so.6 => /lib/i686/libm.so.6 (0x4007e000)
    > libc.so.6 => /lib/i686/libc.so.6 (0x400a1000)
    > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
    >
    > B
    > $ ldd /path/to/binary/executable
    > libpthread.so.0 => /lib/tls/libpthread.so.0 (0x008ea000)
    > libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3
    > (0x006f1000)
    > libm.so.6 => /lib/tls/libm.so.6 (0x007e4000)
    > libc.so.6 => /lib/tls/libc.so.6 (0x00111000)
    > /lib/ld-linux.so.2 (0x00693000)
    > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0095a000)
    >
    > The differences in the first 4 occurences are probably due to the
    > different operating systems (RH72 vs. RHEL4). But I am curious about
    > the last 1-2 lines, since the "tweak" I made earlier (due to other
    > problems) was concerning libgcc_s.so.1 exactly.


    Well, I detect a *BIG* problem right there. RedHat 7.2, versus, RHEL 4? You're
    begging for pain. You need to get *OFF* RedHat 7.2, ASAP, it's unsupported and
    has been for years. Mucking around in the core system libraries is begging for
    additional pain. And your 'tweak' is not explained. What exactly did you do?
    Can you reverse the tweak and see if it works?

    If nothing, it's still possible to find ISO's and some limited updates for
    RedHat 7.3. At least update to that.


    > I'm pretty new to this stuff about linked libraries - so does any of
    > you have any clues on how I can get rid of this segmentation fault?
    >
    > For instance, is there some way I can get back to the starting point
    > BEFORE the tweak. For information, the tweak was about changing a
    > file /path/to/some/software/libgcc_s.so.1 into a symbolic link
    > pointing to /lib/libgcc_s.so.1. I've tried to undo the tweak by
    > removing the sym. link and replacing it with the initial file, but it
    > still gives a segmentation fault.
    >
    > I hope any of you have some suggestions on how to get around the.
    >
    > Best regards,
    > Kenneth


+ Reply to Thread