You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Ivan Popov <iv...@gmail.com> on 2006/12/08 17:11:14 UTC

[jdktools] Building jdktools and JPDA component

I've tried to build jdktools with the latest changes in its build
system. On Linux build works well, but on Windows it fails mostly
because of lack of makefiles for JPDA module.

I've created missed makefiles for JPDA module, prepared patches and
added them to HARMONY-2180. With these patches jdktools component is
built successfully on both Windows and Linux. It can be built on top
on working_classlib as well as referencing to existing HDK by using
hy.hdk property. These makefiles are simple enough, but I'd like them
to be committed to svn, so we can build jdktools on both platforms and
can improve the overall build later.

The only problem is that the required jvmti.h file is missed in HDK
and its classlib copy (provided in
working_classlib/deploy/jdk/include) does not support C++. I've just
manually replaced jvmti.h and jni.h/jniport.h in working_classlib with
jvmti.h/jvmti_types.h and jni.h/jni_types.h from DRLVM and was able to
build jdktools.

We have to agree on which copies of jni.h/jvmti.h should be shared
between Harmony components and where they should be located. One of
possible solution is to move these files to the top-level component
common_resources.

One more problem with building jdktools is that 'ant clean' fails
reporting the following file was not deleted:

  working_jdktools\build\classes\org\apache\harmony\tools\ijh\anttask\Adapter.class

However, second attempt to run 'ant clean' succeeds. I did not check
what's the problem with deleting this file.

Thanks.
Ivan

Re: [jdktools] Building jdktools and JPDA component

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.

Ivan Popov wrote:
> Makefiles for JPDA component in jdktools pass the following include
> directory to native compiler:
> 
>  -I$(HY_DRLVM)\jdk\include
> 
> which is expanded to
> 
>  <…>\trunk\working_vm\build\deploy\jdk\include
> 
> However, default build for working_vm creates DRLVM build in a
> platform dependent directory:
> 
>  <…>\trunk\working_vm\build\win_ia32_msvc_debug\deploy\jdk\include
> 
> That's why header files from DRLVM were not found in my build. Do you
> have DRLVM build in a platform independent directory?
> 

Yes.  (This feature has now been there for months...)

There's a flag "deploy.canonical.flag" that you can specify on the 
command line or more commonly, put in the

   build/drlvm.properties

file which has the output go into the directory that you noted above 
(deploy/...)

I made the mistake of not defaulting that flag to true, which I will fix 
now.  If you don't like it, turn it off. :)

> We could fix makefiles to look into platform dependent DRLVM build
> directory or look into VM sources (working_vm\vm\include). But, since
> JNI/JVMTI headers are VM-independent, it's better to get them from
> classlib, not from DRLVM.

Yes, we know.  That's why we moved them there.

But the "canonical deploy directory" feature of the DRLVM build made 
everything work.

Again, the problem was that the flag wasn't set to do this by default, 
but it will going forward.

> 
> However, now we have similar header files in classlib and DRLVM
> sources and need to synchronize them in case of any changes. I still
> think it's better to move these headers to common_resources/include
> and use the same headers in both classlib and DRLVM builds.


We were planning to get them out of DRLVM , but your idea is a good one. 
  I'd like to see more things move to common_resources, if that makes sense.

geir



> 
> Thanks.
> Ivan
> 
> 
> On 12/18/06, Geir Magnusson Jr. <ge...@pobox.com> wrote:
>>
>>
>> Tim Ellison wrote:
>> > Geir Magnusson Jr. wrote:
>> >> If you haven't yet, let me know and I will - I'm confused how he can't
>> >> build and want to figure that out.
>> >
>> > I did already (r488244).  Apologies if that was too quick to figure out
>> > the issue.  I also don't grok why the build would not have worked from
>> > the DRLVM copy, but figured it makes sense to unify on a single set of
>> > includes for jni/jvmti.
>> >
>>
>> No worries - thanks for doing it.
>>
>> Yes, there's no argument there - we need one copy.  I'll go now and
>> clean up anything that depends on it, then remove the DRLVM copies.
>>
>> I just wanted to figure out why Ivan thought he couldn't build w/o this
>> change.
>>
>>
>> > For now the classlib version is a copy of the DRLVM files, giving folk
>> > time to migrate the build scripts etc.
>>
>> Yep
>>
>> geir
>>

Re: [jdktools] Building jdktools and JPDA component

