You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Sean Qiu <se...@gmail.com> on 2008/03/05 10:08:01 UTC

[jdktools][build] Which is more recommendable build approach for jdwp?

I have found that we have two approaches to build jdwp.

1. Through federated build, this will call the make to build jdwp modules.
 a) cd <jdktools>
 b) ant fetch-depends
 c) ant

2. Through jpda module's make directory , this approach will call cc
directly to build jdwp module.
  a) cd <jdktools>\modules\jpda\make
  b) ant build.jdwp.agent
      ant build.jdwp.transport

The first approach works fine, but it seems it does not supply any
test target.(Am i missing something?)

The second approach seems a little outdated,  since the directory
structure is different from current status and it demands some
modifications to work. It contains a target to run the junit test.

I guess the second is the original script before jdktools are included
in federated build. So we should just using the first one?

Best Regards

-- 
Sean, Xiao Xia Qiu
China Software Development Lab, IBM

Re: [jdktools][build] Which is more recommendable build approach for jdwp?

Posted by Sean Qiu <se...@gmail.com>.
Thanks. :)

2008/3/11, Ivan Popov <iv...@gmail.com>:
> Yes, it's definitely a bug in JDWP build script, this file should be
> added to the link target, because it includes initialization/shutdown
> code for sockets. The reason that it worked pretty well before is
> probably because sockets were initialized in some other modules, but
> now something is changed.
>
> Thanks.
> Ivan
>
> On Sat, Mar 8, 2008 at 10:51 PM, Sean Qiu <se...@gmail.com> wrote:
> > JDWP gurus,
> >
> >  I have tried the first approach in linux, and it works well.
> >  But i have noticed that the dll file is different built is different
> >  between these two approach.
> >
> >  And the first can not run test with error message like
> >  "STDERR> ERROR: [PacketDispatcher.cpp:109] unable to resolve host name
> >  [510/202]: unable to resolve host name"
> >
> >  I noticed that this is caused that the first approach does not link
> >  SocketTransport_pd to the dll. Once i add this obj to
> >  src/main/native/jdwp/windows/transport/makefile, the test can
> >  successfully run again.
> >
> >  Is there any concern to add this ?
> >  I have reported a jira for this[1]
> >
> >  [1] https://issues.apache.org/jira/browse/HARMONY-5586
> >
> >  2008/3/5, Sean Qiu <se...@gmail.com>:
> >
> >
> > > Thanks very much.
> >  >
> >  > 2008/3/5, Ivan Popov <iv...@gmail.com>:
> >  > > First approach is preferred, because it is aligned with the jdktools
> >  > > build structure. You can use "ant -Dbuild.module=jpda build-native" if
> >  > > you want to build only JDWP code (as a native part of JPDA module).
> >  > > For running JDWP unit tests you can use similar command "ant
> >  > > -Dbuild.module=jpda test".
> >  > >
> >  > > Second approach uses internal targets which require proper
> >  > > configuration from top-level build scripts.
> >  > >
> >  > > Thanks.
> >  > > Ivan
> >  > >
> >  > > On Wed, Mar 5, 2008 at 3:08 PM, Sean Qiu <se...@gmail.com> wrote:
> >  > > > I have found that we have two approaches to build jdwp.
> >  > > >
> >  > > >  1. Through federated build, this will call the make to build jdwp modules.
> >  > > >   a) cd <jdktools>
> >  > > >   b) ant fetch-depends
> >  > > >   c) ant
> >  > > >
> >  > > >  2. Through jpda module's make directory , this approach will call cc
> >  > > >  directly to build jdwp module.
> >  > > >   a) cd <jdktools>\modules\jpda\make
> >  > > >   b) ant build.jdwp.agent
> >  > > >       ant build.jdwp.transport
> >  > > >
> >  > > >  The first approach works fine, but it seems it does not supply any
> >  > > >  test target.(Am i missing something?)
> >  > > >
> >  > > >  The second approach seems a little outdated,  since the directory
> >  > > >  structure is different from current status and it demands some
> >  > > >  modifications to work. It contains a target to run the junit test.
> >  > > >
> >  > > >  I guess the second is the original script before jdktools are included
> >  > > >  in federated build. So we should just using the first one?
> >  > > >
> >  > > >  Best Regards
> >  > > >
> >  > > >  --
> >  > > >  Sean, Xiao Xia Qiu
> >  > > >  China Software Development Lab, IBM
> >  > > >
> >  > >
> >  >
> >  >
> >  > --
> >  > Sean, Xiao Xia Qiu
> >  > China Software Development Lab, IBM
> >  >
> >
> >
> >  --
> >
> >
> > Sean, Xiao Xia Qiu
> >  China Software Development Lab, IBM
> >
>


