Dongsheng Song wrote:
> It's a memory compute bug for small memory computers, e.g. 256MB.

Thanks for the report. Please try the attached diff which should address
the negative mem problem. However, I'm skeptical that 256M will be
enough real mem to build it. Make sure you have a lot of swap and expect
plenty of thrashing (i.e. excessive build times).

Also please don't use misc@ for ports and package questions. misc@ has
enough 'noise' on it. :-)

-Kurt
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/jdk/1.7/Makefile,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile
--- Makefile    19 Mar 2008 20:44:18 -0000      1.13
+++ Makefile    20 Mar 2008 13:27:26 -0000
@@ -43,6 +43,7 @@ BUILD_DEPENDS+=       :jdk-1.6.0.*:devel/jdk/1
 ALT_BOOTDIR=   ${LOCALBASE}/jdk-1.6.0
 .endif
 
+VMEM_WARNING=  Yes
 BUILD_DEPENDS+=        ::devel/apache-ant \
                ::archivers/zip \
                ::archivers/unzip \
Index: patches/patch-corba_make_common_shared_Platform_gmk
===================================================================
RCS file: 
/cvs/ports/devel/jdk/1.7/patches/patch-corba_make_common_shared_Platform_gmk,v
retrieving revision 1.1
diff -u -p -r1.1 patch-corba_make_common_shared_Platform_gmk
--- patches/patch-corba_make_common_shared_Platform_gmk 19 Mar 2008 18:05:43 
-0000      1.1
+++ patches/patch-corba_make_common_shared_Platform_gmk 20 Mar 2008 13:27:26 
-0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-corba_make_common_shared_Platform_gmk,v 1.1 2008/03/19 
18:05:43 kurt Exp $
---- corba/make/common/shared/Platform.gmk.orig Thu Nov  8 12:00:14 2007
-+++ corba/make/common/shared/Platform.gmk      Thu Nov  8 12:04:28 2007
+--- corba/make/common/shared/Platform.gmk.orig Sat Dec  1 00:00:00 2007
++++ corba/make/common/shared/Platform.gmk      Thu Mar 20 09:05:23 2008
 @@ -262,6 +262,73 @@ ifeq ($(SYSTEM_UNAME), Linux)
    MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e '[EMAIL PROTECTED] \ 
*@ @g' | cut -d' ' -f2)
  endif
@@ -75,23 +75,22 @@ $OpenBSD: patch-corba_make_common_shared
  # Windows with and without CYGWIN will be slightly different
  ifeq ($(SYSTEM_UNAME), Windows_NT)
    PLATFORM = windows
-@@ -372,8 +439,8 @@ endif
- # Machines with 512Mb or less of real memory are considered low memory
+@@ -373,7 +440,7 @@ endif
  #    build machines and adjustments will be made to prevent excessing
  #    system swapping during the build.
--#    If we don't know, assume 512. Subtract 128 from MB for VM MAX.
+ #    If we don't know, assume 512. Subtract 128 from MB for VM MAX.
 -#    Don't set VM max over 1024-128=896.
-+#    If we don't know, assume 512. Subtract 736 from MB for VM MAX.
-+#    Don't set VM max over 1024-288=736.
++#    Don't set VM max over 864-128=736.
  ifneq ($(MB_OF_MEMORY),)
    LOW_MEMORY_MACHINE := $(shell \
      if [ $(MB_OF_MEMORY) -le 512 ] ; then \
-@@ -383,9 +450,9 @@ ifneq ($(MB_OF_MEMORY),)
+@@ -382,10 +449,10 @@ ifneq ($(MB_OF_MEMORY),)
+       echo "false"; \
      fi)
    MAX_VM_MEMORY := $(shell \
-     if [ $(MB_OF_MEMORY) -le 1024 ] ; then \
--      expr $(MB_OF_MEMORY) '-' 128 ; \
-+      expr $(MB_OF_MEMORY) '-' 288 ; \
+-    if [ $(MB_OF_MEMORY) -le 1024 ] ; then \
++    if [ $(MB_OF_MEMORY) -le 864 ] ; then \
+       expr $(MB_OF_MEMORY) '-' 128 ; \
      else \
 -      echo "896"; \
 +      echo "736"; \
Index: patches/patch-jdk_make_common_shared_Platform_gmk
===================================================================
RCS file: 
/cvs/ports/devel/jdk/1.7/patches/patch-jdk_make_common_shared_Platform_gmk,v
retrieving revision 1.1
diff -u -p -r1.1 patch-jdk_make_common_shared_Platform_gmk
--- patches/patch-jdk_make_common_shared_Platform_gmk   19 Mar 2008 18:05:45 
-0000      1.1
+++ patches/patch-jdk_make_common_shared_Platform_gmk   20 Mar 2008 13:27:26 
-0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-jdk_make_common_shared_Platform_gmk,v 1.1 2008/03/19 18:05:45 
kurt Exp $
---- jdk/make/common/shared/Platform.gmk.orig   Tue Oct 30 05:04:22 2007
-+++ jdk/make/common/shared/Platform.gmk        Wed Nov  7 14:51:12 2007
+--- jdk/make/common/shared/Platform.gmk.orig   Sat Dec  1 00:00:00 2007
++++ jdk/make/common/shared/Platform.gmk        Thu Mar 20 09:06:34 2008
 @@ -275,6 +275,73 @@ ifeq ($(SYSTEM_UNAME), Linux)
    MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e '[EMAIL PROTECTED] \ 
*@ @g' | cut -d' ' -f2)
  endif
@@ -75,23 +75,22 @@ $OpenBSD: patch-jdk_make_common_shared_P
  # Windows with and without CYGWIN will be slightly different
  ifeq ($(SYSTEM_UNAME), Windows_NT)
    PLATFORM = windows
-@@ -389,8 +456,8 @@ endif
- # Machines with 512Mb or less of real memory are considered low memory
+@@ -390,7 +457,7 @@ endif
  #    build machines and adjustments will be made to prevent excessing
  #    system swapping during the build.
--#    If we don't know, assume 512. Subtract 128 from MB for VM MAX.
+ #    If we don't know, assume 512. Subtract 128 from MB for VM MAX.
 -#    Don't set VM max over 1024-128=896.
-+#    If we don't know, assume 512. Subtract 288 from MB for VM MAX.
-+#    Don't set VM max over 1024-288=736.
++#    Don't set VM max over 864-128=736.
  ifneq ($(MB_OF_MEMORY),)
    LOW_MEMORY_MACHINE := $(shell \
      if [ $(MB_OF_MEMORY) -le 512 ] ; then \
-@@ -400,9 +467,9 @@ ifneq ($(MB_OF_MEMORY),)
+@@ -399,10 +466,10 @@ ifneq ($(MB_OF_MEMORY),)
+       echo "false"; \
      fi)
    MAX_VM_MEMORY := $(shell \
-     if [ $(MB_OF_MEMORY) -le 1024 ] ; then \
--      expr $(MB_OF_MEMORY) '-' 128 ; \
-+      expr $(MB_OF_MEMORY) '-' 288 ; \
+-    if [ $(MB_OF_MEMORY) -le 1024 ] ; then \
++    if [ $(MB_OF_MEMORY) -le 864 ] ; then \
+       expr $(MB_OF_MEMORY) '-' 128 ; \
      else \
 -      echo "896"; \
 +      echo "736"; \

Reply via email to