View Single Post
  #6   (View Single Post)  
Old 1st August 2008
incripshin incripshin is offline
New User
 
Join Date: Jul 2008
Posts: 5
Default resolved, kind of

So it was an issue with dladdr(), bug compatible with Solaris by the looks of it. Changing one line of the source code fixes it. The maintainer probably won't commit the change because of a ports soft-lock for 4.4, so in the meantime, you can either apply it yourself or make some shell scripts to do the work for you:

Code:
--- patch-jdk_src_solaris_bin_java_md_c.old	2008-07-31 20:34:09.000000000 -0500
+++ patch-jdk_src_solaris_bin_java_md_c	2008-07-31 20:34:19.000000000 -0500
@@ -41,15 +41,6 @@
        /*
         * On linux, if a binary is running as sgid or suid, glibc sets
         * LD_LIBRARY_PATH to the empty string for security purposes.  (In
-@@ -841,7 +851,7 @@ static const char*
- SetExecname(char **argv)
- {
-     char* exec_path = NULL;
--#if defined(__solaris__)
-+#if defined(__solaris__) || defined(_ALLBSD_SOURCE)
-     {
-         Dl_info dlinfo;
-         int (*fptr)();
 @@ -1209,6 +1219,20 @@ UnsetEnv(char *name)
      return(borrowed_unsetenv(name));
  }
Alternative scripts to make at /usr/local/bin/java, /usr/local/bin/javac, etc. (notice the backticks):
Code:
#!/bin/sh
exec /usr/local/jdk-1.7.0/bin/`basename $0` "$@"
Reply With Quote