-- 
Sean, Xiao Xia Qiu
China Software Development Lab, IBM

Re: [jdktools][build] Which is more recommendable build approach for jdwp?

Posted by Ivan Popov <iv...@gmail.com>.
Yes, it's definitely a bug in JDWP build script, this file should be
added to the link target, because it includes initialization/shutdown
code for sockets. The reason that it worked pretty well before is
probably because sockets were initialized in some other modules, but
now something is changed.

Thanks.
Ivan

On Sat, Mar 8, 2008 at 10:51 PM, Sean Qiu <se...@gmail.com> wrote:
> JDWP gurus,
>
>  I have tried the first approach in linux, and it works well.
>  But i have noticed that the dll file is different built is different
>  between these two approach.
>
>  And the first can not run test with error message like
>  "STDERR> ERROR: [PacketDispatcher.cpp:109] unable to resolve host name
>  [510/202]: unable to resolve host name"
>
>  I noticed that this is caused that the first approach does not link
>  SocketTransport_pd to the dll. Once i add this obj to
>  src/main/native/jdwp/windows/transport/makefile, the test can
>  successfully run again.
>
>  Is there any concern to add this ?
>  I have reported a jira for this[1]
>
>  [1] https://issues.apache.org/jira/browse/HARMONY-5586
>
>  2008/3/5, Sean Qiu <se...@gmail.com>:
>
>
> > Thanks very much.
>  >
>  > 2008/3/5, Ivan Popov <iv...@gmail.com>:
>  > > First approach is preferred, because it is aligned with the jdktools
>  > > build structure. You can use "ant -Dbuild.module=jpda build-native" if
>  > > you want to build only JDWP code (as a native part of JPDA module).
>  > > For running JDWP unit tests you can use similar command "ant
>  > > -Dbuild.module=jpda test".
>  > >
>  > > Second approach uses internal targets which require proper
>  > > configuration from top-level build scripts.
>  > >
>  > > Thanks.
>  > > Ivan
>  > >
>  > > On Wed, Mar 5, 2008 at 3:08 PM, Sean Qiu <se...@gmail.com> wrote:
>  > > > I have found that we have two approaches to build jdwp.
>  > > >
>  > > >  1. Through federated build, this will call the make to build jdwp modules.
>  > > >   a) cd <jdktools>
>  > > >   b) ant fetch-depends
>  > > >   c) ant
>  > > >
>  > > >  2. Through jpda module's make directory , this approach will call cc
>  > > >  directly to build jdwp module.
>  > > >   a) cd <jdktools>\modules\jpda\make
>  > > >   b) ant build.jdwp.agent
>  > > >       ant build.jdwp.transport
>  > > >
>  > > >  The first approach works fine, but it seems it does not supply any
>  > > >  test target.(Am i missing something?)
>  > > >
>  > > >  The second approach seems a little outdated,  since the directory
>  > > >  structure is different from current status and it demands some
>  > > >  modifications to work. It contains a target to run the junit test.
>  > > >
>  > > >  I guess the second is the original script before jdktools are included
>  > > >  in federated build. So we should just using the first one?
>  > > >
>  > > >  Best Regards
>  > > >
>  > > >  --
>  > > >  Sean, Xiao Xia Qiu
>  > > >  China Software Development Lab, IBM
>  > > >
>  > >
>  >
>  >
>  > --
>  > Sean, Xiao Xia Qiu
>  > China Software Development Lab, IBM
>  >
>
>
>  --
>
>
> Sean, Xiao Xia Qiu
>  China Software Development Lab, IBM
>

