From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: bug#27142: classpath-0.99-1.e7c13ee0c fails to build Date: Tue, 30 May 2017 10:11:17 +0200 Message-ID: <87mv9u4vdm.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47564) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFcG6-0000B4-23 for bug-guix@gnu.org; Tue, 30 May 2017 04:12:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFcG2-0005qU-Sp for bug-guix@gnu.org; Tue, 30 May 2017 04:12:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:41447) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dFcG2-0005qP-PA for bug-guix@gnu.org; Tue, 30 May 2017 04:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dFcG2-0001fn-Ju for bug-guix@gnu.org; Tue, 30 May 2017 04:12:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47416) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFcFV-0000Ac-A6 for bug-guix@gnu.org; Tue, 30 May 2017 04:11:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFcFS-0005mo-62 for bug-guix@gnu.org; Tue, 30 May 2017 04:11:29 -0400 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21075) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dFcFR-0005mR-TG for bug-guix@gnu.org; Tue, 30 May 2017 04:11:26 -0400 List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 27142@debbugs.gnu.org On a machine with 62G memory classpath fails to build from source. --8<---------------cut here---------------start------------->8--- $ free -h total used free shared buff/cache available Mem: 62G 1.1G 35G 32M 25G 61G Swap: 5.0G 0B 5.0G --8<---------------cut here---------------end--------------->8--- The problem appears to be that by default the JVM tries to allocate as much memory as it can, so the initial size of the heap may be larger than the set maximum. Here’s the error: --8<---------------cut here---------------start------------->8--- /gnu/store/ncvpxqykv672wjfygmki7phc7v8kz8iz-ecj-javac-on-jamvm-wrapper-3.2.2/bin/javac -nowarn -source 1.6 -target 1.6 -bootclasspath '' -classpath ../vm/reference:..:../external/w3c_dom:../external/sax:../external/relaxngDatatype:../external/jsr166:.:: -J-Xmx768M -d . @classes Minimum heap size greater than max! touch compile-classes touch resources /gnu/store/rw6zb4l1dqg1zx252ri9722ffb1r20jm-fastjar-0.98/bin/fastjar cf glibj.zip gnu java javax org sun META-INF && /gnu/store/rw6zb4l1dqg1zx252ri9722ffb1r20jm-fastjar-0.98/bin/fastjar i glibj.zip sun: No such file or directory Error adding sun to jar archive! make[1]: *** [Makefile:674: glibj.zip] Error 1 make[1]: Leaving directory '/tmp/guix-build-classpath-0.99-1.e7c13ee0c.drv-0/source/lib' make: *** [Makefile:523: all-recursive] Error 1 phase `build' failed after 3.7 seconds --8<---------------cut here---------------end--------------->8--- I think we may be able to fix this by ensuring that we also pass -J-Xms768M to the compiler (or -Xms768M to the invocation of “java”) to set the initial heap size no greater than the maximum. -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net