Index: /issm/trunk-jpl/packagers/linux/package-issm-linux-binaries-matlab.sh
===================================================================
--- /issm/trunk-jpl/packagers/linux/package-issm-linux-binaries-matlab.sh	(revision 27063)
+++ /issm/trunk-jpl/packagers/linux/package-issm-linux-binaries-matlab.sh	(revision 27064)
@@ -122,5 +122,5 @@
 
 	# Check that MATLAB did not exit in error
-	matlabExitedInError=`grep -E "Activation cannot proceed|Error in matlab_run|Illegal use of reserved keyword" matlab.log | wc -l`
+	matlabExitedInError=`grep -E "Activation cannot proceed|Error in matlab_run|Illegal use of reserved keyword|Invalid MEX-file" matlab.log | wc -l`
 
 	if [ ${matlabExitedInError} -ne 0 ]; then
@@ -136,5 +136,5 @@
 
 	# Check that all tests passed
-	numTestsFailed=`cat matlab.log | grep -c -e "FAILED|ERROR"`
+	numTestsFailed=`grep -E "FAILED|ERROR" matlab.log | wc -l`
 
 	if [ ${numTestsFailed} -ne 0 ]; then
Index: /issm/trunk-jpl/packagers/linux/package-issm-linux-binaries-python-2.sh
===================================================================
--- /issm/trunk-jpl/packagers/linux/package-issm-linux-binaries-python-2.sh	(revision 27063)
+++ /issm/trunk-jpl/packagers/linux/package-issm-linux-binaries-python-2.sh	(revision 27064)
@@ -136,5 +136,5 @@
 
 	# Check that all tests passed
-	numTestsFailed=`cat python.log | grep -c -e "FAILED|ERROR"`
+	numTestsFailed=`grep -E "FAILED|ERROR" python.log | wc -l`
 
 	if [[ ${numTestsFailed} -ne 0 ]]; then
Index: /issm/trunk-jpl/packagers/linux/package-issm-linux-binaries-python-3.sh
===================================================================
--- /issm/trunk-jpl/packagers/linux/package-issm-linux-binaries-python-3.sh	(revision 27063)
+++ /issm/trunk-jpl/packagers/linux/package-issm-linux-binaries-python-3.sh	(revision 27064)
@@ -139,5 +139,5 @@
 
 	# Check that all tests passed
-	numTestsFailed=`cat python.log | grep -c -e "FAILED|ERROR"`
+	numTestsFailed=`grep -E "FAILED|ERROR" python.log | wc -l`
 
 	if [[ ${numTestsFailed} -ne 0 ]]; then
Index: /issm/trunk-jpl/packagers/mac/package-issm-mac-binaries-matlab.sh
===================================================================
--- /issm/trunk-jpl/packagers/mac/package-issm-mac-binaries-matlab.sh	(revision 27063)
+++ /issm/trunk-jpl/packagers/mac/package-issm-mac-binaries-matlab.sh	(revision 27064)
@@ -150,5 +150,5 @@
 
 	# Check that all tests passed
-	numTestsFailed=`cat matlab.log | grep -c -e "FAILED|ERROR"`
+	numTestsFailed=`grep -E "FAILED|ERROR" matlab.log | wc -l`
 
 	if [ ${numTestsFailed} -ne 0 ]; then
Index: /issm/trunk-jpl/packagers/mac/package-issm-mac-binaries-python-2.sh
===================================================================
--- /issm/trunk-jpl/packagers/mac/package-issm-mac-binaries-python-2.sh	(revision 27063)
+++ /issm/trunk-jpl/packagers/mac/package-issm-mac-binaries-python-2.sh	(revision 27064)
@@ -148,5 +148,5 @@
 
 	# Check that all tests passed
-	numTestsFailed=`cat python.log | grep -c -e "FAILED|ERROR"`
+	numTestsFailed=`grep -E "FAILED|ERROR" python.log | wc -l`
 
 	if [ ${numTestsFailed} -ne 0 ]; then
Index: /issm/trunk-jpl/packagers/mac/package-issm-mac-binaries-python-3.sh
===================================================================
--- /issm/trunk-jpl/packagers/mac/package-issm-mac-binaries-python-3.sh	(revision 27063)
+++ /issm/trunk-jpl/packagers/mac/package-issm-mac-binaries-python-3.sh	(revision 27064)
@@ -151,5 +151,5 @@
 
 	# Check that all tests passed
-	numTestsFailed=`cat python.log | grep -c -e "FAILED|ERROR"`
+	numTestsFailed=`grep -E "FAILED|ERROR" python.log | wc -l`
 
 	if [ ${numTestsFailed} -ne 0 ]; then
Index: /issm/trunk-jpl/src/wrappers/matlab/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/wrappers/matlab/Makefile.am	(revision 27063)
+++ /issm/trunk-jpl/src/wrappers/matlab/Makefile.am	(revision 27064)
@@ -122,5 +122,5 @@
 AM_LDFLAGS += -Wl,-rpath,'@rpath'
 else
-AM_LDFLAGS += -Wl,-static -Wl,--disable-new-dtags -Wl,-rpath,'$$ORIGIN'
+AM_LDFLAGS += -Wl,-static -Wl,-lbacktrace -Wl,--disable-new-dtags -Wl,-rpath,'$$ORIGIN'
 endif
 endif
Index: /issm/trunk-jpl/src/wrappers/python/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/wrappers/python/Makefile.am	(revision 27063)
+++ /issm/trunk-jpl/src/wrappers/python/Makefile.am	(revision 27064)
@@ -76,5 +76,5 @@
 AM_LDFLAGS += -Wl,-rpath,'@rpath'
 else
-AM_LDFLAGS += -Wl,-static -Wl,--disable-new-dtags -Wl,-rpath,'$$ORIGIN'
+AM_LDFLAGS += -Wl,-static -Wl,-lbacktrace -Wl,--disable-new-dtags -Wl,-rpath,'$$ORIGIN'
 endif
 endif
