Omaha #4259 remove LD_PRELOAD usage

Change-Id: I978df385ae00bb4da280cb293d5b0d7f10467097

Former-commit-id: 29988362b0d24787c1b5910feb638fb8770e77d9
This commit is contained in:
Nate Jensen 2015-06-05 15:26:19 -05:00 committed by Gerrit Code Review
parent cb8e59c56f
commit ab85e7a600
11 changed files with 12 additions and 58 deletions

View file

@ -86,25 +86,9 @@
<exclude name="svcBackup/**" />
<exclude name="**/bin/setup.env" />
<exclude name="**/bin/linux-x86-32/**" />
<exclude name="**/bin/linux-x86-64/**" />
<exclude name="**/lib/lib_illusion/**" />
<exclude name="**/bin/linux-x86-64/**" />
</fileset>
</copy>
<!-- copy the correct 'libpython.so' based on architecture. -->
<if>
<available
file="${esb.directory}/lib/lib_illusion/${architecture}"
type="dir" />
<then>
<mkdir dir="${edex.root.directory}/lib/lib_illusion" />
<copy todir="${edex.root.directory}/lib/lib_illusion">
<fileset dir="${esb.directory}/lib/lib_illusion/${architecture}">
<include name="*.so" />
</fileset>
</copy>
</then>
</if>
</copy>
<!-- set executable permissions - start.sh. -->
<chmod file="${edex.root.directory}/bin/start.sh" perm="ugo+rx" />

View file

@ -92,9 +92,8 @@ export PATH=$PATH:$awips_home/GFESuite/bin:$awips_home/GFESuite/ServiceBackup/sc
export PATH=$PATH:$PROJECT/bin
export JAVA_HOME="${JAVA_INSTALL}"
export LD_LIBRARY_PATH=$EDEX_HOME/lib/lib_illusion:$EDEX_HOME/lib/native/linux32/awips1:${JAVA_INSTALL}/lib:${PYTHON_INSTALL}/lib:${PSQL_INSTALL}/lib:$PROJECT/sharedLib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$EDEX_HOME/lib/native/linux32/awips1:${JAVA_INSTALL}/lib:${PYTHON_INSTALL}/lib:${PSQL_INSTALL}/lib:$PROJECT/sharedLib:$LD_LIBRARY_PATH
export LD_PRELOAD="libpython.so"
export FXA_DATA=$EDEX_HOME/data/fxa
export ALLOW_ARCHIVE_DATA="false"

View file

@ -1,5 +0,0 @@
Deploy one of the two fake python libraries (libpython.so) depending on the
architecture; deploy-install is capable of determining which library
to deploy. The 32-bit libpython.so is installed with the 64-bit edex and the
64-bit libpython.so is installed with the 32-bit edex to eliminate all or
most of the LD_PRELOAD errors.

View file

@ -58,9 +58,8 @@ dir=$(dirname $path_to_script)
export AWIPS_INSTALL_DIR=${ALERTVIZ_INSTALL}
export LD_LIBRARY_PATH=${JAVA_INSTALL}/lib:${PYTHON_INSTALL}/lib:$LD_LIBRARY_PATH
export LD_PRELOAD=${PYTHON_INSTALL}/lib/libpython2.7.so
export PATH=${JAVA_INSTALL}/bin:${PYTHON_INSTALL}/bin:$PATH
export LD_LIBRARY_PATH=${JAVA_INSTALL}/lib:$LD_LIBRARY_PATH
export PATH=${JAVA_INSTALL}/bin:$PATH
export JAVA_HOME="${JAVA_INSTALL}/jre"
exitVal=1

View file

@ -72,7 +72,6 @@ deleteOldCaveDiskCaches &
ulimit -c unlimited >> /dev/null 2>&1
export LD_LIBRARY_PATH=${JAVA_INSTALL}/lib:${PYTHON_INSTALL}/lib:$LD_LIBRARY_PATH
export LD_PRELOAD=libpython.so
if [[ -z "$CALLED_EXTEND_LIB_PATH" ]]; then
extendLibraryPath
fi

View file

