You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by hi...@apache.org on 2010/09/14 22:56:26 UTC

svn commit: r997093 - in /harmony/enhanced/java/trunk: debian/ drlvm/vm/port/include/ drlvm/vm/port/src/misc/linux/ drlvm/vm/port/src/misc/win/ drlvm/vm/vmcore/src/init/ drlvm/vm/vmcore/src/jvmti/ drlvm/vm/vmcore/src/kernel_classes/native/

Author: hindessm
Date: Tue Sep 14 20:56:26 2010
New Revision: 997093

URL: http://svn.apache.org/viewvc?rev=997093&view=rev
Log:
Fix -Dhy.local.zlib=true build so that it uses the versioned libz.so.1
rather than the unversioned libz.so.  The latter is only available if
the development package for zlib is installed which it typically isn't.
I've also changed the windows dso "decorate" function to handle versions
in a way that might work if an ifdef for the windows, "zlib", rather
than "z" was added.

Modified:
    harmony/enhanced/java/trunk/debian/control
    harmony/enhanced/java/trunk/drlvm/vm/port/include/port_dso.h
    harmony/enhanced/java/trunk/drlvm/vm/port/src/misc/linux/dso.c
    harmony/enhanced/java/trunk/drlvm/vm/port/src/misc/win/dso.c
    harmony/enhanced/java/trunk/drlvm/vm/vmcore/src/init/vm_properties.cpp
    harmony/enhanced/java/trunk/drlvm/vm/vmcore/src/jvmti/jvmti.cpp
    harmony/enhanced/java/trunk/drlvm/vm/vmcore/src/kernel_classes/native/java_lang_VMExecutionEngine.cpp

Modified: harmony/enhanced/java/trunk/debian/control
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/debian/control?rev=997093&r1=997092&r2=997093&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/debian/control (original)
+++ harmony/enhanced/java/trunk/debian/control Tue Sep 14 20:56:26 2010
@@ -7,7 +7,7 @@ Standards-Version: 3.7.2
 
 Package: harmony-5.0-drlvm
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, zlib1g-dev
+Depends: ${shlibs:Depends}, ${misc:Depends}
 Provides: harmony-5.0-vm
 Suggests: harmony-5.0-jre
 Description: Apache Harmony DRL Virtual Machine
@@ -21,7 +21,7 @@ Description: Apache Harmony Java Class L
 
 Package: harmony-5.0-jre
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, libstdc++6, zlib1g-dev, libxext6, libxmu6, harmony-5.0-vm, harmony-5.0-classlib
+Depends: ${shlibs:Depends}, ${misc:Depends}, libstdc++6, libxext6, libxmu6, harmony-5.0-vm, harmony-5.0-classlib
 Provides: java-virtual-machine, java-runtime, java1-runtime, java2-runtime, java2-runtime-headless, java5-runtime-headless
 Description: Apache Harmony JRE
  <insert long description, indented with spaces>

Modified: harmony/enhanced/java/trunk/drlvm/vm/port/include/port_dso.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/drlvm/vm/port/include/port_dso.h?rev=997093&r1=997092&r2=997093&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/drlvm/vm/port/include/port_dso.h (original)
+++ harmony/enhanced/java/trunk/drlvm/vm/port/include/port_dso.h Tue Sep 14 20:56:26 2010
@@ -104,10 +104,12 @@ APR_DECLARE(apr_status_t) port_dso_searc
 /**
  * Decorates shared library name (.dll <-> lib*.so).
  * @param dl_name - the name of the shared library
+ * @param dl_ver   - the version number of the shared library or NULL
  * @param pool    - storage to allocate the returned handle
  * @return The platform-specific filename for the library.
  */
 APR_DECLARE(char *) port_dso_name_decorate(const char* dl_name,
+                                           const char* dl_ver,
                             apr_pool_t* pool);
 
 /** @} */

Modified: harmony/enhanced/java/trunk/drlvm/vm/port/src/misc/linux/dso.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/drlvm/vm/port/src/misc/linux/dso.c?rev=997093&r1=997092&r2=997093&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/drlvm/vm/port/src/misc/linux/dso.c (original)
+++ harmony/enhanced/java/trunk/drlvm/vm/port/src/misc/linux/dso.c Tue Sep 14 20:56:26 2010
@@ -63,10 +63,14 @@ APR_DECLARE(apr_status_t) port_dso_searc
 }
 
 APR_DECLARE(char *) port_dso_name_decorate(const char* dl_name,
-                            apr_pool_t* pool) {
-									
+                                           const char* dl_ver,
+                                           apr_pool_t* pool) {
 	if (!dl_name) {
 		return 0;
 	}
-	return apr_pstrcat(pool, "lib", dl_name, ".so", NULL);
+        if (dl_ver) {
+                return apr_pstrcat(pool, "lib", dl_name, ".so.", dl_ver, NULL);
+        } else {
+                return apr_pstrcat(pool, "lib", dl_name, ".so", NULL);
+        }
 }

