Ticket #12405: 12405_lib64.patch

File 12405_lib64.patch, 1.3 KB (added by jdemeyer, 10 years ago)
  • spkg/bin/sage-env

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1330938346 -3600
    # Node ID 7ab6dfb9c8a3c2e5a37f6208223918a21f3db6bf
    # Parent  ac4a19db06658b816221059efbf8d9c2a8c40a37
    Add $SAGE_LOCAL/lib64 and $SAGE_LOCAL/lib32 to LD_LIBRARY_PATH in sage-env
    
    diff --git a/spkg/bin/sage-env b/spkg/bin/sage-env
    a b  
    344344    mkdir -p "$MPLCONFIGDIR"
    345345fi
    346346
    347 LD_LIBRARY_PATH="$SAGE_ROOT/local/lib/:$LD_LIBRARY_PATH" && export LD_LIBRARY_PATH
    348 # The following is needed for openmpi:
    349 LD_LIBRARY_PATH="$SAGE_ROOT/local/lib/openmpi:$LD_LIBRARY_PATH" && export LD_LIBRARY_PATH
    350 # The following is needed for R (in case the Sage install is moved):
    351 LD_LIBRARY_PATH="$SAGE_ROOT/local/lib/R/lib:$LD_LIBRARY_PATH" && export LD_LIBRARY_PATH 
     347# Add some directories to $LD_LIBRARY_PATH:
     348# * lib/openmpi is needed for openmpi.
     349# * lib/R/lib is needed for R in case the Sage install is moved.
     350# * lib32 and lib64 are needed for GCC, see #12405.
     351for d in lib/openmpi lib/R/lib lib32 lib64 lib; do
     352    libdir="$SAGE_LOCAL/$d"
     353    # Add only existing directories
     354    if [ -d "$libdir" ]; then
     355        LD_LIBRARY_PATH="$libdir:$LD_LIBRARY_PATH"
     356    fi
     357done
     358export LD_LIBRARY_PATH
     359
    352360# The following is needed for OS X (especially for the
    353361# Singular install).
    354362if [ `uname` = "Darwin" ]; then