Re: [jdktools][build] Which is more recommendable build approach for jdwp?

Posted by Sean Qiu <se...@gmail.com>.
JDWP gurus,

I have tried the first approach in linux, and it works well.
But i have noticed that the dll file is different built is different
between these two approach.

And the first can not run test with error message like
"STDERR> ERROR: [PacketDispatcher.cpp:109] unable to resolve host name
[510/202]: unable to resolve host name"

I noticed that this is caused that the first approach does not link
SocketTransport_pd to the dll. Once i add this obj to
src/main/native/jdwp/windows/transport/makefile, the test can
successfully run again.

Is there any concern to add this ?
I have reported a jira for this[1]

[1] https://issues.apache.org/jira/browse/HARMONY-5586

2008/3/5, Sean Qiu <se...@gmail.com>:
> Thanks very much.
>
> 2008/3/5, Ivan Popov <iv...@gmail.com>:
> > First approach is preferred, because it is aligned with the jdktools
> > build structure. You can use "ant -Dbuild.module=jpda build-native" if
> > you want to build only JDWP code (as a native part of JPDA module).
> > For running JDWP unit tests you can use similar command "ant
> > -Dbuild.module=jpda test".
> >
> > Second approach uses internal targets which require proper
> > configuration from top-level build scripts.
> >
> > Thanks.
> > Ivan
> >
> > On Wed, Mar 5, 2008 at 3:08 PM, Sean Qiu <se...@gmail.com> wrote:
> > > I have found that we have two approaches to build jdwp.
> > >
> > >  1. Through federated build, this will call the make to build jdwp modules.
> > >   a) cd <jdktools>
> > >   b) ant fetch-depends
> > >   c) ant
> > >
> > >  2. Through jpda module's make directory , this approach will call cc
> > >  directly to build jdwp module.
> > >   a) cd <jdktools>\modules\jpda\make
> > >   b) ant build.jdwp.agent
> > >       ant build.jdwp.transport
> > >
> > >  The first approach works fine, but it seems it does not supply any
> > >  test target.(Am i missing something?)
> > >
> > >  The second approach seems a little outdated,  since the directory
> > >  structure is different from current status and it demands some
> > >  modifications to work. It contains a target to run the junit test.
> > >
> > >  I guess the second is the original script before jdktools are included
> > >  in federated build. So we should just using the first one?
> > >
> > >  Best Regards
> > >
> > >  --
> > >  Sean, Xiao Xia Qiu
> > >  China Software Development Lab, IBM
> > >
> >
>
>
> --
> Sean, Xiao Xia Qiu
> China Software Development Lab, IBM
>


-- 
Sean, Xiao Xia Qiu
China Software Development Lab, IBM

Re: [jdktools][build] Which is more recommendable build approach for jdwp?

Posted by Sean Qiu <se...@gmail.com>.
Thanks very much.

