From owner-freebsd-java@FreeBSD.ORG Sat Jun 8 11:46:23 2013 Return-Path: Delivered-To: java@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3D83AF41; Sat, 8 Jun 2013 11:46:23 +0000 (UTC) (envelope-from xzpeter@gmail.com) Received: from mail-pb0-x236.google.com (mail-pb0-x236.google.com [IPv6:2607:f8b0:400e:c01::236]) by mx1.freebsd.org (Postfix) with ESMTP id 1298A1069; Sat, 8 Jun 2013 11:46:23 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id ro2so5672655pbb.13 for ; Sat, 08 Jun 2013 04:46:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=5oK5z437+hzpLXtb5yK9VXp4FX8TWMnf6Jhm6/AeKtk=; b=RgpbPkltc4C5iz1Sg0CVehTE01EtEHG9fcsH/67XorTM0VIkhZLiY5VyATejXIELPS AgUjNBHfR2f1mh4COxuoe1EDZvyi0OK69i+Vs9pBs0D4MaKnfyuIaUmJEHAldjem0Rh9 KoLkFbyK38G//4SnQKUuO7bWwW6GrMEtv0XAg+K9pW8sC6ZwGd2VhgQbchSEIaMcGWkY G30lIQvHSycCbhA/qkuXN8IX5j1W6e5uKcvjdnO94eyhlyIilutmY561URO100ZdZHjn McJPbyMCEp2h0zbCv6+UObYuwS6GeVpanZSxNe7q0KNUnGmDr4ul6/Rkj5nhnvjYzwHE Ht4g== X-Received: by 10.66.192.226 with SMTP id hj2mr6751831pac.37.1370691982898; Sat, 08 Jun 2013 04:46:22 -0700 (PDT) Received: from Peters-MacAir.local ([117.79.232.167]) by mx.google.com with ESMTPSA id ag4sm2830588pbc.20.2013.06.08.04.46.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 08 Jun 2013 04:46:22 -0700 (PDT) Message-ID: <51B31989.1010706@gmail.com> Date: Sat, 08 Jun 2013 19:46:17 +0800 From: Xu Zhe User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Chris Rees Subject: Re: How to build openjdk7 for customized FreeBSD system References: <51ADA907.1020801@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: ports@freebsd.org, java@freebsd.org X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jun 2013 11:46:23 -0000 ? 6/8/13 5:23 PM, Chris Rees ??: > > > On 8 Jun 2013 04:05, "Peter Xu" > wrote: > > > > I did this in a stupid way. I am sending this out in case someone > met the > > same problem (or to say, you want to build openjdk on an platform > that have > > no older version of JDK supported). > > > > The main idea is, firstly find a generic FreeBSD 8.2 system, build the > > openjdk7 package (well, there is no problem on generic system, as > long as > > you are using the port collections corresponding to that specific > version I > > suppose). Then, we can leverage all the Java-built output (includes > > *.class, *.jar, and some *.java/*.[ch] if they are auto-generated by the > > build system using JVM) in the generic systems, replacing all the > > $(JAVAC_CMD) and $(JAVAH_CMD) lines in Makefiles with something like > (or we > > can try direct copy of the object files, but sometimes we still need > to do > > this since the dependencies of 'make' are not the JAR files sometimes): > > > > scp $GENERIC_BSD:$JAR_FILE_PATH $PRIVATE_BSD:$JAR_FILE_PATH > > > > Or to say, we do fetch the good 'jar' from the generic systems > instead of > > invoking a sick JVM and build it until we met error and stop the make > > process. > > > > I suppose all these things need some knowledge on the Makefile > structure of > > openjdk. This is nasty work, but it did work for us. > > > > Another solution I thought about is cross-compile the whole JDK on a > > generic system, and copy all the private C libraries on the private > system > > to the generic one before-hand (this may only be working when the > generic > > system has cross-toolchain I suppose, or in my case that the two systems > > are using the same CPU arch). Just an idea, no need to try currently. > > I'm really pleased you fixed it in the end; I'd just succeeded in > making you a package too, but never mind. > > Now you have time to migrate your hacks to later FreeBSD, and even get > some of them committed ;) > > Chris > Hi, Chris, Thanks for the attempt to help. :) However, I am not quite sure on the migrate thing. Do you mean that, I can re-arrange the hack so that openjdk on FreeBSD would support build across two machines (or to say, to seperate Java/native code build)? Peter