From owner-freebsd-java@FreeBSD.ORG Sat Jun 8 09:23:18 2013 Return-Path: Delivered-To: java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 87587C91; Sat, 8 Jun 2013 09:23:18 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-ie0-x236.google.com (mail-ie0-x236.google.com [IPv6:2607:f8b0:4001:c03::236]) by mx1.freebsd.org (Postfix) with ESMTP id 529A51C26; Sat, 8 Jun 2013 09:23:18 +0000 (UTC) Received: by mail-ie0-f182.google.com with SMTP id 9so12785668iec.13 for ; Sat, 08 Jun 2013 02:23:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=eQPmnu0QDpYfEX6YVxb1lziEpv3gTkh9PA1HtNyWzrI=; b=A1SQ1OefQp1u4UGcJZUxTkxV3nDto5wsDmwDr8Ah0aSZUYoMMvAV8xXBThs5EnceZk w5PnAMb/uxehw2DahZ//8fBmxlEsFv2pPzdn7MI9wzmcp6hDaQmBcAKbNCWntRq6OTAj X1Fxym8FHyXKYI0avTCKgxz493/aweEHYcGpxg7dtMXiSRoaZH1cFR53wQaRgxXBn5jA I35w6lur2aRtQTmR4keie/kVI01H2wj+P1FheqoftunPtohwD8j/Vc7u1BERqjlLcC1v Sf6kFT8pUFgSZr5vOqkgZMPikePyxiakyuVNIz2QjHY4uay9ROKhAMEY8OUnVuh+GEzi Zrvw== MIME-Version: 1.0 X-Received: by 10.50.115.67 with SMTP id jm3mr586875igb.65.1370683397483; Sat, 08 Jun 2013 02:23:17 -0700 (PDT) Received: by 10.64.228.104 with HTTP; Sat, 8 Jun 2013 02:23:17 -0700 (PDT) Received: by 10.64.228.104 with HTTP; Sat, 8 Jun 2013 02:23:17 -0700 (PDT) In-Reply-To: References: <51ADA907.1020801@gmail.com> Date: Sat, 8 Jun 2013 10:23:17 +0100 Message-ID: Subject: Re: How to build openjdk7 for customized FreeBSD system From: Chris Rees To: Peter Xu Content-Type: text/plain; charset=ISO-8859-1 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 09:23:18 -0000 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