2008/3/5, Ivan Popov <iv...@gmail.com>:
> First approach is preferred, because it is aligned with the jdktools
> build structure. You can use "ant -Dbuild.module=jpda build-native" if
> you want to build only JDWP code (as a native part of JPDA module).
> For running JDWP unit tests you can use similar command "ant
> -Dbuild.module=jpda test".
>
> Second approach uses internal targets which require proper
> configuration from top-level build scripts.
>
> Thanks.
> Ivan
>
> On Wed, Mar 5, 2008 at 3:08 PM, Sean Qiu <se...@gmail.com> wrote:
> > I have found that we have two approaches to build jdwp.
> >
> >  1. Through federated build, this will call the make to build jdwp modules.
> >   a) cd <jdktools>
> >   b) ant fetch-depends
> >   c) ant
> >
> >  2. Through jpda module's make directory , this approach will call cc
> >  directly to build jdwp module.
> >   a) cd <jdktools>\modules\jpda\make
> >   b) ant build.jdwp.agent
> >       ant build.jdwp.transport
> >
> >  The first approach works fine, but it seems it does not supply any
> >  test target.(Am i missing something?)
> >
> >  The second approach seems a little outdated,  since the directory
> >  structure is different from current status and it demands some
> >  modifications to work. It contains a target to run the junit test.
> >
> >  I guess the second is the original script before jdktools are included
> >  in federated build. So we should just using the first one?
> >
> >  Best Regards
> >
> >  --
> >  Sean, Xiao Xia Qiu
> >  China Software Development Lab, IBM
> >
>


-- 
Sean, Xiao Xia Qiu
China Software Development Lab, IBM

Re: [jdktools][build] Which is more recommendable build approach for jdwp?

Posted by Ivan Popov <iv...@gmail.com>.
First approach is preferred, because it is aligned with the jdktools
build structure. You can use "ant -Dbuild.module=jpda build-native" if
you want to build only JDWP code (as a native part of JPDA module).
For running JDWP unit tests you can use similar command "ant
-Dbuild.module=jpda test".

Second approach uses internal targets which require proper
configuration from top-level build scripts.

Thanks.
Ivan

On Wed, Mar 5, 2008 at 3:08 PM, Sean Qiu <se...@gmail.com> wrote:
> I have found that we have two approaches to build jdwp.
>
>  1. Through federated build, this will call the make to build jdwp modules.
>   a) cd <jdktools>
>   b) ant fetch-depends
>   c) ant
>
>  2. Through jpda module's make directory , this approach will call cc
>  directly to build jdwp module.
>   a) cd <jdktools>\modules\jpda\make
>   b) ant build.jdwp.agent
>       ant build.jdwp.transport
>
>  The first approach works fine, but it seems it does not supply any
>  test target.(Am i missing something?)
>
>  The second approach seems a little outdated,  since the directory
>  structure is different from current status and it demands some
>  modifications to work. It contains a target to run the junit test.
>
>  I guess the second is the original script before jdktools are included
>  in federated build. So we should just using the first one?
>
>  Best Regards
>
>  --
>  Sean, Xiao Xia Qiu
>  China Software Development Lab, IBM
>

Re: [jdktools][build] Which is more recommendable build approach for jdwp?

Posted by Ivan Popov <iv...@gmail.com>.
It's probably caused by recent modification of drlvm build structure.
Running jdktools tests requires JRE binary, which is copied from drlvm
module. As a workaround you can explicitly set this property with
correct drlvm location in the ant command line.

Thanks.
Ivan

