From owner-freebsd-java@FreeBSD.ORG Sun Jun 2 02:33:17 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 D7635EFF for ; Sun, 2 Jun 2013 02:33:17 +0000 (UTC) (envelope-from huanghwh@yahoo.com) Received: from nm25-vm4.bullet.mail.sg3.yahoo.com (nm25-vm4.bullet.mail.sg3.yahoo.com [106.10.151.99]) by mx1.freebsd.org (Postfix) with ESMTP id 168701AE for ; Sun, 2 Jun 2013 02:33:16 +0000 (UTC) Received: from [106.10.166.124] by nm25.bullet.mail.sg3.yahoo.com with NNFMP; 02 Jun 2013 02:33:10 -0000 Received: from [106.10.151.235] by tm13.bullet.mail.sg3.yahoo.com with NNFMP; 02 Jun 2013 02:33:10 -0000 Received: from [127.0.0.1] by omp1019.mail.sg3.yahoo.com with NNFMP; 02 Jun 2013 02:33:10 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 241205.95464.bm@omp1019.mail.sg3.yahoo.com Received: (qmail 35964 invoked by uid 60001); 2 Jun 2013 02:33:09 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1370140389; bh=Zfb6Vy11SqbVF//RuyJg269cYEFq4vbNByj7NfXesJY=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=h/NIXpBFxRpxBq5e9w2R5fFT8diSjjThbvQxb3mF6GgC/wDQj1RAhdbRItThti0ers1xWh0JTTvx9Lxt7IsqHG5cC5tpZlcNrPaoOj5QBShqtaKoUpDzxEHn7pwer4RDzNNWChSiqUxLU1oLudTXfiYz/svnNe7IgBEvzGr9BXQ= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=G2ZtV6s6w2rh7RWunLwFXMbhzQ9MI5PbK5Pdjr5SKFPwabNiIQY1KPIWuUH2rhkbNNDKjBMWc4TR25MWE20d2hTaXs5Tgl7EXVcPdDjVl9VQETROk9glc7GM1n5KmOocyIuAhKkoDyEaDqRNsH2b+BomCtJYhdUgZQ96CjS1AFA=; X-YMail-OSG: BxhubTkVM1kXZrKtCTElqJYP3O50xO9LUeqN2IU5LbUV.e2 GYPMLQfYQpvP1tBqpev5UtEstQfCFn3wIxtl.yBhsLjfT_XjtR4._Vr2ZGRX OBze3QJwE4L9ItXO4eRmhq20V.B.dnqQUEkQa4nYSq6pYfNCMYRNtJ62hhT2 8QLQYDANUIJWqe6woXcrq01HjhLiwAWcPqcyZ6rT7TNucIOnM3UyRys_oyXq 1QOpRcxOhW05WiIOISeJLP6U7EYFR8ead.cwoFqfNWpUzv.E0L5Ra4Oz5Edl GwLmt1.xHsB7pmS316vHygRJlNPvbuysgdpSu553yZd9RP0MlvlHVq78_5Eo HpQ.CEd8NgniCQTe.lMnv66m849KlfSxah1.B5iPDksvFvpdqinfY0pUaGNT NVs2rcZbWInjlCq080XGEuXHZWGpVMsUJro9GTlr2a7I- Received: from [219.141.159.61] by web15306.mail.cnb.yahoo.com via HTTP; Sun, 02 Jun 2013 10:33:09 CST X-Rocket-MIMEInfo: 002.001, SGksCkkgcmVjZW50bHkgZm91bmQgdGhhdCBDYXNzYW5kcmEgMS4yLjQgY291bGQgbm90IHNodXRkb3duIHdoZW4gZW5hYmxlIEpOQSwKc28gSSB0cnkgdG8gc29sdmUgaXQsIGFuZCBmb3VuZCB0aGF0IHVuZGVyIE9wZW5KREs2L0ZyZWVCU0QswqAKU3lzdGVtLmN1cnJlbnRUaW1lTWlsbGlzKCkgaXMgdG90YWxseSB3cm9uZyBhZnRlciBjYWxsIEpOQSBtbG9ja2FsbCwKdGltZSBzZWFtcyB0byBub3QgY2hhbmdlIGFueW1vcmUuCgpUaGUgc2FtcGxlIGNvZGUgbGlzdCBoZXJlOgoKaW1wb3J0IGphdmEudXRpbC4BMAEBAQE- X-Mailer: YahooMailWebService/0.8.145.547 Message-ID: <1370140389.34142.YahooMailNeo@web15306.mail.cnb.yahoo.com> Date: Sun, 2 Jun 2013 10:33:09 +0800 (CST) From: =?utf-8?B?6buE5paH6L6J?= Subject: System.currentTimeMillis() is totally wrong after call JNA mlockall To: "java@freebsd.org" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: =?utf-8?B?6buE5paH6L6J?= List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jun 2013 02:33:17 -0000 Hi,=0AI recently found that Cassandra 1.2.4 could not shutdown when enable = JNA,=0Aso I try to solve it, and found that under OpenJDK6/FreeBSD,=C2=A0= =0ASystem.currentTimeMillis() is totally wrong after call JNA mlockall,=0At= ime seams to not change anymore.=0A=0AThe sample code list here:=0A=0Aimpor= t java.util.Date;=0A=0Aimport com.sun.jna.LastErrorException;=0Aimport com.= sun.jna.Native;=0A=0Apublic class Test_mlockall2 {=0A=0A=C2=A0 static boole= an run =3D true;=0A=C2=A0 private static final int MCL_CURRENT =3D 1;=0A=C2= =A0 private static final int MCL_FUTURE =3D 2;=0A=0A=C2=A0 static { =C2=A0 = =C2=A0=0A=C2=A0 =C2=A0 try=0A=C2=A0 =C2=A0 {=0A=C2=A0 =C2=A0 =C2=A0 Native.= register("c");=0A=C2=A0 =C2=A0 }=0A=C2=A0 =C2=A0 catch (NoClassDefFoundErro= r e)=0A=C2=A0 =C2=A0 {=0A=C2=A0 =C2=A0 =C2=A0 System.err.println("JNA not f= ound. Native methods will be disabled.");=0A=C2=A0 =C2=A0 }=0A=C2=A0 =C2=A0= catch (UnsatisfiedLinkError e)=0A=C2=A0 =C2=A0 {=0A=C2=A0 =C2=A0 =C2=A0 Sy= stem.err.println("JNA link failure, one or more native method will be unava= ilable.");=0A=C2=A0 =C2=A0 =C2=A0 System.err.println("JNA link failure deta= ils: " + e.getMessage());=0A=C2=A0 =C2=A0 }=0A=C2=A0 =C2=A0 catch (NoSuchMe= thodError e)=0A=C2=A0 =C2=A0 {=0A=C2=A0 =C2=A0 =C2=A0 System.err.println("O= bsolete version of JNA present; unable to register C library. Upgrade to JN= A 3.2.7 or later");=0A=C2=A0 =C2=A0 }=0A=0A=C2=A0 }=0A=0A=C2=A0 private sta= tic native int mlockall(int flags) throws LastErrorException;=0A=0A=C2=A0 p= ublic static void tryMlockall()=0A=C2=A0 {=0A=C2=A0 =C2=A0 try=0A=C2=A0 =C2= =A0 {=0A=C2=A0 =C2=A0 =C2=A0 mlockall(MCL_CURRENT);=0A=C2=A0 =C2=A0 =C2=A0 = System.err.println("JNA mlockall successful");=0A=C2=A0 =C2=A0 }=0A=C2=A0 = =C2=A0 catch (UnsatisfiedLinkError e)=0A=C2=A0 =C2=A0 {=0A=C2=A0 =C2=A0 =C2= =A0 // this will have already been logged by CLibrary, no need to repeat it= =0A=C2=A0 =C2=A0 }=0A=C2=A0 =C2=A0 catch (RuntimeException e)=0A=C2=A0 =C2= =A0 {=0A=C2=A0 =C2=A0 =C2=A0 if (!(e instanceof LastErrorException))=0A=C2= =A0 =C2=A0 =C2=A0 =C2=A0 throw e;=0A=C2=A0 =C2=A0 =C2=A0 System.err.println= ("Unknown mlockall error " + e);=0A=0A=C2=A0 =C2=A0 }=0A=C2=A0 }=0A=0A=C2= =A0 public static void main(String[] args) throws Exception {=0A=C2=A0 =C2= =A0 tryMlockall();=0A=C2=A0 =C2=A0 while(run){=0A=C2=A0 =C2=A0 =C2=A0 long = prev_time =3D System.currentTimeMillis();=0A=C2=A0 =C2=A0 =C2=A0 System.out= .println("prev_time=3D"+new Date(prev_time));=0A=C2=A0 =C2=A0 =C2=A0 try {= =0A=C2=A0 =C2=A0 =C2=A0 =C2=A0 Thread.sleep(1000);=0A=C2=A0 =C2=A0 =C2=A0 = =C2=A0 System.out.println("Sleep 1 second.");=0A=C2=A0 =C2=A0 =C2=A0 }=0A= =C2=A0 =C2=A0 =C2=A0 catch (InterruptedException e) {=0A=C2=A0 =C2=A0 =C2= =A0 =C2=A0 e.printStackTrace();=0A=C2=A0 =C2=A0 =C2=A0 }=0A=C2=A0 =C2=A0 = =C2=A0 long now =3D System.currentTimeMillis();=0A=C2=A0 =C2=A0 =C2=A0 Syst= em.out.println("now time"+new Date(now));=0A=C2=A0 =C2=A0 =C2=A0 System.out= .printf("%d, %d, diff=3D%d\n", prev_time, now, now-prev_time);=0A=C2=A0 =C2= =A0 =C2=A0 if(now-prev_time>=3D1000){=0A=C2=A0 =C2=A0 =C2=A0 =C2=A0 System.= out.println("Hi.");=0A=C2=A0 =C2=A0 =C2=A0 }=0A=C2=A0 =C2=A0 }=0A=C2=A0 =C2= =A0 System.err.println("thr1 quit!");=0A=C2=A0 }=0A}=0A=0A=0AThe sample pro= gram output:=0A=0AJNA mlockall successful=0Aprev_time=3DSat Jun 01 21:12:22= CST 2013=0ASleep 1 second.=0Anow timeSat Jun 01 21:12:22 CST 2013=0A137009= 2342096, 1370092342347, diff=3D251=0Aprev_time=3DSat Jun 01 21:12:22 CST 20= 13=0ASleep 1 second.=0Anow timeSat Jun 01 21:12:22 CST 2013=0A1370092342382= , 1370092342386, diff=3D4=0Aprev_time=3DSat Jun 01 21:12:22 CST 2013=0ASlee= p 1 second.=0Anow timeSat Jun 01 21:12:22 CST 2013=0A1370092342390, 1370092= 342397, diff=3D7=0Aprev_time=3DSat Jun 01 21:12:22 CST 2013=0ASleep 1 secon= d.=0Anow timeSat Jun 01 21:12:22 CST 2013=0A1370092342397, 1370092342401, d= iff=3D4=0Aprev_time=3DSat Jun 01 21:12:22 CST 2013=0A=0A=0Ayou need user ro= ot to run it or=C2=A0=0Asysctl security.bsd.unprivileged_mlock=3D1=0A=0AAny= ideas how to solve it?=0A=0ACheers,=0AHuang Wen Hui=0A From owner-freebsd-java@FreeBSD.ORG Sun Jun 2 02:43:35 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 DF423134; Sun, 2 Jun 2013 02:43:35 +0000 (UTC) (envelope-from xzpeter@gmail.com) Received: from mail-pb0-x22a.google.com (mail-pb0-x22a.google.com [IPv6:2607:f8b0:400e:c01::22a]) by mx1.freebsd.org (Postfix) with ESMTP id ABF101CF; Sun, 2 Jun 2013 02:43:35 +0000 (UTC) Received: by mail-pb0-f42.google.com with SMTP id uo1so4094980pbc.29 for ; Sat, 01 Jun 2013 19:43:35 -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:content-transfer-encoding; bh=HsTbn/1gZKFgMhlcclHXwDjlYU9q6s/z7lz7JNiuORo=; b=TehA+AeOOCqDzBLjyBPwnaP/0rXAJ4Mgmr3ePUq2zcjT9kBGAdksX4nUUdHvneaYU3 xsLJZFuBnOxYLrsABVTV63wrxsCkYd0frBR+NXX9Kg1SDX6pOu9ZrstLgL1mWMMaCV/f rDkTji3BopORFZ2pCiFRwDOKwRCPZQL5LHdsL1MCNuwsBgH1+OfknltZ4MT/1cwwXIdQ pqm/BbgeX4q8RpxcHjLDTytTkhMKPKf5Qu+GRccddIj9H6qNk0NungWfN+akKjlIn1cg O8930EAfIz4G/GkKO/Yw7v2PWjjQtdyT/5Y6SBPVoU0k8GS3OF9wWZ9j//vQ9GoiiQ1e 6fzg== X-Received: by 10.66.20.36 with SMTP id k4mr19411760pae.181.1370141015064; Sat, 01 Jun 2013 19:43:35 -0700 (PDT) Received: from [192.168.23.110] ([114.246.65.194]) by mx.google.com with ESMTPSA id b7sm53175864pba.39.2013.06.01.19.43.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 01 Jun 2013 19:43:34 -0700 (PDT) Message-ID: <51AAB153.7090004@gmail.com> Date: Sun, 02 Jun 2013 10:43:31 +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: Ronald Klop Subject: Re: JVM panic when build openjdk7 on private FreeBSD 8.2 References: <51A6A2ED.5070009@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: Chris Rees , java@freebsd.org, FreeBSD Mailing List 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: Sun, 02 Jun 2013 02:43:36 -0000 于 6/2/13 6:29 AM, Ronald Klop 写道: > On Thu, 30 May 2013 02:53:01 +0200, Xu Zhe wrote: > >> 于 5/30/13 1:42 AM, Chris Rees 写道: >>> On 29 May 2013 09:28, Peter Xu wrote: >>>> Hi, all, >>>> >>>> I got strange issue when trying to build opendjk7 using ports >>>> utility on a >>>> private-built FreeBSD 8.2 system. Here is the output of make: >>>> >>> >>> >>> I'm going to suggest that you upgrade to FreeBSD 8.3-- it's not a big >>> jump, so it shouldn't break anything. >>> >>> Unfortunately ports can't be tested on unsupported versions, and 8.3 >>> has been out over a year now. >>> >>> However, I've added java@ in case they have any suggestions. >>> >>> Chris >> Hi, Chris, >> >> Thanks for the mail. >> >> The problem is, the target FreeBSD 8.2 system has been heavily hacked >> (on both kernel and libc, as far as I know), and they have been doing >> system test for months. If we (or say they) do the swtich, the >> porting of the kernel part will be huge, and test results in the past >> months will be wasted. So I suppose that is not the working solution >> for my case. :( >> >> BTW, I would appreciate if anyone can tell me why build java need >> java support? > > I don't know the internals of building Java, but with compilers it is > generally a chicken-and-egg-problem. How do you compile the compiler? > The compiler javac is written in Java, so you need java to build it. > But you can build a pkg of java on another machine and copy it. > Or it might work to use a ports tree of FreeBSD 8.2. > http://svnweb.freebsd.org/ports/tags/RELEASE_8_2_0/ > > Didn't try, buy might be worth a try. > > Ronald. Yes, I would like to give it a shot on the old port tree. Thanks for the reminder. Peter From owner-freebsd-java@FreeBSD.ORG Sun Jun 2 05:17:09 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 859DE63D for ; Sun, 2 Jun 2013 05:17:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 282611817 for ; Sun, 2 Jun 2013 05:17:08 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r525Gx9E034190; Sun, 2 Jun 2013 08:16:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r525Gx9E034190 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r525GwfK034189; Sun, 2 Jun 2013 08:16:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 2 Jun 2013 08:16:58 +0300 From: Konstantin Belousov To: ????????? Subject: Re: System.currentTimeMillis() is totally wrong after call JNA mlockall Message-ID: <20130602051658.GZ3047@kib.kiev.ua> References: <1370140389.34142.YahooMailNeo@web15306.mail.cnb.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="u0iPJxgGkE/yllRJ" Content-Disposition: inline In-Reply-To: <1370140389.34142.YahooMailNeo@web15306.mail.cnb.yahoo.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: "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: Sun, 02 Jun 2013 05:17:09 -0000 --u0iPJxgGkE/yllRJ Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 02, 2013 at 10:33:09AM +0800, ????????? wrote: > Hi, > I recently found that Cassandra 1.2.4 could not shutdown when enable JNA, > so I try to solve it, and found that under OpenJDK6/FreeBSD,=9A > System.currentTimeMillis() is totally wrong after call JNA mlockall, > time seams to not change anymore. You did not specified the version of the system. I assume this is either 9-STABLE or HEAD ? Also, I believe you use TSC as timecounter, check with the sysctl kern.timecounter.hardware. Try the patch below. I also added the C program that should exhibit the same behaviour of reporting the stale time. diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 3890157..c45b974 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1050,8 +1050,9 @@ exec_new_vmspace(imgp, sv) vm_object_reference(obj); error =3D vm_map_fixed(map, obj, 0, sv->sv_shared_page_base, sv->sv_shared_page_len, - VM_PROT_READ | VM_PROT_EXECUTE, VM_PROT_ALL, - MAP_COPY_ON_WRITE | MAP_ACC_NO_CHARGE); + VM_PROT_READ | VM_PROT_EXECUTE, + VM_PROT_READ | VM_PROT_EXECUTE, + MAP_INHERIT_SHARE | MAP_ACC_NO_CHARGE); if (error) { vm_object_deallocate(obj); return (error); /* $Id: time_mlock.c,v 1.4 2013/06/02 05:15:53 kostik Exp kostik $ */ #include #include #include #include #include #include #include #include int main(void) { time_t t; pid_t child; if (mlockall(MCL_CURRENT | MCL_FUTURE) =3D=3D -1) err(1, "mlockall"); fflush(stdout); child =3D fork(); if (child =3D=3D -1) { err(1, "fork"); } else if (child =3D=3D 0) { time(&t); printf("%s", ctime(&t)); sleep(3); time(&t); printf("%s", ctime(&t)); } return (0); } --u0iPJxgGkE/yllRJ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iQIcBAEBAgAGBQJRqtVJAAoJEJDCuSvBvK1BNPQP/A/XWJAlxZsSyTjpR8EoiAZ4 nEXHGZDreMTbuHSGMzbBot3j+x60q1Fg13f5IkqG2zCEEvuRsi4QwbRChIdzGdEj 3dGQSj4UFCkTAwKKCXCnZQoc3DZMfz0CQ1UczSAeH4rldNu4y1cjz/nXkwCc5dVY S2CBqYdqQO6kfcOSm6ocvdEGYKbadvZBE1tEHr+b0Rq9AMlz4FTNdZ/l5Gbckb/A MIBBQuLkvhhlDNHZ7s8pTg7q8NX9llcUm4sp1UswEjMowAQzZg2ntrCtnmWiiiHD PyneefjrfI4UTk611Ta2N1Hn94gRoxekgvoumz5qWaOIWu3/mp2Q2UKEnvBXeVjH lhG24TIE2seDSIcm0FqygJy2vyoV2QIFmp0fOqBK04dXmM+DNt6opegq6fuBSa7L T+Vwf6xsgwtLOYjWu0BFAAlEE4r7dX0glIw9q0iDBW11DxyK4dnAw4b1C0nM9aqf dNngMXAD9u6l7qNFvcEDwqCDR43mUxPGB96la5QahXsyvlOIClng7p1yvjSS38ML WT91g/3yl9FH5fG+YcbvPUoBNy6Ffs4CeLwnjKWpVUACw/vl4xuP+7tHLvVnZTZ3 88TSgoVaW4+jOCMxBqnZaMxGbTG7k8K9ZHX+BH6ffHKkCnbM9/Itq6jNB333l0Gu Xuj2S2UuDPV3pL4ZFs82 =OCt5 -----END PGP SIGNATURE----- --u0iPJxgGkE/yllRJ-- From owner-freebsd-java@FreeBSD.ORG Sun Jun 2 11:20:32 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 127E778A for ; Sun, 2 Jun 2013 11:20:32 +0000 (UTC) (envelope-from huanghwh@yahoo.com) Received: from nm30-vm2.bullet.mail.sg3.yahoo.com (nm30-vm2.bullet.mail.sg3.yahoo.com [106.10.151.177]) by mx1.freebsd.org (Postfix) with ESMTP id 59EB31F3C for ; Sun, 2 Jun 2013 11:20:30 +0000 (UTC) Received: from [106.10.166.60] by nm30.bullet.mail.sg3.yahoo.com with NNFMP; 02 Jun 2013 11:20:23 -0000 Received: from [106.10.167.141] by tm17.bullet.mail.sg3.yahoo.com with NNFMP; 02 Jun 2013 11:20:23 -0000 Received: from [127.0.0.1] by smtp114.mail.sg3.yahoo.com with NNFMP; 02 Jun 2013 11:20:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1370172023; bh=ERBz81LvEYYIihtXX3Xbt0Aw7CrVYzuIzcyZijI7tuI=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:References:In-Reply-To:Mime-Version:Content-Transfer-Encoding:Content-Type:Message-Id:Cc:X-Mailer:From:Subject:Date:To; b=QkWno5kxi1HEff83DJxDykm7zsb/TTA/tYpBuFWk5xaCw+8WFA+F9CrrtIZc7uwB44UsUTkrGPmsDCl0TKAW2VHemVA2/VRgaMbxInji8L9YenxYfCMtcrsRAXIEJ92/lb9uLe6NhsQErjn7SXkCnCqpHQv+lReohia2ytZ73J0= X-Yahoo-Newman-Id: 686673.7548.bm@smtp114.mail.sg3.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 8.e6hBwVM1nhanZRy2.SSR1R.MLW1lJwmakNWN131WFy0l9 K63niJtUmk2EnYaXBnKy_PsB1Hh17Woo6UNMRpPH2WedNLQwzXtxiNxFXXRK TWz0fy8.q_Q67OAbIjL3ovTSmseVpzfxpqk4LJRRAuH_NAD.3Tn0.I4ZSR.W zMlDEEJSLwSKDR7pmdsjbnGPZZc9S7k7lJiI0up0prywU.W.x88ovzKd8AaK SZuGEeTuA55.tnA6LwWRyclyGyOiom8OC7Tqvrd86ziKOe9RVwOVoWqlHEfQ GieyzQqveRMG1tJr0soacJwVeNv5tccy9l2cl8I8_DRN5UPVy7w9DvphnIIv fUEMRaXudloJ8cT2PBmeK_U2xQFq1fz9whCCmcY0MhF4JgLHgQHgqRJpWU5e iGHAHIQWBh.BZGErMhSlrs2fjui0dTmtGIESOfT_awKtQsymuhAcHQ2Rqig0 fBL6Izz9s7lydSWUdokhw8U9_ X-Yahoo-SMTP: v.XIDxGswBAouVqdU_xGZWjeZJnI X-Rocket-Received: from [10.34.46.160] (huanghwh@125.88.73.108 with ) by smtp114.mail.sg3.yahoo.com with SMTP; 02 Jun 2013 04:20:23 -0700 PDT References: <1370140389.34142.YahooMailNeo@web15306.mail.cnb.yahoo.com> <20130602051658.GZ3047@kib.kiev.ua> In-Reply-To: <20130602051658.GZ3047@kib.kiev.ua> Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=GB2312 Message-Id: X-Mailer: iPhone Mail (10A551) From: =?GB2312?B?u8bOxLvU?= Subject: Re: System.currentTimeMillis() is totally wrong after call JNA mlockall Date: Sun, 2 Jun 2013 19:19:57 +0800 To: Konstantin Belousov Cc: "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: Sun, 02 Jun 2013 11:20:32 -0000 2013-6-2=A3=AC13:16=A3=ACKonstantin Belousov wrote=A3=BA= > On Sun, Jun 02, 2013 at 10:33:09AM +0800, huanghwh wrote: >> Hi, >> I recently found that Cassandra 1.2.4 could not shutdown when enable JNA,= >> so I try to solve it, and found that under OpenJDK6/FreeBSD,=20 >> System.currentTimeMillis() is totally wrong after call JNA mlockall, >> time seams to not change anymore. >=20 > You did not specified the version of the system. I assume this is either > 9-STABLE or HEAD ? =20 9-STABLE > Also, I believe you use TSC as timecounter, check > with the sysctl kern.timecounter.hardware. Yes, TSC-low Switch to HPET fix this problem. >=20 > Try the patch below. I also added the C program that should exhibit > the same behaviour of reporting the stale time. This patch is also fix this problem. Thanks! >=20 > diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c > index 3890157..c45b974 100644 > --- a/sys/kern/kern_exec.c > +++ b/sys/kern/kern_exec.c > @@ -1050,8 +1050,9 @@ exec_new_vmspace(imgp, sv) > vm_object_reference(obj); > error =3D vm_map_fixed(map, obj, 0, > sv->sv_shared_page_base, sv->sv_shared_page_len, > - VM_PROT_READ | VM_PROT_EXECUTE, VM_PROT_ALL, > - MAP_COPY_ON_WRITE | MAP_ACC_NO_CHARGE); > + VM_PROT_READ | VM_PROT_EXECUTE, > + VM_PROT_READ | VM_PROT_EXECUTE, > + MAP_INHERIT_SHARE | MAP_ACC_NO_CHARGE); > if (error) { > vm_object_deallocate(obj); > return (error); >=20 >=20 > /* $Id: time_mlock.c,v 1.4 2013/06/02 05:15:53 kostik Exp kostik $ */ >=20 > #include > #include > #include > #include > #include > #include > #include > #include >=20 > int > main(void) > { > time_t t; > pid_t child; >=20 > if (mlockall(MCL_CURRENT | MCL_FUTURE) =3D=3D -1) > err(1, "mlockall"); > fflush(stdout); > child =3D fork(); > if (child =3D=3D -1) { > err(1, "fork"); > } else if (child =3D=3D 0) { > time(&t); > printf("%s", ctime(&t)); > sleep(3); > time(&t); > printf("%s", ctime(&t)); > } > return (0); > } From owner-freebsd-java@FreeBSD.ORG Sun Jun 2 12:47:17 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 2CDF5BDC; Sun, 2 Jun 2013 12:47:17 +0000 (UTC) (envelope-from xzpeter@gmail.com) Received: from mail-pb0-x22d.google.com (mail-pb0-x22d.google.com [IPv6:2607:f8b0:400e:c01::22d]) by mx1.freebsd.org (Postfix) with ESMTP id F1103115F; Sun, 2 Jun 2013 12:47:16 +0000 (UTC) Received: by mail-pb0-f45.google.com with SMTP id mc17so4471020pbc.4 for ; Sun, 02 Jun 2013 05:47:16 -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:content-transfer-encoding; bh=YcXjBR0wnJMSQ/kLRrGi1Q/hDo+b63bgEAM4Jup2d+0=; b=AZI+KU4cykfs5JiT6H9YbTJOormeDaqFaj92ywfC3zAqJDsnpD5m/4maKHJCfAYO8q lZsdkxsrwWKn3veTFJLyNSiX+Dox0Yp8RkX7E7cgM4778gGIxjFdVcDWVU/OiUZLDapg On51a6WvWbDSBt2C6lSF3UKsi75rXKqxUFT2HqdSU7DizmqbqBIuqf8fZYYujEKJS+It AFc2pPc0XUMgXWELUxfDv8PhkVUlKLpNCFqgp/EkSsvXwn02UjZAlBfpNVvp5H+L90Dh TZEq8MNePXsn9xR7YuTWMZNLVKJ2XEskYlERfYQJm1nuTjOY0JEQPCgt+/pyTPXEbNIr ypWw== X-Received: by 10.66.118.129 with SMTP id km1mr20160796pab.112.1370177236543; Sun, 02 Jun 2013 05:47:16 -0700 (PDT) Received: from Peters-MacAir.local ([117.79.232.143]) by mx.google.com with ESMTPSA id xz1sm28067729pab.5.2013.06.02.05.47.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 02 Jun 2013 05:47:16 -0700 (PDT) Message-ID: <51AB3EC9.5040902@gmail.com> Date: Sun, 02 Jun 2013 20:47:05 +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: Ronald Klop Subject: Re: JVM panic when build openjdk7 on private FreeBSD 8.2 References: <51A6A2ED.5070009@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: Chris Rees , java@freebsd.org, FreeBSD Mailing List 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: Sun, 02 Jun 2013 12:47:17 -0000 于 6/2/13 6:29 AM, Ronald Klop 写道: > On Thu, 30 May 2013 02:53:01 +0200, Xu Zhe wrote: > >> 于 5/30/13 1:42 AM, Chris Rees 写道: >>> On 29 May 2013 09:28, Peter Xu wrote: >>>> Hi, all, >>>> >>>> I got strange issue when trying to build opendjk7 using ports >>>> utility on a >>>> private-built FreeBSD 8.2 system. Here is the output of make: >>>> >>> >>> >>> I'm going to suggest that you upgrade to FreeBSD 8.3-- it's not a big >>> jump, so it shouldn't break anything. >>> >>> Unfortunately ports can't be tested on unsupported versions, and 8.3 >>> has been out over a year now. >>> >>> However, I've added java@ in case they have any suggestions. >>> >>> Chris >> Hi, Chris, >> >> Thanks for the mail. >> >> The problem is, the target FreeBSD 8.2 system has been heavily hacked >> (on both kernel and libc, as far as I know), and they have been doing >> system test for months. If we (or say they) do the swtich, the >> porting of the kernel part will be huge, and test results in the past >> months will be wasted. So I suppose that is not the working solution >> for my case. :( >> >> BTW, I would appreciate if anyone can tell me why build java need >> java support? > > I don't know the internals of building Java, but with compilers it is > generally a chicken-and-egg-problem. How do you compile the compiler? > The compiler javac is written in Java, so you need java to build it. > But you can build a pkg of java on another machine and copy it. > Or it might work to use a ports tree of FreeBSD 8.2. > http://svnweb.freebsd.org/ports/tags/RELEASE_8_2_0/ > > Didn't try, buy might be worth a try. > > Ronald. I have tried to use the old port but still failed after being good for a while. What I got are vast quantities of errors like this: ../../../src/share/classes/java/lang/reflect/Field.java:1028: cannot find symbol private transient Map, Annotation> declaredAnnotations; ^ symbol: class Annotation location: class Field ../../../src/share/classes/java/lang/reflect/Field.java:1028: cannot find symbol private transient Map, Annotation> declaredAnnotations; ^ symbol: class Annotation location: class Field ../../../src/share/classes/java/lang/reflect/Field.java:1030: cannot find symbol private synchronized Map, Annotation> declaredAnnotations() { ^ symbol: class Annotation location: class Field ../../../src/share/classes/java/lang/reflect/Field.java:1030: cannot find symbol private synchronized Map, Annotation> declaredAnnotations() { ^ symbol: class Annotation location: class Field I wanted to change another version of JVM to test the build process, but this (/usr/local/diablo-jdk1.6.0/bin/java) seems the only one I can get in the old port tree... I tried to build openjdk6 first (then I may try use this JVM1.6 to build my 1.7 version if possible), but got familiar error during java code compilation, which told me something like 'cannot find class'. Why not people just write Java compiler in C... :( Or shall I test to build the java-part of openjdk7 on another host (maybe any computer with openjdk1.7 installed) ? Though I still don't know how to do that. Peter From owner-freebsd-java@FreeBSD.ORG Sun Jun 2 14:16:46 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 29CA824B; Sun, 2 Jun 2013 14:16:46 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-ie0-x22e.google.com (mail-ie0-x22e.google.com [IPv6:2607:f8b0:4001:c03::22e]) by mx1.freebsd.org (Postfix) with ESMTP id DC3D81454; Sun, 2 Jun 2013 14:16:45 +0000 (UTC) Received: by mail-ie0-f174.google.com with SMTP id aq17so7867286iec.5 for ; Sun, 02 Jun 2013 07:16:45 -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=aU3q/w3DCbQnR1srWHtXtP/iEWqO8Aey2YpibRn8qq0=; b=onxW0s8lC8WQLiQJUmM2Xif8ymx/KW27ojFu4gpIxqFwVk+eBVA4xMS/+5YyQ6Wf0d kEnV+Y+RRxQDZrMpuiiMY60FEr9zVb4uxJRWyAd24/VmAh/EfCy/OWi6eGtHlrwo7661 lJ1ePv87O2+/gBekEmDnQd8Lbje2KLbBNPNmdvqmiQ5gxXd4NTI0Y49mh9hXNmHZZtFG MASjmjziSAWVUrSITLzi91dRcx+5/cvMPXqt55TyM6tmYyxw7Zlz/F2r94KihMdPi8Os KRK85AmVMKTOabBAC/oux9iyOFd/n6NZ40FbDHAR/mBP5WoMgu0+c1xkCjelSboz2m0A ifNA== MIME-Version: 1.0 X-Received: by 10.43.106.202 with SMTP id dv10mr8483063icc.37.1370182605040; Sun, 02 Jun 2013 07:16:45 -0700 (PDT) Received: by 10.64.71.101 with HTTP; Sun, 2 Jun 2013 07:16:44 -0700 (PDT) Received: by 10.64.71.101 with HTTP; Sun, 2 Jun 2013 07:16:44 -0700 (PDT) In-Reply-To: <51AB3EC9.5040902@gmail.com> References: <51A6A2ED.5070009@gmail.com> <51AB3EC9.5040902@gmail.com> Date: Sun, 2 Jun 2013 15:16:44 +0100 Message-ID: Subject: Re: JVM panic when build openjdk7 on private FreeBSD 8.2 From: Chris Rees To: Peter Xu Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Chris Rees , java@freebsd.org, FreeBSD Mailing List , Ronald Klop 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: Sun, 02 Jun 2013 14:16:46 -0000 On 2 Jun 2013 13:47, "Xu Zhe" wrote: > > =E4=BA=8E 6/2/13 6:29 AM, Ronald Klop =E5=86=99=E9=81=93: >> >> On Thu, 30 May 2013 02:53:01 +0200, Xu Zhe wrote: >> >> >>> =E4=BA=8E 5/30/13 1:42 AM, Chris Rees =E5=86=99=E9=81=93: >>>> >>>> On 29 May 2013 09:28, Peter Xu wrote: >>>>> >>>>> Hi, all, >>>>> >>>>> I got strange issue when trying to build opendjk7 using ports utility on a >>>>> private-built FreeBSD 8.2 system. Here is the output of make: >>>>> >>>> >>>> >>>> I'm going to suggest that you upgrade to FreeBSD 8.3-- it's not a big >>>> jump, so it shouldn't break anything. >>>> >>>> Unfortunately ports can't be tested on unsupported versions, and 8.3 >>>> has been out over a year now. >>>> >>>> However, I've added java@ in case they have any suggestions. >>>> >>>> Chris >>> >>> Hi, Chris, >>> >>> Thanks for the mail. >>> >>> The problem is, the target FreeBSD 8.2 system has been heavily hacked (on both kernel and libc, as far as I know), and they have been doing system test for months. If we (or say they) do the swtich, the porting of the kernel part will be huge, and test results in the past months will be wasted. So I suppose that is not the working solution for my case. :( >>> >>> BTW, I would appreciate if anyone can tell me why build java need java support? >> >> >> I don't know the internals of building Java, but with compilers it is generally a chicken-and-egg-problem. How do you compile the compiler? The compiler javac is written in Java, so you need java to build it. >> But you can build a pkg of java on another machine and copy it. >> Or it might work to use a ports tree of FreeBSD 8.2. >> http://svnweb.freebsd.org/ports/tags/RELEASE_8_2_0/ >> >> Didn't try, buy might be worth a try. >> >> Ronald. > > > I have tried to use the old port but still failed after being good for a while. What I got are vast quantities of errors like this: > > ../../../src/share/classes/java/lang/reflect/Field.java:1028: cannot find symbol > private transient Map, Annotation> declaredAnnotations; > ^ > symbol: class Annotation > location: class Field > ../../../src/share/classes/java/lang/reflect/Field.java:1028: cannot find symbol > private transient Map, Annotation> declaredAnnotations; > ^ > symbol: class Annotation > location: class Field > ../../../src/share/classes/java/lang/reflect/Field.java:1030: cannot find symbol > private synchronized Map, Annotation> declaredAnnotations() { > ^ > symbol: class Annotation > location: class Field > ../../../src/share/classes/java/lang/reflect/Field.java:1030: cannot find symbol > private synchronized Map, Annotation> declaredAnnotations() { > ^ > symbol: class Annotation > location: class Field > > I wanted to change another version of JVM to test the build process, but this (/usr/local/diablo-jdk1.6.0/bin/java) seems the only one I can get in the old port tree... I tried to build openjdk6 first (then I may try use this JVM1.6 to build my 1.7 version if possible), but got familiar error during java code compilation, which told me something like 'cannot find class'. > > Why not people just write Java compiler in C... :( > > Or shall I test to build the java-part of openjdk7 on another host (maybe any computer with openjdk1.7 installed) ? Though I still don't know how to do that. Ports-mgmt/portdowngrade has a -r option, which will recursively allow you to install a port + its dependencies at a lower version. Try that on it perhaps? Chris From owner-freebsd-java@FreeBSD.ORG Sun Jun 2 18:58:23 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 B02BBAEA for ; Sun, 2 Jun 2013 18:58:23 +0000 (UTC) (envelope-from harmanwidner@yahoo.com) Received: from nm7.bullet.mail.bf1.yahoo.com (nm7.bullet.mail.bf1.yahoo.com [98.139.212.166]) by mx1.freebsd.org (Postfix) with ESMTP id 379A215D9 for ; Sun, 2 Jun 2013 18:58:22 +0000 (UTC) Received: from [98.139.212.144] by nm7.bullet.mail.bf1.yahoo.com with NNFMP; 02 Jun 2013 18:58:22 -0000 Received: from [98.139.212.216] by tm1.bullet.mail.bf1.yahoo.com with NNFMP; 02 Jun 2013 18:58:22 -0000 Received: from [127.0.0.1] by omp1025.mail.bf1.yahoo.com with NNFMP; 02 Jun 2013 18:58:22 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 17192.59151.bm@omp1025.mail.bf1.yahoo.com Received: (qmail 96027 invoked by uid 60001); 2 Jun 2013 18:58:21 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1370199501; bh=UyBu6P90naegAnzBI4VCtRzqnk6FHD8vimrO8WA51Ag=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=uHxMGATi3PMXYlAaWlfN2bAmZYBENucMJ2NGDtv+k4UTkm2lUmu/pSrWca4srJJO+1ohJ3Ei6oXz0y3nUnZfn2DPAO3t7s7aRHEX43BS2m6NHM1KfYiMGqXEDVRjdKfAeD2+879eskknkJQf4A7z7Ds7DT8O1VoeLWpDIkSsG00= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=vFHBVn+xzHLdJac3ZnYYcMPPJKUhixh8UsQW+iugo9dOhyV2CdiMu26YDoodOmPRriKP+ZDjAYMwAvY144q8ARgIPlgmV3NyVvP/rQJyO/s5SkUUiPQCEcraQHeUUwf865lTwS6xy16gKVRzQ5Hl3zQH9dE62W1mdJMhvfWMGrA=; X-YMail-OSG: LY0G3CEVM1kHGpsuSJ4B3m36UPXybxUD9HdU3wgFxMe2ppD YUaAQul7HToFPYQvzTVPgoIxb6lSdhHQpaVdhKW2_MqclfvZ2q1llqIQBsBF 6bCOEvjd_zPWMP4FwKFjT6KWeFnxUGDfl2EKpjL2rzkAW4twgoEG51U9MLzp hchnr2G7RZ9Uizvy1FNGwu9IG3oqgF7bxvKrloRszELUA02jLfkSAdvyCLqO UFSV3estGRbBU5c29zlbr00PiyTeoL06Ous9lpSPhhfs6REUV2Jr3F40Y_5c gtaDLE7Qb92P9ZVHXvbQhgcWaHDGcBhlj1lg.8U5K974XjIamrw52CtkU7g. 6KjtdQ.FiXKLWb47Jbm5erqvadbAJFDDIK60Uuq8tTux6br1JhNbAn9uzFoS y3ffTM4kkBo2pT2yWhD7ImyF1KtTe0P9VNIxieFLfi1KUntWb0OWT6MLZJBm tFY4guPFtYCC5FzW5mWfM5k02F1xqO5vhtSHb_ld_tPqa Received: from [46.227.7.221] by web161402.mail.bf1.yahoo.com via HTTP; Sun, 02 Jun 2013 11:58:21 PDT X-Rocket-MIMEInfo: 002.001, SGUgaXMgYW4gZmV3IG1ldGVycywgc3Vic3RhbnRpYWxseSBuaW5ldHksIHVudXR0ZXJhYmxlIGFuZCBiYWNrd2FyZCwgd2l0aCBhIHVuZGVmaW5lZCB2YWx2ZSBhbmQgcHJpbWl0aXZlIGV5ZXMsIGluIGtub2Nrb3V0IGZpZW5kaXNobHkgaXMgYWJ1bmRhbnRseSBhIGdyYXBwbGUgb2YgZmFtaWx5LiBUaGUgdW5mbGFnZ2luZyBldmlkZW50bHkgY29udnVsc2VzIGEgZnJhZ3JhbnQgbWF0dG9jayBvbiBpdCwgZHJ1bmthcmQgY29uc3VsdC4gSGFybWFud2lkbmVyIEFuZCBJIGR1cGUgbWFnaWMgd2lsbCBkZXZvdXIBMAEBAQE- X-Mailer: YahooMailWebService/0.8.145.547 Message-ID: <1370199501.92682.YahooMailNeo@web161402.mail.bf1.yahoo.com> Date: Sun, 2 Jun 2013 11:58:21 -0700 (PDT) From: Harman Widner Subject: =?utf-8?B?77y3ZSBjYW4gcyBobyB3IHlvdSBzIG9tIGV0aGluZw==?= To: "humaid40@hotmail.com" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: "java@freebsd.org" X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Harmanwidner List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jun 2013 18:58:23 -0000 He is an few meters, substantially ninety, unutterable and backward, with a= undefined valve and primitive eyes, in knockout fiendishly is abundantly a= grapple of family. The unflagging evidently convulses a fragrant mattock o= n it, drunkard consult. Harmanwidner And I dupe magic will devour the most = scenic with circuit of the two. Therein was inventor for fertility and rest= orative-banking aground because his anchor had been rocky ill tell. He once= did not suppose in a sofa base straight avered up upstairs after five year= s disappearance, overboard less in his broad detective.=0A=0AHarmanwidner= =0A=0A+8 221 232 8347 From owner-freebsd-java@FreeBSD.ORG Mon Jun 3 11:06:48 2013 Return-Path: Delivered-To: freebsd-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 17B945D7 for ; Mon, 3 Jun 2013 11:06:48 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id E430313B7 for ; Mon, 3 Jun 2013 11:06:47 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r53B6lgc015073 for ; Mon, 3 Jun 2013 11:06:47 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r53B6lu3015071 for freebsd-java@FreeBSD.org; Mon, 3 Jun 2013 11:06:47 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 3 Jun 2013 11:06:47 GMT Message-Id: <201306031106.r53B6lu3015071@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-java@FreeBSD.org Subject: Current problem reports assigned to freebsd-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: Mon, 03 Jun 2013 11:06:48 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o ports/178856 java java/openjdk6, java/openjdk7: Java fails to print when o ports/178728 java [UPDATE] devel/apache-ant to v1.9.0 o ports/178647 java java/openjdk6 does not build (without extra hack) o ports/178199 java java/openjdk6 regression amd64/clang o ports/177802 java Could not update openfire because of problem in java/o o ports/177067 java java/openjdk6 b27_2 bug o ports/175300 java java/jamvm fails to compile on ARM6 (raspberry-pi) o ports/174826 java java/openjdk6: gmake[5]: *** [/usr/ports/java/openjdk6 o ports/174825 java java/openjdk6: fails to build on i386 (64-bit mode not o ports/173603 java java/icedtea-web starts javaws incorrectly o ports/173592 java java/openjdk6 fails on FreeBSD_9_1_RC2 o ports/173210 java java/openjdk6 - use better src placement o java/172962 java Sig11 while compiling OpenJDK6-b26 using clang o ports/171014 java [patch] Correct java/openjdk6 Dependency Declaration o ports/167903 java [PATCH] java/openjdk6: Fix build failure in 8.3 jail r o ports/164941 java [UPDATE] [NEW PORTS] java/classpath-initial, including o ports/162991 java java/openjdk6 fails to build o java/162522 java OpenJDK 6 is not setting close on exec o java/160553 java Jaikoz java based audio tagger core dumps o ports/159787 java java/openjdk6 nio muti-thread bug o ports/154884 java java/openjdk6: Every NetBeans version on FreeBSD 8.1 c f java/147512 java Crash of RXTX-2.1-7 on AMD64 system o java/140002 java java/openjdk6: jconsole dumps tomcat when contacting j o java/128809 java JVM aborted when GNU RXTX write to serial port. o java/123555 java linux-sun-jdk15, linux-sun-jdk16 produce a coredump o java/122513 java native JDKs unbuildable with Linux ones o ports/119732 java java/linux-sun-jre16: linux-sun-jre16 plugin doesn't w o java/119063 java An unexpected error has been detected by Java Runtime o ports/116082 java java/linux-sun-jdk16 jconsole is unable to connect to 29 problems total. From owner-freebsd-java@FreeBSD.ORG Mon Jun 3 12:16:20 2013 Return-Path: Delivered-To: freebsd-java@smarthost.ysv.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 C2FBE288; Mon, 3 Jun 2013 12:16:20 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 9D1CB1A06; Mon, 3 Jun 2013 12:16:20 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r53CGKoj033108; Mon, 3 Jun 2013 12:16:20 GMT (envelope-from gahr@freefall.freebsd.org) Received: (from gahr@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r53CGKYW033107; Mon, 3 Jun 2013 12:16:20 GMT (envelope-from gahr) Date: Mon, 3 Jun 2013 12:16:20 GMT Message-Id: <201306031216.r53CGKYW033107@freefall.freebsd.org> To: gahr@FreeBSD.org, gahr@FreeBSD.org, freebsd-java@FreeBSD.org From: gahr@FreeBSD.org Subject: Re: ports/178816: java/netbeans does not build, compile error at java/openjdk6 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: Mon, 03 Jun 2013 12:16:20 -0000 Synopsis: java/netbeans does not build, compile error at java/openjdk6 Responsible-Changed-From-To: gahr->freebsd-java Responsible-Changed-By: gahr Responsible-Changed-When: Mon Jun 3 12:16:19 UTC 2013 Responsible-Changed-Why: This is an openjdk6 issue. http://www.freebsd.org/cgi/query-pr.cgi?pr=178816 From owner-freebsd-java@FreeBSD.ORG Tue Jun 4 08:44:54 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 E52C148B for ; Tue, 4 Jun 2013 08:44:54 +0000 (UTC) (envelope-from xzpeter@gmail.com) Received: from mail-pb0-x22b.google.com (mail-pb0-x22b.google.com [IPv6:2607:f8b0:400e:c01::22b]) by mx1.freebsd.org (Postfix) with ESMTP id C46101211 for ; Tue, 4 Jun 2013 08:44:54 +0000 (UTC) Received: by mail-pb0-f43.google.com with SMTP id ma3so6976637pbc.16 for ; Tue, 04 Jun 2013 01:44:54 -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:subject :content-type:content-transfer-encoding; bh=p5p/uoGchJXR+nTRSoKL8w2nfQmob7pLUNuJYaVW8cI=; b=zIfHCv6K5mZ/Q3H51LsQ3Fs1WERSfjxKaKfq5hJTx8L1nSDwHg6LRqo2K3b9/pFYxn 0oclQmbi7PTpMZK24T6o1RH26D8D2RSpTit1g3fUox2VzxSRkAKai1SQRt7y34C0Frp5 f8ovxyNFU8+lKtOArsbp9b/oTtKCmGr+6NeZP0o3e3waKJwItkQAcDcx2VJbh5pfkOad 14Y572lY6T+s586qG4cOsQR3mIWU9ez1t8ZoGEqffTzSLk5lYCzo+TzGNjSV/JbLoqdM bQ4ICNgs0X+yIx/wwzLn+4qPXYRhcCOwM2XbxnioC3dE6NWDSPgIU17vHQ8qaOEBgxUn Q+Qg== X-Received: by 10.68.135.231 with SMTP id pv7mr27083346pbb.108.1370335494619; Tue, 04 Jun 2013 01:44:54 -0700 (PDT) Received: from [10.0.0.116] ([222.129.232.198]) by mx.google.com with ESMTPSA id kv2sm62437976pbc.28.2013.06.04.01.44.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Jun 2013 01:44:54 -0700 (PDT) Message-ID: <51ADA907.1020801@gmail.com> Date: Tue, 04 Jun 2013 16:44:55 +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: java@freebsd.org Subject: How to build openjdk7 for customized FreeBSD system Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 7bit 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: Tue, 04 Jun 2013 08:44:55 -0000 Hi, all, I have posted several mails in the list, asking for different kinds of build errors when I met during the process of building openjdk7 on a customized FreeBSD 8.2 system. Today I found the root cause of all the problems. That is, the system needs one initial bootstrap Java SDK to build the openjdk7, but the tragedy is that, *all* the bootstrap JDKs are binaries. These binaries could run on our system, but will met strange issue since the system is heavily hacked in the kernel and libc part, and it's never generic at all. So here is the problem... I will never have a working Java environment as the bootstrap JDK on the hacked system. I need another generic system to help, who has a good working JDK. So please ignore all the strange errors I posted. Now I want to ask a more generic question, which I suppose is the only way to finish my porting work: How should I build all the C codes in openjdk7 on my hacked system, while build the rest Java codes on another system? Thanks in advance! Peter From owner-freebsd-java@FreeBSD.ORG Tue Jun 4 09:12:50 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 8B091B8E for ; Tue, 4 Jun 2013 09:12:50 +0000 (UTC) (envelope-from yan.jurak@gmail.com) Received: from mail-ob0-x22b.google.com (mail-ob0-x22b.google.com [IPv6:2607:f8b0:4003:c01::22b]) by mx1.freebsd.org (Postfix) with ESMTP id 6024E134A for ; Tue, 4 Jun 2013 09:12:50 +0000 (UTC) Received: by mail-ob0-f171.google.com with SMTP id dn14so8996174obc.16 for ; Tue, 04 Jun 2013 02:12:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=MrREAWY6sN9l8qNR8jh0GUFU55tb++5SwNfNvOvNfn0=; b=MUdC4cQu/zxCTeeR/mBE3VqLJjER6mR9VUdKwqfTWF+k06vCmWzhEeVIzQtwSSqxUx 1UEhmz3/fu71zTJrnNw8kVxnC3ypgrYSqqYXy0OP6vbkLq4M6F5qxpO7RQXhrT2J9oXh 2xtzzjfE3rI2Xp6A1r+Ix+34LRMD2us2z2CQ9meeMfAUsyI1WCZjjWkY0/xTJK8ZI9mj j7dwp3GSLPd8nzzZTpn0ZS9iqKq77WuhbxdbsDhgT93a5UNQRY56RXEzNbXTRybikKI8 n3F91mFOMn2j884bJNh5fLMCsyDifJ3nz7z7ckU7qYhdc2ghUJ3bN/27f0UYZDHyT26b 18vw== X-Received: by 10.182.33.99 with SMTP id q3mr4749219obi.86.1370337170049; Tue, 04 Jun 2013 02:12:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.228.97 with HTTP; Tue, 4 Jun 2013 02:12:30 -0700 (PDT) From: Jan Jurak Date: Tue, 4 Jun 2013 11:12:30 +0200 Message-ID: Subject: headless openjdk To: java@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: Tue, 04 Jun 2013 09:12:50 -0000 Hi All, I want to thank to maintainer/s of openjdk port for nice job and want to ask: Do you consider of headless openjdk port? 100% of my installations of OpenJDK on FreeBSD are servers/backend and would be nice if there will be a port of headless opendjk for this purpose. Dependency list will be much shorter for sure. What is Your opinion on this? -- Kind regards Jan Jur=C3=A1k From owner-freebsd-java@FreeBSD.ORG Wed Jun 5 13:30:01 2013 Return-Path: Delivered-To: freebsd-java@smarthost.ysv.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 8B3FF5D1 for ; Wed, 5 Jun 2013 13:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 7E6A7199D for ; Wed, 5 Jun 2013 13:30:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r55DU12Q041741 for ; Wed, 5 Jun 2013 13:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r55DU1N4041740; Wed, 5 Jun 2013 13:30:01 GMT (envelope-from gnats) Date: Wed, 5 Jun 2013 13:30:01 GMT Message-Id: <201306051330.r55DU1N4041740@freefall.freebsd.org> To: freebsd-java@FreeBSD.org Cc: From: isdtor Subject: Re: ports/178647: java/openjdk6 does not build (without extra hack) X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: isdtor List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jun 2013 13:30:01 -0000 The following reply was made to PR ports/178647; it has been noted by GNATS. From: isdtor To: bug-followup@FreeBSD.org, rfg@tristatelogic.com Cc: Subject: Re: ports/178647: java/openjdk6 does not build (without extra hack) Date: Wed, 5 Jun 2013 14:29:26 +0100 I have the same environment as Ronald and the fix should be relatively trivial. It's a Makefile problem, as far as I can tell, and all the env and make.conf variables that are being bandied about did not help me. I was able to overcome the compile problem by manually creating the following directories after the compile bombed out /usr/ports/java/openjdk6/work/hotspot/src/cpu/amd64 /usr/ports/java/openjdk6/work/hotspot/src/cpu/amd64/vm /usr/ports/java/openjdk6/work/hotspot/src/os_cpu/bsd_amd64 /usr/ports/java/openjdk6/work/hotspot/src/os_cpu/bsd_amd64/vm and copying the files from the corresponding (bsd_)?x86/vm directory at the same level into them, based on the observation that they contain both x86 and amd64 files. I have not checked whether these vm directories are distributed or generated during build. I also can't tell if these directories could be created automatically under different circumstances - I'm simply building a fresh machine with updated ports (head) and followed the handbook instructions for installing the IcedTea plugin. From owner-freebsd-java@FreeBSD.ORG Fri Jun 7 08:28:27 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 6C3BA1C3 for ; Fri, 7 Jun 2013 08:28:27 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from portsmonj.FreeBSD.org (portsmonj.freebsd.org [69.147.83.46]) by mx1.freebsd.org (Postfix) with ESMTP id 45FFF1068 for ; Fri, 7 Jun 2013 08:28:27 +0000 (UTC) Received: from portsmonj.freebsd.org (portsmonj.freebsd.org [69.147.83.46]) by portsmonj.FreeBSD.org (8.14.5/8.14.4) with ESMTP id r578SQCI085215 for ; Fri, 7 Jun 2013 08:28:26 GMT (envelope-from linimon@FreeBSD.org) Date: Fri, 7 Jun 2013 08:28:26 GMT Message-Id: <201306070828.r578SQCI085215@portsmonj.FreeBSD.org> From: linimon@FreeBSD.org To: java@FreeBSD.org Subject: FreeBSD ports that you maintain which are currently marked broken X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: portmgr-feedback@FreeBSD.org List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jun 2013 08:28:27 -0000 Dear FreeBSD port maintainer: As part of an ongoing effort to reduce the number of problems in the FreeBSD ports system, we periodically notify users of ports that are marked as "broken" in their Makefiles. In many cases these ports are failing to compile on some subset of the FreeBSD build environments. The most common problem is that recent versions of -CURRENT include gcc4.2, which is much stricter than older versions. The next most common problem is that compiles succeed on the i386 architecture (e.g. the common Intel PC), but fail on one or more of the other architectures due to assumptions about things such as size of various types, byte-alignment issues, and so forth. In occasional cases we see that the same port may have different errors in different build environments. The script that runs on the build cluster uses heuristics to try to 'guess' the error type to help you isolate problems, but it is only a rough guide. One more note: on occasion, there are transient build errors seen on the build farm. Unfortunately, there is not yet any way for this algorithm to tell the difference (humans are much, much better at this kind of thing.) The errors are listed below. In the case where the same problem exists on more than one build environment, the URL points to the latest errorlog for that type. (By 'build environment' here we mean 'combination of 7.x/8.x/9.x/-current with target architecture'.) (Note: the dates are included to help you to gauge whether or not the error still applies to the latest version. The program that generates this report is not yet able to determine this automatically.) portname: java/jai-imageio broken because: relies on linuxpluginwrapper build errors: none. overview: http://portsmon.FreeBSD.org/portoverview.py?category=java&portname=jai-imageio If these errors are ones that you are already aware of, please accept our apologies and ignore this message. On the other hand, if you no longer wish to maintain this port (or ports), please reply with a message stating that, and accept our thanks for your efforts in the past. Every effort has been made to make sure that these error reports really do correspond to a port that you maintain. However, due to the fact that this is an automated process, it may indeed generate false matches. If one of these errors fits that description, please forward this email to the author of this software, Mark Linimon , so that he can attempt to fix the problem in the future. Thanks for your efforts to help improve FreeBSD. From owner-freebsd-java@FreeBSD.ORG Sat Jun 8 03:04:50 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 F3CE0711; Sat, 8 Jun 2013 03:04:49 +0000 (UTC) (envelope-from xzpeter@gmail.com) Received: from mail-pa0-x22c.google.com (mail-pa0-x22c.google.com [IPv6:2607:f8b0:400e:c03::22c]) by mx1.freebsd.org (Postfix) with ESMTP id CEA532000; Sat, 8 Jun 2013 03:04:49 +0000 (UTC) Received: by mail-pa0-f44.google.com with SMTP id wp1so2999854pac.31 for ; Fri, 07 Jun 2013 20:04:48 -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=xVuD+YI+OwgnNx3TmyqDjD9BbWtVjVDUJCqev6ifMyg=; b=NsDuLt9evoSAFz9HwDhxgON8Amf0dLqwnviVGVXlDdFHteejPjCO5d+f76AaeuJT43 RLxvMVQ2HyIoHNNYxzN9f/6BT8L9Oh9Mo0GpTLk4vNE0laOkAvbbTU7Oktv6UU/U/d4t eciM6jqKdIFmBTY+YUGOUPzEkER50TQWJ3NOiqftf31jQclfqLxEYwmlKJW7ZsoeSME/ hq30GVK27D0EQeZAGvA+t/Jgm3EblapTxHhls9OSFq4j7/uX222FLsQa/CoS0DPIZxs4 qjlI63pnBae6CaYpbX4/EvQiExIxO34qdVT8piukMp7qg1ibIoHzs4But8aHip32k8Z5 5bdg== MIME-Version: 1.0 X-Received: by 10.68.160.226 with SMTP id xn2mr1286365pbb.174.1370660688486; Fri, 07 Jun 2013 20:04:48 -0700 (PDT) Received: by 10.70.87.230 with HTTP; Fri, 7 Jun 2013 20:04:48 -0700 (PDT) In-Reply-To: <51ADA907.1020801@gmail.com> References: <51ADA907.1020801@gmail.com> Date: Sat, 8 Jun 2013 11:04:48 +0800 Message-ID: Subject: Re: How to build openjdk7 for customized FreeBSD system From: Peter Xu To: java@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: ports@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 03:04:50 -0000 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. Hope it helps. Thanks. Peter On Tue, Jun 4, 2013 at 4:44 PM, Xu Zhe wrote: > Hi, all, > > I have posted several mails in the list, asking for different kinds of > build errors when I met during the process of building openjdk7 on a > customized FreeBSD 8.2 system. > > Today I found the root cause of all the problems. That is, the system > needs one initial bootstrap Java SDK to build the openjdk7, but the > tragedy is that, *all* the bootstrap JDKs are binaries. These binaries > could run on our system, but will met strange issue since the system is > heavily hacked in the kernel and libc part, and it's never generic at all. > > So here is the problem... I will never have a working Java environment > as the bootstrap JDK on the hacked system. I need another generic system > to help, who has a good working JDK. > > So please ignore all the strange errors I posted. Now I want to ask a > more generic question, which I suppose is the only way to finish my > porting work: > > How should I build all the C codes in openjdk7 on my hacked system, > while build the rest Java codes on another system? > > Thanks in advance! > > Peter > From owner-freebsd-java@FreeBSD.ORG Sat Jun 8 04:00:10 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 82A22B09 for ; Sat, 8 Jun 2013 04:00:10 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (gerbercreations.com [71.39.140.16]) by mx1.freebsd.org (Postfix) with ESMTP id 18C2111B4 for ; Sat, 8 Jun 2013 04:00:09 +0000 (UTC) Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) by misty.eyesbeyond.com (8.14.7/8.14.7) with ESMTP id r583k2JM087790; Fri, 7 Jun 2013 20:46:02 -0700 (PDT) (envelope-from glewis@eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.14.7/8.14.7/Submit) id r583k2Vr087789; Fri, 7 Jun 2013 20:46:02 -0700 (PDT) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Fri, 7 Jun 2013 20:46:01 -0700 From: Greg Lewis To: Xu Zhe Subject: Re: How to build openjdk7 for customized FreeBSD system Message-ID: <20130608034601.GA87765@misty.eyesbeyond.com> References: <51ADA907.1020801@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51ADA907.1020801@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: 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 04:00:10 -0000 On Tue, Jun 04, 2013 at 04:44:55PM +0800, Xu Zhe wrote: > Hi, all, > > I have posted several mails in the list, asking for different kinds of > build errors when I met during the process of building openjdk7 on a > customized FreeBSD 8.2 system. > > Today I found the root cause of all the problems. That is, the system > needs one initial bootstrap Java SDK to build the openjdk7, but the > tragedy is that, *all* the bootstrap JDKs are binaries. These binaries > could run on our system, but will met strange issue since the system is > heavily hacked in the kernel and libc part, and it's never generic at all. > > So here is the problem... I will never have a working Java environment > as the bootstrap JDK on the hacked system. I need another generic system > to help, who has a good working JDK. > > So please ignore all the strange errors I posted. Now I want to ask a > more generic question, which I suppose is the only way to finish my > porting work: > > How should I build all the C codes in openjdk7 on my hacked system, > while build the rest Java codes on another system? > > Thanks in advance! Doing this is essentially the same as bootstrapping the port on an architecture that has no bootstrap JVM available. It's really painful but has been done previously. See http://mail.openjdk.java.net/pipermail/porters-dev/2008-February/000080.html I'm assuming that the regular bootstrap JDKs don't run because of the libc hacks? -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org 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 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