Re: Fail to cross compiling jdk12 for mips64el-linux-gnu target

2019-01-28 Thread Ao Qi
Hi Magnus, On Fri, Jan 25, 2019 at 10:18 PM Magnus Ihse Bursie wrote: > > On 2019-01-25 02:47, Leslie Zhai wrote: > > Hi Magnus, > > > > Failed to make images: > > > > $ make images CONF=mips > > Building target 'images' in configuration > > 'linux-mips64el-normal-server-fastdebug' > > GenerateLi

Re: Fail to cross compiling jdk12 for mips64el-linux-gnu target

2019-01-25 Thread Ao Qi
Hi John, On Fri, Jan 25, 2019 at 11:10 PM Ao Qi wrote: > > On Fri, Jan 25, 2019 at 10:51 PM John Paul Adrian Glaubitz > wrote: > > > > On 1/25/19 3:44 PM, Ao Qi wrote:> FYI, if one wants to debug this issue, > > below is some sctripts I used > > > to cross compile a mips zero jdk, which can tri

Re: Fail to cross compiling jdk12 for mips64el-linux-gnu target

2019-01-25 Thread Ao Qi
On Fri, Jan 25, 2019 at 10:51 PM John Paul Adrian Glaubitz wrote: > > On 1/25/19 3:44 PM, Ao Qi wrote:> FYI, if one wants to debug this issue, > below is some sctripts I used > > to cross compile a mips zero jdk, which can trigger the bug. > > Native builds on Debian unstable on mips* work? > Wo

Re: Fail to cross compiling jdk12 for mips64el-linux-gnu target

2019-01-25 Thread Ao Qi
Hi, On Fri, Jan 25, 2019 at 10:31 PM John Paul Adrian Glaubitz wrote: > > Hi! > > On 1/24/19 3:28 AM, Leslie Zhai wrote: > > Please give me some advice about how to fix the root cause, thanks a lot! > > Just as a heads-up: In Debian we have two patches required for OpenJDK on the > mips > target

Re: Fail to cross compiling jdk12 for mips64el-linux-gnu target

2019-01-25 Thread John Paul Adrian Glaubitz
On 1/25/19 3:44 PM, Ao Qi wrote:> FYI, if one wants to debug this issue, below is some sctripts I used > to cross compile a mips zero jdk, which can trigger the bug. Native builds on Debian unstable on mips* work? > do one patch [1] then make images What about the alignment patch? Is that still

Re: Fail to cross compiling jdk12 for mips64el-linux-gnu target