Posted by Ivan Popov <iv...@gmail.com>.
Makefiles for JPDA component in jdktools pass the following include
directory to native compiler:

  -I$(HY_DRLVM)\jdk\include

which is expanded to

  <…>\trunk\working_vm\build\deploy\jdk\include

However, default build for working_vm creates DRLVM build in a
platform dependent directory:

  <…>\trunk\working_vm\build\win_ia32_msvc_debug\deploy\jdk\include

That's why header files from DRLVM were not found in my build. Do you
have DRLVM build in a platform independent directory?

We could fix makefiles to look into platform dependent DRLVM build
directory or look into VM sources (working_vm\vm\include). But, since
JNI/JVMTI headers are VM-independent, it's better to get them from
classlib, not from DRLVM.

However, now we have similar header files in classlib and DRLVM
sources and need to synchronize them in case of any changes. I still
think it's better to move these headers to common_resources/include
and use the same headers in both classlib and DRLVM builds.

Thanks.
Ivan


On 12/18/06, Geir Magnusson Jr. <ge...@pobox.com> wrote:
>
>
> Tim Ellison wrote:
> > Geir Magnusson Jr. wrote:
> >> If you haven't yet, let me know and I will - I'm confused how he can't
> >> build and want to figure that out.
> >
> > I did already (r488244).  Apologies if that was too quick to figure out
> > the issue.  I also don't grok why the build would not have worked from
> > the DRLVM copy, but figured it makes sense to unify on a single set of
> > includes for jni/jvmti.
> >
>
> No worries - thanks for doing it.
>
> Yes, there's no argument there - we need one copy.  I'll go now and
> clean up anything that depends on it, then remove the DRLVM copies.
>
> I just wanted to figure out why Ivan thought he couldn't build w/o this
> change.
>
>
> > For now the classlib version is a copy of the DRLVM files, giving folk
> > time to migrate the build scripts etc.
>
> Yep
>
> geir
>

Re: [jdktools] Building jdktools and JPDA component

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.

Tim Ellison wrote:
> Geir Magnusson Jr. wrote:
>> If you haven't yet, let me know and I will - I'm confused how he can't
>> build and want to figure that out.
> 
> I did already (r488244).  Apologies if that was too quick to figure out
> the issue.  I also don't grok why the build would not have worked from
> the DRLVM copy, but figured it makes sense to unify on a single set of
> includes for jni/jvmti.
> 

No worries - thanks for doing it.

Yes, there's no argument there - we need one copy.  I'll go now and 
clean up anything that depends on it, then remove the DRLVM copies.

I just wanted to figure out why Ivan thought he couldn't build w/o this 
change.


> For now the classlib version is a copy of the DRLVM files, giving folk
> time to migrate the build scripts etc.

Yep

geir

Re: [jdktools] Building jdktools and JPDA component

Posted by Tim Ellison <t....@gmail.com>.
Geir Magnusson Jr. wrote:
> If you haven't yet, let me know and I will - I'm confused how he can't
> build and want to figure that out.

I did already (r488244).  Apologies if that was too quick to figure out
the issue.  I also don't grok why the build would not have worked from
the DRLVM copy, but figured it makes sense to unify on a single set of
includes for jni/jvmti.

For now the classlib version is a copy of the DRLVM files, giving folk
time to migrate the build scripts etc.

Regards,
Tim

Re: [jdktools] Building jdktools and JPDA component

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
If you haven't yet, let me know and I will - I'm confused how he can't 
build and want to figure that out.

geir