@ -111,7 +111,6 @@ function extendLibraryPath()
local CAVE_LIB_DIRECTORY="/awips2/cave/lib64"
fi
export LD_LIBRARY_PATH="${CAVE_LIB_DIRECTORY}/lib_illusion:$LD_LIBRARY_PATH"
if [ "${1}" = "-noX" ]; then
export LD_LIBRARY_PATH="${CAVE_LIB_DIRECTORY}/lib_mesa:$LD_LIBRARY_PATH"
fi

View file

@ -21,7 +21,6 @@ package com.raytheon.viz.gfe.dialogs;
import java.util.Date;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
@ -41,12 +40,12 @@ import com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo.GridType;
import com.raytheon.uf.viz.core.VizApp;
import com.raytheon.viz.gfe.GFEPreference;
import com.raytheon.viz.gfe.core.DataManager;
import com.raytheon.viz.gfe.core.DataManagerUIFactory;
import com.raytheon.viz.gfe.core.griddata.IGridData;
import com.raytheon.viz.gfe.core.msgs.IActivatedParmChangedListener;
import com.raytheon.viz.gfe.core.msgs.ISmartToolInventoryChanged;
import com.raytheon.viz.gfe.core.parm.Parm;
import com.raytheon.viz.gfe.smarttool.SmartToolMouseListener;
import com.raytheon.viz.gfe.smarttool.SmartUtil;
import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
/**
@ -57,10 +56,11 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Feb 18, 2007 njensen Initial creation.
* 05Aug2008 #1407 ebabin Dim delta button for wx/discrete types.
* 05Aug2008 #1407 ebabin Dim delta button for wx/discrete types.
* Oct 25, 2012 #1287 rferrel Code clean up part of non-blocking dialog.
* Oct 13, 2012 #1298 rferrel Changes for non-blocking SetDeltaDialog.
* Changes for non-blocking SetValueDialog.
* Jun 05, 2015 4259 njensen Removed LD_PRELOAD check
* </pre>
*
* @author njensen
@ -114,7 +114,7 @@ public class EditActionsDialog extends CaveJFACEDialog implements
title = "Edit Actions";
setShellStyle(SWT.DIALOG_TRIM | SWT.MODELESS | SWT.RESIZE);
dataManager = DataManager.getCurrentInstance();
dataManager = DataManagerUIFactory.getCurrentInstance();
parm = dataManager.getSpatialDisplayManager().getActivatedParm();
parmChanged = new IActivatedParmChangedListener() {
@ -237,11 +237,6 @@ public class EditActionsDialog extends CaveJFACEDialog implements
applyDialogFont(composite);
if (!SmartUtil.isLdPreloadSet()) {
String warning = "Environment variable LD_PRELOAD is not set. It should be set to the Python library (e.g. /usr/lib/libpython2.7.so) for smart tools to work correctly.";
MessageDialog.openWarning(shell, "Warning", warning);
}
return composite;
}

View file

@ -49,9 +49,10 @@ import com.raytheon.viz.gfe.ui.runtimeui.SelectionDlg;
* ------------ ---------- ----------- --------------------------
* Feb 21, 2008 njensen Initial creation
* Dec 1, 2009 1426 ryu Add time range warning
* Nov 15, 2012 1298 rferrel Changes for non-blocking prcedures.
* Nov 15, 2012 1298 rferrel Changes for non-blocking prcedures.
* Jun 25, 2013 16065 ryu Passing outerLevel to smart tool job.
* Dec 10, 2013 #2367 dgilling Use new SmartToolJobPool.
* Dec 10, 2013 2367 dgilling Use new SmartToolJobPool.
* Jun 05, 2015 4259 njensen Removed LD_PRELOAD check
*
* </pre>
*
@ -63,23 +64,6 @@ public class SmartUtil {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(SmartUtil.class);
/**
* Checks if LD_PRELOAD is set in the environment. If not, jep may have
* issues importing modules. (Note that this presumes LD_PRELOAD was set
* correctly to point at the python .so file).
*
* @return if LD_PRELOAD is set
*/
public static boolean isLdPreloadSet() {
String preload = System.getenv().get("LD_PRELOAD");
boolean set = false;
if (preload != null) {
set = true;
}
return set;
}
public static SmartToolRequest buildSmartToolRequest(DataManager dm,
PreviewInfo preview, boolean outerLevel) {
SmartToolRequest req = new SmartToolRequest();