This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Test failure in libgcj on mainline


> Running /home/aph/gcc/gcc/libjava/testsuite/libjava.cni/cni.exp ...
> ERROR: tcl error sourcing /home/aph/gcc/gcc/libjava/testsuite/libjava.cni/cni.exp.
> ERROR: can't unset "env(SHLIB_PATH)": no such element in array

Sorry, this is caused by my recent LD_LIBRARY_PATH.  This didn't appear
in my testing.  There seems to be some difference in behavior of unsetenv
from one system to another.

The enclosed patch should fix the problem.  Tested on i686-pc-linux-gnu.
I will install as obvious.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2004-11-26  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	* lib/target-libpath.exp (restore_ld_library_path_env_vars):
	Check existence of ld library path variables before unsetting.

Index: lib/target-libpath.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/target-libpath.exp,v
retrieving revision 1.2
diff -u -3 -p -r1.2 target-libpath.exp
--- lib/target-libpath.exp	25 Nov 2004 04:27:13 -0000	1.2
+++ lib/target-libpath.exp	27 Nov 2004 04:38:08 -0000
@@ -196,42 +196,42 @@ proc restore_ld_library_path_env_vars { 
 
   if { $orig_ld_library_path_saved } {
     setenv LD_LIBRARY_PATH "$orig_ld_library_path"
-  } else {
+  } elseif [info exists env(LD_LIBRARY_PATH)] {
     unsetenv LD_LIBRARY_PATH
   }
   if { $orig_ld_run_path_saved } {
     setenv LD_RUN_PATH "$orig_ld_run_path"
-  } else {
+  } elseif [info exists env(LD_RUN_PATH)] {
     unsetenv LD_RUN_PATH
   }
   if { $orig_shlib_path_saved } {
     setenv SHLIB_PATH "$orig_shlib_path"
-  } else {
+  } elseif [info exists env(SHLIB_PATH)] {
     unsetenv SHLIB_PATH
   }
   if { $orig_ld_libraryn32_path_saved } {
     setenv LD_LIBRARYN32_PATH "$orig_ld_libraryn32_path"
-  } else {
+  } elseif [info exists env(LD_LIBRARYN32_PATH)] {
     unsetenv LD_LIBRARYN32_PATH
   }
   if { $orig_ld_library64_path_saved } {
     setenv LD_LIBRARY64_PATH "$orig_ld_library64_path"
-  } else {
+  } elseif [info exists env(LD_LIBRARY64_PATH)] {
     unsetenv LD_LIBRARY64_PATH
   }
   if { $orig_ld_library_path_32_saved } {
     setenv LD_LIBRARY_PATH_32 "$orig_ld_library_path_32"
-  } else {
+  } elseif [info exists env(LD_LIBRARY_PATH_32)] {
     unsetenv LD_LIBRARY_PATH_32
   }
   if { $orig_ld_library_path_64_saved } {
     setenv LD_LIBRARY_PATH_64 "$orig_ld_library_path_64"
-  } else {
+  } elseif [info exists env(LD_LIBRARY_PATH_64)] {
     unsetenv LD_LIBRARY_PATH_64
   }
   if { $orig_dyld_library_path_saved } {
     setenv DYLD_LIBRARY_PATH "$orig_dyld_library_path"
-  } else {
+  } elseif [info exists env(DYLD_LIBRARY_PATH)] {
     unsetenv DYLD_LIBRARY_PATH
   }
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]