2019-01-25 Thread Ao Qi
Hi, FYI, if one wants to debug this issue, below is some sctripts I used to cross compile a mips zero jdk, which can trigger the bug. build machine: x86, debian testing (in a VirtualBox; an ubuntu may fail to configure) known worked targets: ppc64le/server and s390x/server (aarch64/server may fa

Re: Fail to cross compiling jdk12 for mips64el-linux-gnu target

2019-01-25 Thread John Paul Adrian Glaubitz
Hi! On 1/24/19 3:28 AM, Leslie Zhai wrote: > Please give me some advice about how to fix the root cause, thanks a lot! Just as a heads-up: In Debian we have two patches required for OpenJDK on the mips targets: > https://git.launchpad.net/~openjdk/ubuntu/+source/openjdk/+git/openjdk/tree/debian

Re: Fail to cross compiling jdk12 for mips64el-linux-gnu target

2019-01-25 Thread Magnus Ihse Bursie
On 2019-01-25 02:47, Leslie Zhai wrote: Hi Magnus, Failed to make images: $ make images CONF=mips Building target 'images' in configuration 'linux-mips64el-normal-server-fastdebug' GenerateLinkOptData.gmk:61: recipe for target '/home/loongson/zhaixiang/jdk12-mips/build/linux-mips64el-normal-s

Re: Fail to cross compiling jdk12 for mips64el-linux-gnu target

2019-01-24 Thread Leslie Zhai
Hi Erik, Thanks for your kind response! 在 2019/1/25 上午1:19, Erik Joelsson 写道: Hello, I agree with the conclusion here, there is certainly a bug in the build logic. When creating the "Build JDK" during a cross compilation build, we are, as Magnus said, cutting a few corners for efficiency. O

Re: Fail to cross compiling jdk12 for mips64el-linux-gnu target

2019-01-24 Thread Leslie Zhai
Hi Magnus, Failed to make images: $ make images CONF=mips Building target 'images' in configuration 'linux-mips64el-normal-server-fastdebug' GenerateLinkOptData.gmk:61: recipe for target '/home/loongson/zhaixiang/jdk12-mips/build/linux-mips64el-normal-server-fastdebug/support/link_opt/classlis

Re: Fail to cross compiling jdk12 for mips64el-linux-gnu target

2019-01-24 Thread Erik Joelsson
Hello, I agree with the conclusion here, there is certainly a bug in the build logic. When creating the "Build JDK" during a cross compilation build, we are, as Magnus said, cutting a few corners for efficiency. One of those corners is assuming all the java classes are the same and can simply

Re: Fail to cross compiling jdk12 for mips64el-linux-gnu target

2019-01-24 Thread Magnus Ihse Bursie
On 2019-01-24 13:22, Leslie Zhai wrote: Hi Magnus, Thanks for your kind response! 在 2019/1/24 下午8:05, Magnus Ihse Bursie 写道: On 2019-01-24 05:45, David Holmes wrote: On 24/01/2019 1:51 pm, Ao Qi wrote: Hi David, On Thu, Jan 24, 2019 at 10:47 AM David Holmes wrote: Hi Leslie, I'm not

Re: Fail to cross compiling jdk12 for mips64el-linux-gnu target

2019-01-24 Thread Leslie Zhai
Hi Magnus, Thanks for your kind response! 在 2019/1/24 下午8:05, Magnus Ihse Bursie 写道: On 2019-01-24 05:45, David Holmes wrote: On 24/01/2019 1:51 pm, Ao Qi wrote: Hi David, On Thu, Jan 24, 2019 at 10:47 AM David Holmes wrote: Hi Leslie, I'm not Erik :) however On 24/01/2019 12:28

Re: Fail to cross compiling jdk12 for mips64el-linux-gnu target

2019-01-24 Thread Magnus Ihse Bursie
On 2019-01-24 05:45, David Holmes wrote: On 24/01/2019 1:51 pm, Ao Qi wrote: Hi David, On Thu, Jan 24, 2019 at 10:47 AM David Holmes wrote: Hi Leslie, I'm not Erik :) however On 24/01/2019 12:28 pm, Leslie Zhai wrote: Hi Erik, Because the flags' macro of MIPS is different from o

Re: Fail to cross compiling jdk12 for mips64el-linux-gnu target

2019-01-23 Thread David Holmes
On 24/01/2019 1:51 pm, Ao Qi wrote: Hi David, On Thu, Jan 24, 2019 at 10:47 AM David Holmes wrote: Hi Leslie, I'm not Erik :) however On 24/01/2019 12:28 pm, Leslie Zhai wrote: Hi Erik, Because the flags' macro of MIPS is different from other targets[1], it will effect the `UnixConst

Re: Fail to cross compiling jdk12 for mips64el-linux-gnu target

2019-01-23 Thread Ao Qi
Hi David, On Thu, Jan 24, 2019 at 10:47 AM David Holmes wrote: > > Hi Leslie, > > I'm not Erik :) however > > On 24/01/2019 12:28 pm, Leslie Zhai wrote: > > Hi Erik, > > > > Because the flags' macro of MIPS is different from other targets[1], it > > will effect the `UnixConstants` of > > src

Re: Fail to cross compiling jdk12 for mips64el-linux-gnu target

2019-01-23 Thread Leslie Zhai
Hi David, Thanks for your kind response! You point out the root cause: executing a tool on the build platform (X86 host) using the newly compiled classes for the target platform (MIPS target) especially when the flags' macro is different. I will use workaround 1 before fix the root cause. R

Re: Fail to cross compiling jdk12 for mips64el-linux-gnu target

2019-01-23 Thread David Holmes
Hi Leslie, I'm not Erik :) however On 24/01/2019 12:28 pm, Leslie Zhai wrote: Hi Erik, Because the flags' macro of MIPS is different from other targets[1], it will effect the `UnixConstants` of src/java.base/unix/classes/sun/nio/fs/UnixConstants.java.template, for example, PREFIX_O_APP