LD_LIBRARYN32_PATH - SGI

This is a discussion on LD_LIBRARYN32_PATH - SGI ; hello, how to make a LD_LIBRARYN32_PATH variable set permanent so that this variable has not to be set in every script ? I hsve many binaries compiled by me in /usr/local/lib rld cannot find libgcc_s.so.1 which is in /usr/local/lib so ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: LD_LIBRARYN32_PATH

  1. LD_LIBRARYN32_PATH


    hello,
    how to make a LD_LIBRARYN32_PATH variable set permanent
    so that this variable has not to be set in every script ?
    I hsve many binaries compiled by me in /usr/local/lib
    rld cannot find libgcc_s.so.1 which is in /usr/local/lib
    so everytime I have to set LD_LIBRARYN32_PATH=/usr/local/lib

    any way to make it a system default?
    thanks

    Rick


  2. Re: LD_LIBRARYN32_PATH

    Rick wrote:
    >
    > hello,
    > how to make a LD_LIBRARYN32_PATH variable set permanent
    > so that this variable has not to be set in every script ?
    > I hsve many binaries compiled by me in /usr/local/lib
    > rld cannot find libgcc_s.so.1 which is in /usr/local/lib
    > so everytime I have to set LD_LIBRARYN32_PATH=/usr/local/lib
    >
    > any way to make it a system default?
    > thanks
    >
    > Rick
    >


    i would ditch the garbage compiler of course.

    peruse the ld man page for starters...

    hint: -rpath

    or compile all static.

    cheers.

  3. Re: LD_LIBRARYN32_PATH

    In article ,
    Rick wrote:
    :how to make a LD_LIBRARYN32_PATH variable set permanent
    :so that this variable has not to be set in every script ?
    :I hsve many binaries compiled by me in /usr/local/lib
    :rld cannot find libgcc_s.so.1 which is in /usr/local/lib
    :so everytime I have to set LD_LIBRARYN32_PATH=/usr/local/lib

    :any way to make it a system default?

    No. Environment variables are inherited from the parent
    process unless the process creates more environment variables
    or the parent process sanitized the environement. Unfortunately
    for your purposes, important processes *do* sanitize the
    environment and don't look in any one fixed place for additional
    variables to set.

    The closest you can get is to use the normal shell mechanisms
    to set the variable at the time the shell is started; see
    the man pages for each shell. Also, you could set values
    in /etc/default/login .

    If you were to look in the system include files, you would
    find a path set there, and you might be tempted to just modify
    that path. That won't work, as the system include files
    are used at compile time, and the system processes that
    are important for this matter are already compiled.
    --
    Warhol's Law: every Usenet user is entitled to his or her very own
    fifteen minutes of flame -- The Squoire


  4. Re: LD_LIBRARYN32_PATH

    In article ,
    Walter Roberson wrote:
    >In article ,
    >Rick wrote:
    >:how to make a LD_LIBRARYN32_PATH variable set permanent
    >:so that this variable has not to be set in every script ?
    >:I hsve many binaries compiled by me in /usr/local/lib
    >:rld cannot find libgcc_s.so.1 which is in /usr/local/lib
    >:so everytime I have to set LD_LIBRARYN32_PATH=/usr/local/lib
    >
    >:any way to make it a system default?
    >
    >No. Environment variables are inherited from the parent
    >process unless the process creates more environment variables
    >or the parent process sanitized the environement. Unfortunately
    >for your purposes, important processes *do* sanitize the
    >environment and don't look in any one fixed place for additional
    >variables to set.


    Walter is correct. However if you are willing to re-create the
    various executables and use the -rpath flag you can effectively
    add /usr/local/lib to the LD_LIBRARY*_PATH the executable(s)
    use (though LD_LIBRARY*_PATH isn't used literally with -rpath
    -- see "man rld" and "man dso" and the dynamic section DT_RPATH
    variable as used in the MIPS abi).


    Add
    -Wl,-rpath,/usr/local/lib
    to the link line of each executable.

    Hope this helps.
    David B. Anderson davea at sgi dot com http://reality.sgiweb.org/davea


  5. Re: LD_LIBRARYN32_PATH


    thanks for the hints

    Rick

    In article , David Anderson wrote:
    > In article ,
    > Walter Roberson wrote:
    >>In article ,
    >>Rick wrote:
    >>:how to make a LD_LIBRARYN32_PATH variable set permanent
    >>:so that this variable has not to be set in every script ?
    >>:I hsve many binaries compiled by me in /usr/local/lib
    >>:rld cannot find libgcc_s.so.1 which is in /usr/local/lib
    >>:so everytime I have to set LD_LIBRARYN32_PATH=/usr/local/lib
    >>
    >>:any way to make it a system default?
    >>
    >>No. Environment variables are inherited from the parent
    >>process unless the process creates more environment variables
    >>or the parent process sanitized the environement. Unfortunately
    >>for your purposes, important processes *do* sanitize the
    >>environment and don't look in any one fixed place for additional
    >>variables to set.

    >
    > Walter is correct. However if you are willing to re-create the
    > various executables and use the -rpath flag you can effectively
    > add /usr/local/lib to the LD_LIBRARY*_PATH the executable(s)
    > use (though LD_LIBRARY*_PATH isn't used literally with -rpath
    > -- see "man rld" and "man dso" and the dynamic section DT_RPATH
    > variable as used in the MIPS abi).
    >
    >
    > Add
    > -Wl,-rpath,/usr/local/lib
    > to the link line of each executable.
    >
    > Hope this helps.
    > David B. Anderson davea at sgi dot com http://reality.sgiweb.org/davea
    >


  6. Re: LD_LIBRARYN32_PATH


    for many reason I found comfortable doing this:

    ln -s /usr/local/lib/libgcc_s.so.1 /usr/lib32/libgcc_s.so.1

    I know it is not very nice but it works and I Don;t have
    problems anymore now...

    is that so ugly ?


    Rick

    In article , Rick wrote:
    >
    > hello,
    > how to make a LD_LIBRARYN32_PATH variable set permanent
    > so that this variable has not to be set in every script ?
    > I hsve many binaries compiled by me in /usr/local/lib
    > rld cannot find libgcc_s.so.1 which is in /usr/local/lib
    > so everytime I have to set LD_LIBRARYN32_PATH=/usr/local/lib
    >
    > any way to make it a system default?
    > thanks
    >
    > Rick
    >


+ Reply to Thread