Tim Ellison wrote:
> I'll do it.
> 
> Regards,
> Tim
> 
> Ivan Popov wrote:
>>> We already discussed that, I believe.  We'll replace the Classlib files
>>> w/ the DRLVM files and just go with those
>> Since nobody objects, could you please replace jni and jvmti headers
>> in classlib/luni module with DRLVM ones? It's still not possible to
>> build jdktools component because of broken jvmti.h in classlib.
>>
>> This requires removing jni.h/jniport.h and jvmti.h files from
>>
>>  working_classlib/modules/luni/src/main/native/include
>>
>> and copying there files jni.h/jni_types.h and jvmti.h/jvmti_types.h from
>>
>>  working_vm/vm/include
>>
>> I've also added to HARMONY-2180 patch for classlib build
>> 'deploy_new_jni_jvmti_headers_from_classlib_luni_module.patch' to
>> deploy new header files to
>>
>>  working_classlib/deploy/jdk/include
>>
>> while building classlib.
>>
>> I've checked this patch after moving files and this works well for me.
>> I was able to build jdktools with federated build.
>>
>> Thanks.
>> Ivan
>>
>> On 12/8/06, Geir Magnusson Jr. <ge...@pobox.com> wrote:
>>>
>>> Ivan Popov wrote:
>>>> I've tried to build jdktools with the latest changes in its build
>>>> system. On Linux build works well, but on Windows it fails mostly
>>>> because of lack of makefiles for JPDA module.
>>> Yep, was still working on that.
>>>
>>>> I've created missed makefiles for JPDA module, prepared patches and
>>>> added them to HARMONY-2180. With these patches jdktools component is
>>>> built successfully on both Windows and Linux. It can be built on top
>>>> on working_classlib as well as referencing to existing HDK by using
>>>> hy.hdk property. These makefiles are simple enough, but I'd like them
>>>> to be committed to svn, so we can build jdktools on both platforms and
>>>> can improve the overall build later.
>>> Yep.  Thanks
>>>
>>>> The only problem is that the required jvmti.h file is missed in HDK
>>>> and its classlib copy (provided in
>>>> working_classlib/deploy/jdk/include) does not support C++. I've just
>>>> manually replaced jvmti.h and jni.h/jniport.h in working_classlib with
>>>> jvmti.h/jvmti_types.h and jni.h/jni_types.h from DRLVM and was able to
>>>> build jdktools.
>>>>
>>>> We have to agree on which copies of jni.h/jvmti.h should be shared
>>>> between Harmony components and where they should be located. One of
>>>> possible solution is to move these files to the top-level component
>>>> common_resources.
>>> We already discussed that, I believe.  We'll replace the Classlib files
>>> w/ the DRLVM files and just go with those
>>>
>>>> One more problem with building jdktools is that 'ant clean' fails
>>>> reporting the following file was not deleted:
>>>>
>>>>
>>> working_jdktools\build\classes\org\apache\harmony\tools\ijh\anttask\Adapter.class
>>>
>>>>
>>>> However, second attempt to run 'ant clean' succeeds. I did not check
>>>> what's the problem with deleting this file.
>>>>
>>>> Thanks.
>>>> Ivan

Re: [jdktools] Building jdktools and JPDA component

Posted by Tim Ellison <t....@gmail.com>.
I'll do it.

Regards,
Tim

Ivan Popov wrote:
>> We already discussed that, I believe.  We'll replace the Classlib files
>> w/ the DRLVM files and just go with those
> 
> Since nobody objects, could you please replace jni and jvmti headers
> in classlib/luni module with DRLVM ones? It's still not possible to
> build jdktools component because of broken jvmti.h in classlib.
> 
> This requires removing jni.h/jniport.h and jvmti.h files from
> 
>  working_classlib/modules/luni/src/main/native/include
> 
> and copying there files jni.h/jni_types.h and jvmti.h/jvmti_types.h from
> 
>  working_vm/vm/include
> 
> I've also added to HARMONY-2180 patch for classlib build
> 'deploy_new_jni_jvmti_headers_from_classlib_luni_module.patch' to
> deploy new header files to
> 
>  working_classlib/deploy/jdk/include
> 
> while building classlib.
> 
> I've checked this patch after moving files and this works well for me.
> I was able to build jdktools with federated build.
> 
> Thanks.
> Ivan
> 
> On 12/8/06, Geir Magnusson Jr. <ge...@pobox.com> wrote:
>>
>>
>> Ivan Popov wrote:
>> > I've tried to build jdktools with the latest changes in its build
>> > system. On Linux build works well, but on Windows it fails mostly
>> > because of lack of makefiles for JPDA module.
>>
>> Yep, was still working on that.
>>
>> >
>> > I've created missed makefiles for JPDA module, prepared patches and
>> > added them to HARMONY-2180. With these patches jdktools component is
>> > built successfully on both Windows and Linux. It can be built on top
>> > on working_classlib as well as referencing to existing HDK by using
>> > hy.hdk property. These makefiles are simple enough, but I'd like them
>> > to be committed to svn, so we can build jdktools on both platforms and
>> > can improve the overall build later.
>>
>> Yep.  Thanks
>>
>> >
>> > The only problem is that the required jvmti.h file is missed in HDK
>> > and its classlib copy (provided in
>> > working_classlib/deploy/jdk/include) does not support C++. I've just
>> > manually replaced jvmti.h and jni.h/jniport.h in working_classlib with
>> > jvmti.h/jvmti_types.h and jni.h/jni_types.h from DRLVM and was able to
>> > build jdktools.
>> >
>> > We have to agree on which copies of jni.h/jvmti.h should be shared
>> > between Harmony components and where they should be located. One of
>> > possible solution is to move these files to the top-level component
>> > common_resources.
>>
>> We already discussed that, I believe.  We'll replace the Classlib files
>> w/ the DRLVM files and just go with those
>>
>> >
>> > One more problem with building jdktools is that 'ant clean' fails
>> > reporting the following file was not deleted:
>> >
>> > 
>> working_jdktools\build\classes\org\apache\harmony\tools\ijh\anttask\Adapter.class
>>
>> >
>> >
>> > However, second attempt to run 'ant clean' succeeds. I did not check
>> > what's the problem with deleting this file.
>> >
>> > Thanks.
>> > Ivan
>>
> 