Modified: harmony/enhanced/java/trunk/drlvm/vm/port/src/misc/win/dso.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/drlvm/vm/port/src/misc/win/dso.c?rev=997093&r1=997092&r2=997093&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/drlvm/vm/port/src/misc/win/dso.c (original)
+++ harmony/enhanced/java/trunk/drlvm/vm/port/src/misc/win/dso.c Tue Sep 14 20:56:26 2010
@@ -92,10 +92,10 @@ APR_DECLARE(apr_status_t) port_dso_searc
 }
 
 APR_DECLARE(char *) port_dso_name_decorate(const char* dl_name,
-                            apr_pool_t* pool) {
-									
+                                           const char* dl_ver,
+                                           apr_pool_t* pool) {
 	if (!dl_name) {
 		return 0;
 	}
-	return apr_pstrcat(pool, dl_name, ".dll", NULL);
+	return apr_pstrcat(pool, dl_name, (dl_ver ? dl_ver : ""), ".dll", NULL);
 }

Modified: harmony/enhanced/java/trunk/drlvm/vm/vmcore/src/init/vm_properties.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/drlvm/vm/vmcore/src/init/vm_properties.cpp?rev=997093&r1=997092&r2=997093&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/drlvm/vm/vmcore/src/init/vm_properties.cpp (original)
+++ harmony/enhanced/java/trunk/drlvm/vm/vmcore/src/init/vm_properties.cpp Tue Sep 14 20:56:26 2010
@@ -49,18 +49,18 @@ static apr_pool_t *prop_pool;
 
 static const char *api_dll_files[] =
 {
-    "harmonyvm",
-    "hythr",
-    "hyprt",
+    "harmonyvm", NULL,
+    "hythr", NULL,
+    "hyprt", NULL,
 #if defined(HY_LOCAL_ZLIB)
-    "z",
+    "z", "1",
 #else
-    "hyzlib",
+    "hyzlib", NULL,
 #endif
-    "hynio",
-    "vmi",
-    "hyluni",
-    "hyarchive"
+    "hynio", NULL,
+    "vmi", NULL,
+    "hyluni", NULL,
+    "hyarchive", NULL
 };
 
 /**
@@ -74,11 +74,12 @@ static const char *compose_full_files_pa
                                                 bool is_dll)
 {
     const char* full_name = "";
-    for (int iii = 0; iii < names_number; iii++)
+    for (int iii = 0; iii < names_number; )
     {
-        const char *tmp = dll_names[iii];
+        const char *tmp = dll_names[iii++];
+        const char *ver = dll_names[iii++];
         if (is_dll) {
-            tmp = port_dso_name_decorate(tmp, prop_pool);
+            tmp = port_dso_name_decorate(tmp, ver, prop_pool);
         }
         
         /*
@@ -92,9 +93,8 @@ static const char *compose_full_files_pa
         }
         
         full_name = apr_pstrcat(prop_pool, full_name, tmp, 
-            (iii + 1 < names_number) ? PORT_PATH_SEPARATOR_STR : "", NULL);
+            (iii < names_number) ? PORT_PATH_SEPARATOR_STR : "", NULL);
     }
-
     return full_name;
 }
 

Modified: harmony/enhanced/java/trunk/drlvm/vm/vmcore/src/jvmti/jvmti.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/drlvm/vm/vmcore/src/jvmti/jvmti.cpp?rev=997093&r1=997092&r2=997093&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/drlvm/vm/vmcore/src/jvmti/jvmti.cpp (original)
+++ harmony/enhanced/java/trunk/drlvm/vm/vmcore/src/jvmti/jvmti.cpp Tue Sep 14 20:56:26 2010
@@ -520,7 +520,7 @@ static void generate_platform_lib_name(a
     char *vm_libs = vm_properties_get_value("vm.boot.library.path", JAVA_PROPERTIES);
     assert(vm_libs);
     char *path1 = apr_pstrdup(pool, vm_libs);
-    char *path2 = port_dso_name_decorate(lib_name, pool);
+    char *path2 = port_dso_name_decorate(lib_name, NULL, pool);
     path1 = port_filepath_merge(path1, path2, pool);
     *p_path1 = path1;
     *p_path2 = path2;

Modified: harmony/enhanced/java/trunk/drlvm/vm/vmcore/src/kernel_classes/native/java_lang_VMExecutionEngine.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/drlvm/vm/vmcore/src/kernel_classes/native/java_lang_VMExecutionEngine.cpp?rev=997093&r1=997092&r2=997093&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/drlvm/vm/vmcore/src/kernel_classes/native/java_lang_VMExecutionEngine.cpp (original)
+++ harmony/enhanced/java/trunk/drlvm/vm/vmcore/src/kernel_classes/native/java_lang_VMExecutionEngine.cpp Tue Sep 14 20:56:26 2010
@@ -227,7 +227,7 @@ JNIEXPORT jstring JNICALL Java_java_lang
         const char* libname = GetStringUTFChars(jenv, jlibname, NULL);
         apr_pool_t *pp;
         if (APR_SUCCESS == apr_pool_create(&pp, 0)) {
-            res = NewStringUTF(jenv, port_dso_name_decorate(libname, pp));
+            res = NewStringUTF(jenv, port_dso_name_decorate(libname, NULL, pp));
             apr_pool_destroy(pp);
         }
         ReleaseStringUTFChars(jenv, jlibname, libname);