On Wed, Mar 5, 2008 at 3:45 PM, Sean Qiu <se...@gmail.com> wrote:
> Hi, all
>
>  I can not run the test.
>  It seems the test target point to wrong deploy location.
>
>  >ant test
>
>  /hdk/working_jdktools/build.xml:242: The following error occurred
>  while executing this line:
>  /hdk/working_jdktools/make/build-test.xml:104:
>  /hdk/working_vm/build/deploy/jdk/jre not found.
>
>
>  <property name="external.drlvm.loc" value="../working_vm/build/deploy" />
>  Is it should be pointed to  ../working_vm/deploy"?
>
>
>  2008/3/5, Sean Qiu <se...@gmail.com>:
>
>
> > I have found that we have two approaches to build jdwp.
>  >
>  >  1. Through federated build, this will call the make to build jdwp modules.
>  >   a) cd <jdktools>
>  >   b) ant fetch-depends
>  >   c) ant
>  >
>  >  2. Through jpda module's make directory , this approach will call cc
>  >  directly to build jdwp module.
>  >   a) cd <jdktools>\modules\jpda\make
>  >   b) ant build.jdwp.agent
>  >       ant build.jdwp.transport
>  >
>  >  The first approach works fine, but it seems it does not supply any
>  >  test target.(Am i missing something?)
>  >
>  >  The second approach seems a little outdated,  since the directory
>  >  structure is different from current status and it demands some
>  >  modifications to work. It contains a target to run the junit test.
>  >
>  >  I guess the second is the original script before jdktools are included
>  >  in federated build. So we should just using the first one?
>  >
>  >  Best Regards
>  >
>  >
>  >  --
>  >  Sean, Xiao Xia Qiu
>  >  China Software Development Lab, IBM
>  >
>
>
>  --
>  Sean, Xiao Xia Qiu
>  China Software Development Lab, IBM
>

Re: [jdktools][build] Which is more recommendable build approach for jdwp?

Posted by Sean Qiu <se...@gmail.com>.
Hi, all

I can not run the test.
It seems the test target point to wrong deploy location.

>ant test

/hdk/working_jdktools/build.xml:242: The following error occurred
while executing this line:
/hdk/working_jdktools/make/build-test.xml:104:
/hdk/working_vm/build/deploy/jdk/jre not found.


<property name="external.drlvm.loc" value="../working_vm/build/deploy" />
Is it should be pointed to  ../working_vm/deploy"?


2008/3/5, Sean Qiu <se...@gmail.com>:
> I have found that we have two approaches to build jdwp.
>
>  1. Through federated build, this will call the make to build jdwp modules.
>   a) cd <jdktools>
>   b) ant fetch-depends
>   c) ant
>
>  2. Through jpda module's make directory , this approach will call cc
>  directly to build jdwp module.
>   a) cd <jdktools>\modules\jpda\make
>   b) ant build.jdwp.agent
>       ant build.jdwp.transport
>
>  The first approach works fine, but it seems it does not supply any
>  test target.(Am i missing something?)
>
>  The second approach seems a little outdated,  since the directory
>  structure is different from current status and it demands some
>  modifications to work. It contains a target to run the junit test.
>
>  I guess the second is the original script before jdktools are included
>  in federated build. So we should just using the first one?
>
>  Best Regards
>
>
>  --
>  Sean, Xiao Xia Qiu
>  China Software Development Lab, IBM
>


-- 
Sean, Xiao Xia Qiu
China Software Development Lab, IBM

Re: [jdktools][build] Which is more recommendable build approach for jdwp?

Posted by "Jimmy,Jing Lv" <fi...@gmail.com>.
Hi,

2008/3/5, Sean Qiu <se...@gmail.com>:
> I have found that we have two approaches to build jdwp.
>
>  1. Through federated build, this will call the make to build jdwp modules.
>   a) cd <jdktools>
>   b) ant fetch-depends
>   c) ant
>
>  2. Through jpda module's make directory , this approach will call cc
>  directly to build jdwp module.
>   a) cd <jdktools>\modules\jpda\make
>   b) ant build.jdwp.agent
>       ant build.jdwp.transport
>
>  The first approach works fine, but it seems it does not supply any
>  test target.(Am i missing something?)
>

Follow Harmony's common manner, the first one sound reasonable(and
easier) to me. (any drlvm guru explain this?)

>  The second approach seems a little outdated,  since the directory
>  structure is different from current status and it demands some
>  modifications to work. It contains a target to run the junit test.
>
>  I guess the second is the original script before jdktools are included
>  in federated build. So we should just using the first one?
>
>  Best Regards
>
>
>  --
>  Sean, Xiao Xia Qiu
>  China Software Development Lab, IBM
>


-- 

Best Regards!

Jimmy, Jing Lv
China Software Development Lab, IBM