Re: [jdktools] Building jdktools and JPDA component

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.

Ivan Popov wrote:
>> We already discussed that, I believe.  We'll replace the Classlib files
>> w/ the DRLVM files and just go with those
> 
> Since nobody objects, could you please replace jni and jvmti headers
> in classlib/luni module with DRLVM ones? It's still not possible to
> build jdktools component because of broken jvmti.h in classlib.

I don't understand this.  The jdktools should be pulling it out of drlvm 
  (for now), so there should be no trouble building

> 
> This requires removing jni.h/jniport.h and jvmti.h files from
> 
>  working_classlib/modules/luni/src/main/native/include
> 
> and copying there files jni.h/jni_types.h and jvmti.h/jvmti_types.h from
> 
>  working_vm/vm/include
> 
> I've also added to HARMONY-2180 patch for classlib build
> 'deploy_new_jni_jvmti_headers_from_classlib_luni_module.patch' to
> deploy new header files to
> 
>  working_classlib/deploy/jdk/include
> 
> while building classlib.
> 
> I've checked this patch after moving files and this works well for me.
> I was able to build jdktools with federated build.

I don't understand.  We've been able to build jdktools w/ federated 
build for a while now...

geir

> 
> Thanks.
> Ivan
> 
> On 12/8/06, Geir Magnusson Jr. <ge...@pobox.com> wrote:
>>
>>
>> Ivan Popov wrote:
>> > I've tried to build jdktools with the latest changes in its build
>> > system. On Linux build works well, but on Windows it fails mostly
>> > because of lack of makefiles for JPDA module.
>>
>> Yep, was still working on that.
>>
>> >
>> > I've created missed makefiles for JPDA module, prepared patches and
>> > added them to HARMONY-2180. With these patches jdktools component is
>> > built successfully on both Windows and Linux. It can be built on top
>> > on working_classlib as well as referencing to existing HDK by using
>> > hy.hdk property. These makefiles are simple enough, but I'd like them
>> > to be committed to svn, so we can build jdktools on both platforms and
>> > can improve the overall build later.
>>
>> Yep.  Thanks
>>
>> >
>> > The only problem is that the required jvmti.h file is missed in HDK
>> > and its classlib copy (provided in
>> > working_classlib/deploy/jdk/include) does not support C++. I've just
>> > manually replaced jvmti.h and jni.h/jniport.h in working_classlib with
>> > jvmti.h/jvmti_types.h and jni.h/jni_types.h from DRLVM and was able to
>> > build jdktools.
>> >
>> > We have to agree on which copies of jni.h/jvmti.h should be shared
>> > between Harmony components and where they should be located. One of
>> > possible solution is to move these files to the top-level component
>> > common_resources.
>>
>> We already discussed that, I believe.  We'll replace the Classlib files
>> w/ the DRLVM files and just go with those
>>
>> >
>> > One more problem with building jdktools is that 'ant clean' fails
>> > reporting the following file was not deleted:
>> >
>> >  
>> working_jdktools\build\classes\org\apache\harmony\tools\ijh\anttask\Adapter.class 
>>
>> >
>> >
>> > However, second attempt to run 'ant clean' succeeds. I did not check
>> > what's the problem with deleting this file.
>> >
>> > Thanks.
>> > Ivan
>>

Re: [jdktools] Building jdktools and JPDA component

Posted by Ivan Popov <iv...@gmail.com>.
> We already discussed that, I believe.  We'll replace the Classlib files
> w/ the DRLVM files and just go with those

Since nobody objects, could you please replace jni and jvmti headers
in classlib/luni module with DRLVM ones? It's still not possible to
build jdktools component because of broken jvmti.h in classlib.

This requires removing jni.h/jniport.h and jvmti.h files from

  working_classlib/modules/luni/src/main/native/include

and copying there files jni.h/jni_types.h and jvmti.h/jvmti_types.h from

  working_vm/vm/include

I've also added to HARMONY-2180 patch for classlib build
'deploy_new_jni_jvmti_headers_from_classlib_luni_module.patch' to
deploy new header files to

  working_classlib/deploy/jdk/include

while building classlib.

I've checked this patch after moving files and this works well for me.
I was able to build jdktools with federated build.

Thanks.
Ivan

On 12/8/06, Geir Magnusson Jr. <ge...@pobox.com> wrote:
>
>
> Ivan Popov wrote:
> > I've tried to build jdktools with the latest changes in its build
> > system. On Linux build works well, but on Windows it fails mostly
> > because of lack of makefiles for JPDA module.
>
> Yep, was still working on that.
>
> >
> > I've created missed makefiles for JPDA module, prepared patches and
> > added them to HARMONY-2180. With these patches jdktools component is
> > built successfully on both Windows and Linux. It can be built on top
> > on working_classlib as well as referencing to existing HDK by using
> > hy.hdk property. These makefiles are simple enough, but I'd like them
> > to be committed to svn, so we can build jdktools on both platforms and
> > can improve the overall build later.
>
> Yep.  Thanks
>
> >
> > The only problem is that the required jvmti.h file is missed in HDK
> > and its classlib copy (provided in
> > working_classlib/deploy/jdk/include) does not support C++. I've just
> > manually replaced jvmti.h and jni.h/jniport.h in working_classlib with
> > jvmti.h/jvmti_types.h and jni.h/jni_types.h from DRLVM and was able to
> > build jdktools.
> >
> > We have to agree on which copies of jni.h/jvmti.h should be shared
> > between Harmony components and where they should be located. One of
> > possible solution is to move these files to the top-level component
> > common_resources.
>
> We already discussed that, I believe.  We'll replace the Classlib files
> w/ the DRLVM files and just go with those
>
> >
> > One more problem with building jdktools is that 'ant clean' fails
> > reporting the following file was not deleted:
> >
> >  working_jdktools\build\classes\org\apache\harmony\tools\ijh\anttask\Adapter.class
> >
> >
> > However, second attempt to run 'ant clean' succeeds. I did not check
> > what's the problem with deleting this file.
> >
> > Thanks.
> > Ivan
>

Re: [jdktools] Building jdktools and JPDA component

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.

Ivan Popov wrote:
> I've tried to build jdktools with the latest changes in its build
> system. On Linux build works well, but on Windows it fails mostly
> because of lack of makefiles for JPDA module.

Yep, was still working on that.

> 
> I've created missed makefiles for JPDA module, prepared patches and
> added them to HARMONY-2180. With these patches jdktools component is
> built successfully on both Windows and Linux. It can be built on top
> on working_classlib as well as referencing to existing HDK by using
> hy.hdk property. These makefiles are simple enough, but I'd like them
> to be committed to svn, so we can build jdktools on both platforms and
> can improve the overall build later.

Yep.  Thanks

> 
> The only problem is that the required jvmti.h file is missed in HDK
> and its classlib copy (provided in
> working_classlib/deploy/jdk/include) does not support C++. I've just
> manually replaced jvmti.h and jni.h/jniport.h in working_classlib with
> jvmti.h/jvmti_types.h and jni.h/jni_types.h from DRLVM and was able to
> build jdktools.
> 
> We have to agree on which copies of jni.h/jvmti.h should be shared
> between Harmony components and where they should be located. One of
> possible solution is to move these files to the top-level component
> common_resources.

We already discussed that, I believe.  We'll replace the Classlib files 
w/ the DRLVM files and just go with those

> 
> One more problem with building jdktools is that 'ant clean' fails
> reporting the following file was not deleted:
> 
>  working_jdktools\build\classes\org\apache\harmony\tools\ijh\anttask\Adapter.class 
> 
> 
> However, second attempt to run 'ant clean' succeeds. I did not check
> what's the problem with deleting this file.
> 
> Thanks.
> Ivan