Building hsdis?

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Building hsdis?

Ted Neward
Hey, all. Been trying for a day and a half now to build the hsdis disassembly plugin in jdk/src/utils/hsdis, with no luck. (Tried first off of the JDK8u source, then tried again with the JDK source, no love either way.)

 

Is there a definitive page (wiki, blog, etc) that describes how to build hsdis on different platforms? I’m trying right now in an Ubuntu 16 VM, but would also want to build on Windows and/or macOS. All the Web is showing me is posts from a few years ago that don’t seem to address some of the issues I’m running into.

 

I can copy build output if it’ll help, but wanted to go do my homework before doing that. :-)

 

Ted Neward

Author, Speaker, Mentor

http://www.newardassociates.com

t: @tedneward | m: (425) 647-4526

Reply | Threaded
Open this post in threaded view
|

Re: Building hsdis?

david buck
Hi Ted!

No blog to point you to, but building on non-Windows platforms should be
pretty painless these days.

 > then tried again with the JDK source

Yes, that is the one to use. The makefile had a number of issues that I
fixed recently but have not (yet) backported to 8u-dev.

I was able to build on an Ubuntu 16.4 (AMD64) using the following
commands (output omitted):

===
hg clone http://hg.openjdk.java.net/jdk/hs
wget http://ftp.gnu.org/gnu/binutils/binutils-2.28.1.tar.gz
tar xf binutils-2.28.1.tar.gz
cd hs/src/utils/hsdis/
make all64 BINUTILS=../../../../binutils-2.28.1
===

The above steps resulted in the plugin being generated here:

hs/src/utils/hsdis/build/linux-amd64/hsdis-amd64.so

Note the version of binutils I used, there is some issue with 2.29 and
later versions that prevents the build from succeeding. I hope to
investigate if I get some extra bandwidth next year. Also, avoiding
"cross compiling" is probably a good idea. If you want to build a 32-bit
plugin, it is probably simpler to just build it in a 32-bit environment.

Let us know once you get this working. macOS is pretty similar. Then we
can take a crack at a Windows build if you are up for it.

Cheers,
-Buck

On 2017/12/20 7:13, Ted Neward wrote:

> Hey, all. Been trying for a day and a half now to build the hsdis disassembly plugin in jdk/src/utils/hsdis, with no luck. (Tried first off of the JDK8u source, then tried again with the JDK source, no love either way.)
>
>  
>
> Is there a definitive page (wiki, blog, etc) that describes how to build hsdis on different platforms? I’m trying right now in an Ubuntu 16 VM, but would also want to build on Windows and/or macOS. All the Web is showing me is posts from a few years ago that don’t seem to address some of the issues I’m running into.
>
>  
>
> I can copy build output if it’ll help, but wanted to go do my homework before doing that. :-)
>
>  
>
> Ted Neward
>
> Author, Speaker, Mentor
>
> http://www.newardassociates.com
>
> t: @tedneward | m: (425) 647-4526
>
Reply | Threaded
Open this post in threaded view
|

Re: Building hsdis?

Ted Neward
I will give this a shot tomorrow; I can see two things already that I did that was different, the version of binutils (I was using 2.32) and the make command (I was doing make BINUTILS=<binutils_dir> ARCH=amd64 from the hsdis directory itself inside the jdk source. Do I need to clone the hs repo on its own? Or can I use the bits buried inside of jdk/src/... (sorry I can't remember the full path off the top of my head)?

Once we confirm that this works, I'll work with you on Windows--fortunately I know Windows better than Ubuntu, so hopefully that helps. :-) (And let's be really clear, I *really* don't know what's going on with the texinfo and all that stuff.)

Ted Neward
Author, Speaker, Mentor
http://www.newardassociates.com
t: @tedneward | m: (425) 647-4526

On 12/20/17, 12:13 AM, "David Buck" <[hidden email]> wrote:

    Hi Ted!
   
    No blog to point you to, but building on non-Windows platforms should be
    pretty painless these days.
   
     > then tried again with the JDK source
   
    Yes, that is the one to use. The makefile had a number of issues that I
    fixed recently but have not (yet) backported to 8u-dev.
   
    I was able to build on an Ubuntu 16.4 (AMD64) using the following
    commands (output omitted):
   
    ===
    hg clone http://hg.openjdk.java.net/jdk/hs
    wget http://ftp.gnu.org/gnu/binutils/binutils-2.28.1.tar.gz
    tar xf binutils-2.28.1.tar.gz
    cd hs/src/utils/hsdis/
    make all64 BINUTILS=../../../../binutils-2.28.1
    ===
   
    The above steps resulted in the plugin being generated here:
   
    hs/src/utils/hsdis/build/linux-amd64/hsdis-amd64.so
   
    Note the version of binutils I used, there is some issue with 2.29 and
    later versions that prevents the build from succeeding. I hope to
    investigate if I get some extra bandwidth next year. Also, avoiding
    "cross compiling" is probably a good idea. If you want to build a 32-bit
    plugin, it is probably simpler to just build it in a 32-bit environment.
   
    Let us know once you get this working. macOS is pretty similar. Then we
    can take a crack at a Windows build if you are up for it.
   
    Cheers,
    -Buck
   
    On 2017/12/20 7:13, Ted Neward wrote:
    > Hey, all. Been trying for a day and a half now to build the hsdis disassembly plugin in jdk/src/utils/hsdis, with no luck. (Tried first off of the JDK8u source, then tried again with the JDK source, no love either way.)
    >
    >  
    >
    > Is there a definitive page (wiki, blog, etc) that describes how to build hsdis on different platforms? I’m trying right now in an Ubuntu 16 VM, but would also want to build on Windows and/or macOS. All the Web is showing me is posts from a few years ago that don’t seem to address some of the issues I’m running into.
    >
    >  
    >
    > I can copy build output if it’ll help, but wanted to go do my homework before doing that. :-)
    >
    >  
    >
    > Ted Neward
    >
    > Author, Speaker, Mentor
    >
    > http://www.newardassociates.com
    >
    > t: @tedneward | m: (425) 647-4526
    >
   


Reply | Threaded
Open this post in threaded view
|

Re: Building hsdis?

david buck
Hi Ted!

 > the version of binutils (I was using 2.32)

Not sure what that is. Latest binutils is 2.29.1.

 > I was doing make BINUTILS=<binutils_dir> ARCH=amd64

That should also work, but I'd still keep things simple and just specify
the "all64" make target. As always, whatever is documented in the README
file should probably be your default choice.

 > Do I need to clone the hs repo on its own? Or can I use the bits
 > buried inside of jdk/src/...

No need to clone jdk/hs. I was just cloning it out of habit. All you
need is the contents of the hsdir directory (from either repository).
There is not much active work done on hsdis, so in practice you are
unlikely to notice a difference between the jdk and hs repositories.

Cheers,
-Buck

On 2017/12/20 17:31, Ted Neward wrote:

> I will give this a shot tomorrow; I can see two things already that I did that was different, the version of binutils (I was using 2.32) and the make command (I was doing make BINUTILS=<binutils_dir> ARCH=amd64 from the hsdis directory itself inside the jdk source. Do I need to clone the hs repo on its own? Or can I use the bits buried inside of jdk/src/... (sorry I can't remember the full path off the top of my head)?
>
> Once we confirm that this works, I'll work with you on Windows--fortunately I know Windows better than Ubuntu, so hopefully that helps. :-) (And let's be really clear, I *really* don't know what's going on with the texinfo and all that stuff.)
>
> Ted Neward
> Author, Speaker, Mentor
> http://www.newardassociates.com
> t: @tedneward | m: (425) 647-4526
>
> On 12/20/17, 12:13 AM, "David Buck" <[hidden email]> wrote:
>
>      Hi Ted!
>      
>      No blog to point you to, but building on non-Windows platforms should be
>      pretty painless these days.
>      
>       > then tried again with the JDK source
>      
>      Yes, that is the one to use. The makefile had a number of issues that I
>      fixed recently but have not (yet) backported to 8u-dev.
>      
>      I was able to build on an Ubuntu 16.4 (AMD64) using the following
>      commands (output omitted):
>      
>      ===
>      hg clone http://hg.openjdk.java.net/jdk/hs
>      wget http://ftp.gnu.org/gnu/binutils/binutils-2.28.1.tar.gz
>      tar xf binutils-2.28.1.tar.gz
>      cd hs/src/utils/hsdis/
>      make all64 BINUTILS=../../../../binutils-2.28.1
>      ===
>      
>      The above steps resulted in the plugin being generated here:
>      
>      hs/src/utils/hsdis/build/linux-amd64/hsdis-amd64.so
>      
>      Note the version of binutils I used, there is some issue with 2.29 and
>      later versions that prevents the build from succeeding. I hope to
>      investigate if I get some extra bandwidth next year. Also, avoiding
>      "cross compiling" is probably a good idea. If you want to build a 32-bit
>      plugin, it is probably simpler to just build it in a 32-bit environment.
>      
>      Let us know once you get this working. macOS is pretty similar. Then we
>      can take a crack at a Windows build if you are up for it.
>      
>      Cheers,
>      -Buck
>      
>      On 2017/12/20 7:13, Ted Neward wrote:
>      > Hey, all. Been trying for a day and a half now to build the hsdis disassembly plugin in jdk/src/utils/hsdis, with no luck. (Tried first off of the JDK8u source, then tried again with the JDK source, no love either way.)
>      >
>      >
>      >
>      > Is there a definitive page (wiki, blog, etc) that describes how to build hsdis on different platforms? I’m trying right now in an Ubuntu 16 VM, but would also want to build on Windows and/or macOS. All the Web is showing me is posts from a few years ago that don’t seem to address some of the issues I’m running into.
>      >
>      >
>      >
>      > I can copy build output if it’ll help, but wanted to go do my homework before doing that. :-)
>      >
>      >
>      >
>      > Ted Neward
>      >
>      > Author, Speaker, Mentor
>      >
>      > http://www.newardassociates.com
>      >
>      > t: @tedneward | m: (425) 647-4526
>      >
>      
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Building hsdis?

Ted Neward
Sorry--I was cribbing from here (https://www.chrisnewland.com/building-hsdis-on-linux-amd64-on-debian-369) and it references using 2.23, which memory transposed to 2.32, I think.

I'm not sure what was going wrong (well, I can tell you what the errors were, but I dunno what was causing them), but I want to work from something we know works (a la your instructions) and hopefully that'll catch any environmental differences that might be causing any problems. :-)

The README was a little confusing when I was going through it; I'll try to go back over it tomorrow and try to identify which parts left me confused, in case it's something that needs correcting. (I hold the possibility that I'm just an idiot as a very strong possibility.)

BTW, I'm sure there's a good reason for this, but why doesn't OpenJDK/Oracle offer pre-built versions of hsdis for a variety of common platforms? Is there a licensing issue?

I'll give this a spin tomorrow and fire back with any issues/questions. Thanks!

Ted Neward
Author, Speaker, Mentor
http://www.newardassociates.com
t: @tedneward | m: (425) 647-4526

On 12/20/17, 12:54 AM, "David Buck" <[hidden email]> wrote:

    Hi Ted!
   
     > the version of binutils (I was using 2.32)
   
    Not sure what that is. Latest binutils is 2.29.1.
   
     > I was doing make BINUTILS=<binutils_dir> ARCH=amd64
   
    That should also work, but I'd still keep things simple and just specify
    the "all64" make target. As always, whatever is documented in the README
    file should probably be your default choice.
   
     > Do I need to clone the hs repo on its own? Or can I use the bits
     > buried inside of jdk/src/...
   
    No need to clone jdk/hs. I was just cloning it out of habit. All you
    need is the contents of the hsdir directory (from either repository).
    There is not much active work done on hsdis, so in practice you are
    unlikely to notice a difference between the jdk and hs repositories.
   
    Cheers,
    -Buck
   
    On 2017/12/20 17:31, Ted Neward wrote:
    > I will give this a shot tomorrow; I can see two things already that I did that was different, the version of binutils (I was using 2.32) and the make command (I was doing make BINUTILS=<binutils_dir> ARCH=amd64 from the hsdis directory itself inside the jdk source. Do I need to clone the hs repo on its own? Or can I use the bits buried inside of jdk/src/... (sorry I can't remember the full path off the top of my head)?
    >
    > Once we confirm that this works, I'll work with you on Windows--fortunately I know Windows better than Ubuntu, so hopefully that helps. :-) (And let's be really clear, I *really* don't know what's going on with the texinfo and all that stuff.)
    >
    > Ted Neward
    > Author, Speaker, Mentor
    > http://www.newardassociates.com
    > t: @tedneward | m: (425) 647-4526
    >
    > On 12/20/17, 12:13 AM, "David Buck" <[hidden email]> wrote:
    >
    >      Hi Ted!
    >      
    >      No blog to point you to, but building on non-Windows platforms should be
    >      pretty painless these days.
    >      
    >       > then tried again with the JDK source
    >      
    >      Yes, that is the one to use. The makefile had a number of issues that I
    >      fixed recently but have not (yet) backported to 8u-dev.
    >      
    >      I was able to build on an Ubuntu 16.4 (AMD64) using the following
    >      commands (output omitted):
    >      
    >      ===
    >      hg clone http://hg.openjdk.java.net/jdk/hs
    >      wget http://ftp.gnu.org/gnu/binutils/binutils-2.28.1.tar.gz
    >      tar xf binutils-2.28.1.tar.gz
    >      cd hs/src/utils/hsdis/
    >      make all64 BINUTILS=../../../../binutils-2.28.1
    >      ===
    >      
    >      The above steps resulted in the plugin being generated here:
    >      
    >      hs/src/utils/hsdis/build/linux-amd64/hsdis-amd64.so
    >      
    >      Note the version of binutils I used, there is some issue with 2.29 and
    >      later versions that prevents the build from succeeding. I hope to
    >      investigate if I get some extra bandwidth next year. Also, avoiding
    >      "cross compiling" is probably a good idea. If you want to build a 32-bit
    >      plugin, it is probably simpler to just build it in a 32-bit environment.
    >      
    >      Let us know once you get this working. macOS is pretty similar. Then we
    >      can take a crack at a Windows build if you are up for it.
    >      
    >      Cheers,
    >      -Buck
    >      
    >      On 2017/12/20 7:13, Ted Neward wrote:
    >      > Hey, all. Been trying for a day and a half now to build the hsdis disassembly plugin in jdk/src/utils/hsdis, with no luck. (Tried first off of the JDK8u source, then tried again with the JDK source, no love either way.)
    >      >
    >      >
    >      >
    >      > Is there a definitive page (wiki, blog, etc) that describes how to build hsdis on different platforms? I’m trying right now in an Ubuntu 16 VM, but would also want to build on Windows and/or macOS. All the Web is showing me is posts from a few years ago that don’t seem to address some of the issues I’m running into.
    >      >
    >      >
    >      >
    >      > I can copy build output if it’ll help, but wanted to go do my homework before doing that. :-)
    >      >
    >      >
    >      >
    >      > Ted Neward
    >      >
    >      > Author, Speaker, Mentor
    >      >
    >      > http://www.newardassociates.com
    >      >
    >      > t: @tedneward | m: (425) 647-4526
    >      >
    >      
    >
    >
   


Reply | Threaded
Open this post in threaded view
|

Re: Building hsdis?

david buck
Hi Ted!

 > BTW, I'm sure there's a good reason for this, but why doesn't
OpenJDK/Oracle offer pre-built versions of hsdis for a variety of common
platforms? Is there a licensing issue?

Yes, binutils is GPL 3, and OpenJDK is under GPL 2. We are very aware of
this as a pain point and are looking to improve things in the future. It
is simply a matter of bandwidth at the moment.

Cheers,
-Buck

On 2017/12/20 18:35, Ted Neward wrote:

> Sorry--I was cribbing from here (https://www.chrisnewland.com/building-hsdis-on-linux-amd64-on-debian-369) and it references using 2.23, which memory transposed to 2.32, I think.
>
> I'm not sure what was going wrong (well, I can tell you what the errors were, but I dunno what was causing them), but I want to work from something we know works (a la your instructions) and hopefully that'll catch any environmental differences that might be causing any problems. :-)
>
> The README was a little confusing when I was going through it; I'll try to go back over it tomorrow and try to identify which parts left me confused, in case it's something that needs correcting. (I hold the possibility that I'm just an idiot as a very strong possibility.)
>
> BTW, I'm sure there's a good reason for this, but why doesn't OpenJDK/Oracle offer pre-built versions of hsdis for a variety of common platforms? Is there a licensing issue?
>
> I'll give this a spin tomorrow and fire back with any issues/questions. Thanks!
>
> Ted Neward
> Author, Speaker, Mentor
> http://www.newardassociates.com
> t: @tedneward | m: (425) 647-4526
>
> On 12/20/17, 12:54 AM, "David Buck" <[hidden email]> wrote:
>
>      Hi Ted!
>      
>       > the version of binutils (I was using 2.32)
>      
>      Not sure what that is. Latest binutils is 2.29.1.
>      
>       > I was doing make BINUTILS=<binutils_dir> ARCH=amd64
>      
>      That should also work, but I'd still keep things simple and just specify
>      the "all64" make target. As always, whatever is documented in the README
>      file should probably be your default choice.
>      
>       > Do I need to clone the hs repo on its own? Or can I use the bits
>       > buried inside of jdk/src/...
>      
>      No need to clone jdk/hs. I was just cloning it out of habit. All you
>      need is the contents of the hsdir directory (from either repository).
>      There is not much active work done on hsdis, so in practice you are
>      unlikely to notice a difference between the jdk and hs repositories.
>      
>      Cheers,
>      -Buck
>      
>      On 2017/12/20 17:31, Ted Neward wrote:
>      > I will give this a shot tomorrow; I can see two things already that I did that was different, the version of binutils (I was using 2.32) and the make command (I was doing make BINUTILS=<binutils_dir> ARCH=amd64 from the hsdis directory itself inside the jdk source. Do I need to clone the hs repo on its own? Or can I use the bits buried inside of jdk/src/... (sorry I can't remember the full path off the top of my head)?
>      >
>      > Once we confirm that this works, I'll work with you on Windows--fortunately I know Windows better than Ubuntu, so hopefully that helps. :-) (And let's be really clear, I *really* don't know what's going on with the texinfo and all that stuff.)
>      >
>      > Ted Neward
>      > Author, Speaker, Mentor
>      > http://www.newardassociates.com
>      > t: @tedneward | m: (425) 647-4526
>      >
>      > On 12/20/17, 12:13 AM, "David Buck" <[hidden email]> wrote:
>      >
>      >      Hi Ted!
>      >
>      >      No blog to point you to, but building on non-Windows platforms should be
>      >      pretty painless these days.
>      >
>      >       > then tried again with the JDK source
>      >
>      >      Yes, that is the one to use. The makefile had a number of issues that I
>      >      fixed recently but have not (yet) backported to 8u-dev.
>      >
>      >      I was able to build on an Ubuntu 16.4 (AMD64) using the following
>      >      commands (output omitted):
>      >
>      >      ===
>      >      hg clone http://hg.openjdk.java.net/jdk/hs
>      >      wget http://ftp.gnu.org/gnu/binutils/binutils-2.28.1.tar.gz
>      >      tar xf binutils-2.28.1.tar.gz
>      >      cd hs/src/utils/hsdis/
>      >      make all64 BINUTILS=../../../../binutils-2.28.1
>      >      ===
>      >
>      >      The above steps resulted in the plugin being generated here:
>      >
>      >      hs/src/utils/hsdis/build/linux-amd64/hsdis-amd64.so
>      >
>      >      Note the version of binutils I used, there is some issue with 2.29 and
>      >      later versions that prevents the build from succeeding. I hope to
>      >      investigate if I get some extra bandwidth next year. Also, avoiding
>      >      "cross compiling" is probably a good idea. If you want to build a 32-bit
>      >      plugin, it is probably simpler to just build it in a 32-bit environment.
>      >
>      >      Let us know once you get this working. macOS is pretty similar. Then we
>      >      can take a crack at a Windows build if you are up for it.
>      >
>      >      Cheers,
>      >      -Buck
>      >
>      >      On 2017/12/20 7:13, Ted Neward wrote:
>      >      > Hey, all. Been trying for a day and a half now to build the hsdis disassembly plugin in jdk/src/utils/hsdis, with no luck. (Tried first off of the JDK8u source, then tried again with the JDK source, no love either way.)
>      >      >
>      >      >
>      >      >
>      >      > Is there a definitive page (wiki, blog, etc) that describes how to build hsdis on different platforms? I’m trying right now in an Ubuntu 16 VM, but would also want to build on Windows and/or macOS. All the Web is showing me is posts from a few years ago that don’t seem to address some of the issues I’m running into.
>      >      >
>      >      >
>      >      >
>      >      > I can copy build output if it’ll help, but wanted to go do my homework before doing that. :-)
>      >      >
>      >      >
>      >      >
>      >      > Ted Neward
>      >      >
>      >      > Author, Speaker, Mentor
>      >      >
>      >      > http://www.newardassociates.com
>      >      >
>      >      > t: @tedneward | m: (425) 647-4526
>      >      >
>      >
>      >
>      >
>      
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Building hsdis?

Volker Simonis
On Wed, Dec 20, 2017 at 10:40 AM, David Buck <[hidden email]> wrote:

> Hi Ted!
>
>> BTW, I'm sure there's a good reason for this, but why doesn't
>> OpenJDK/Oracle offer pre-built versions of hsdis for a variety of common
>> platforms? Is there a licensing issue?
>
> Yes, binutils is GPL 3, and OpenJDK is under GPL 2. We are very aware of
> this as a pain point and are looking to improve things in the future. It is
> simply a matter of bandwidth at the moment.
>

Yes, that's exactly the issue. And it was communicated to the OpenJDK
Governing Board more than two and a half years ago (see my mail
"Providing 'hsdis' binaries not possible because of GPLv2/GPLv3
license clash" from May 2015 [1]) and since then reiterated several
times. I'll plan to raise this issue again at the public GB meeting at
FOSDEM in February next year - however with very little hope that it
will be resolved :(

Regards,
Volker

[1] http://mail.openjdk.java.net/pipermail/discuss/2015-May/003754.html

> Cheers,
> -Buck
>
>
> On 2017/12/20 18:35, Ted Neward wrote:
>>
>> Sorry--I was cribbing from here
>> (https://www.chrisnewland.com/building-hsdis-on-linux-amd64-on-debian-369)
>> and it references using 2.23, which memory transposed to 2.32, I think.
>>
>> I'm not sure what was going wrong (well, I can tell you what the errors
>> were, but I dunno what was causing them), but I want to work from something
>> we know works (a la your instructions) and hopefully that'll catch any
>> environmental differences that might be causing any problems. :-)
>>
>> The README was a little confusing when I was going through it; I'll try to
>> go back over it tomorrow and try to identify which parts left me confused,
>> in case it's something that needs correcting. (I hold the possibility that
>> I'm just an idiot as a very strong possibility.)
>>
>> BTW, I'm sure there's a good reason for this, but why doesn't
>> OpenJDK/Oracle offer pre-built versions of hsdis for a variety of common
>> platforms? Is there a licensing issue?
>>
>> I'll give this a spin tomorrow and fire back with any issues/questions.
>> Thanks!
>>
>> Ted Neward
>> Author, Speaker, Mentor
>> http://www.newardassociates.com
>> t: @tedneward | m: (425) 647-4526
>>
>> On 12/20/17, 12:54 AM, "David Buck" <[hidden email]> wrote:
>>
>>      Hi Ted!
>>            > the version of binutils (I was using 2.32)
>>           Not sure what that is. Latest binutils is 2.29.1.
>>            > I was doing make BINUTILS=<binutils_dir> ARCH=amd64
>>           That should also work, but I'd still keep things simple and just
>> specify
>>      the "all64" make target. As always, whatever is documented in the
>> README
>>      file should probably be your default choice.
>>            > Do I need to clone the hs repo on its own? Or can I use the
>> bits
>>       > buried inside of jdk/src/...
>>           No need to clone jdk/hs. I was just cloning it out of habit. All
>> you
>>      need is the contents of the hsdir directory (from either repository).
>>      There is not much active work done on hsdis, so in practice you are
>>      unlikely to notice a difference between the jdk and hs repositories.
>>           Cheers,
>>      -Buck
>>           On 2017/12/20 17:31, Ted Neward wrote:
>>      > I will give this a shot tomorrow; I can see two things already that
>> I did that was different, the version of binutils (I was using 2.32) and the
>> make command (I was doing make BINUTILS=<binutils_dir> ARCH=amd64 from the
>> hsdis directory itself inside the jdk source. Do I need to clone the hs repo
>> on its own? Or can I use the bits buried inside of jdk/src/... (sorry I
>> can't remember the full path off the top of my head)?
>>      >
>>      > Once we confirm that this works, I'll work with you on
>> Windows--fortunately I know Windows better than Ubuntu, so hopefully that
>> helps. :-) (And let's be really clear, I *really* don't know what's going on
>> with the texinfo and all that stuff.)
>>      >
>>      > Ted Neward
>>      > Author, Speaker, Mentor
>>      > http://www.newardassociates.com
>>      > t: @tedneward | m: (425) 647-4526
>>      >
>>      > On 12/20/17, 12:13 AM, "David Buck" <[hidden email]> wrote:
>>      >
>>      >      Hi Ted!
>>      >
>>      >      No blog to point you to, but building on non-Windows platforms
>> should be
>>      >      pretty painless these days.
>>      >
>>      >       > then tried again with the JDK source
>>      >
>>      >      Yes, that is the one to use. The makefile had a number of
>> issues that I
>>      >      fixed recently but have not (yet) backported to 8u-dev.
>>      >
>>      >      I was able to build on an Ubuntu 16.4 (AMD64) using the
>> following
>>      >      commands (output omitted):
>>      >
>>      >      ===
>>      >      hg clone http://hg.openjdk.java.net/jdk/hs
>>      >      wget http://ftp.gnu.org/gnu/binutils/binutils-2.28.1.tar.gz
>>      >      tar xf binutils-2.28.1.tar.gz
>>      >      cd hs/src/utils/hsdis/
>>      >      make all64 BINUTILS=../../../../binutils-2.28.1
>>      >      ===
>>      >
>>      >      The above steps resulted in the plugin being generated here:
>>      >
>>      >      hs/src/utils/hsdis/build/linux-amd64/hsdis-amd64.so
>>      >
>>      >      Note the version of binutils I used, there is some issue with
>> 2.29 and
>>      >      later versions that prevents the build from succeeding. I hope
>> to
>>      >      investigate if I get some extra bandwidth next year. Also,
>> avoiding
>>      >      "cross compiling" is probably a good idea. If you want to
>> build a 32-bit
>>      >      plugin, it is probably simpler to just build it in a 32-bit
>> environment.
>>      >
>>      >      Let us know once you get this working. macOS is pretty
>> similar. Then we
>>      >      can take a crack at a Windows build if you are up for it.
>>      >
>>      >      Cheers,
>>      >      -Buck
>>      >
>>      >      On 2017/12/20 7:13, Ted Neward wrote:
>>      >      > Hey, all. Been trying for a day and a half now to build the
>> hsdis disassembly plugin in jdk/src/utils/hsdis, with no luck. (Tried first
>> off of the JDK8u source, then tried again with the JDK source, no love
>> either way.)
>>      >      >
>>      >      >
>>      >      >
>>      >      > Is there a definitive page (wiki, blog, etc) that describes
>> how to build hsdis on different platforms? I’m trying right now in an Ubuntu
>> 16 VM, but would also want to build on Windows and/or macOS. All the Web is
>> showing me is posts from a few years ago that don’t seem to address some of
>> the issues I’m running into.
>>      >      >
>>      >      >
>>      >      >
>>      >      > I can copy build output if it’ll help, but wanted to go do
>> my homework before doing that. :-)
>>      >      >
>>      >      >
>>      >      >
>>      >      > Ted Neward
>>      >      >
>>      >      > Author, Speaker, Mentor
>>      >      >
>>      >      > http://www.newardassociates.com
>>      >      >
>>      >      > t: @tedneward | m: (425) 647-4526
>>      >      >
>>      >
>>      >
>>      >
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Building hsdis?

Ted Neward
In reply to this post by david buck
OK, built flawlessly.

Couple of notes:

(*) When I tried to do "make both", as mentioned in the README, it failed in the configure step: "C compiler cannot create executables". This was after "make all64" worked flawlessly. (Both have the BINUTILS variable set via the command-line; I'm eliding it for brevity.)

(*) The Windows part of the build instructions in the README was I think what was confusing, but as an editor, I would probably suggest a bit of reordering/rewording to the parts before that to make it a little easier to grok. Happy to make some suggestions there if desired, but not critical.

(*) Now, how should we proceed trying to build a Windows version of this? The README mentions both Cygwin and Ming, so I'm not sure what setup you're expecting the Windows developer to have on their machine.

Ted Neward
Author, Speaker, Mentor
http://www.newardassociates.com
t: @tedneward | m: (425) 647-4526

On 12/20/17, 12:13 AM, "David Buck" <[hidden email]> wrote:

    Hi Ted!
   
    No blog to point you to, but building on non-Windows platforms should be
    pretty painless these days.
   
     > then tried again with the JDK source
   
    Yes, that is the one to use. The makefile had a number of issues that I
    fixed recently but have not (yet) backported to 8u-dev.
   
    I was able to build on an Ubuntu 16.4 (AMD64) using the following
    commands (output omitted):
   
    ===
    hg clone http://hg.openjdk.java.net/jdk/hs
    wget http://ftp.gnu.org/gnu/binutils/binutils-2.28.1.tar.gz
    tar xf binutils-2.28.1.tar.gz
    cd hs/src/utils/hsdis/
    make all64 BINUTILS=../../../../binutils-2.28.1
    ===
   
    The above steps resulted in the plugin being generated here:
   
    hs/src/utils/hsdis/build/linux-amd64/hsdis-amd64.so
   
    Note the version of binutils I used, there is some issue with 2.29 and
    later versions that prevents the build from succeeding. I hope to
    investigate if I get some extra bandwidth next year. Also, avoiding
    "cross compiling" is probably a good idea. If you want to build a 32-bit
    plugin, it is probably simpler to just build it in a 32-bit environment.
   
    Let us know once you get this working. macOS is pretty similar. Then we
    can take a crack at a Windows build if you are up for it.
   
    Cheers,
    -Buck
   
    On 2017/12/20 7:13, Ted Neward wrote:
    > Hey, all. Been trying for a day and a half now to build the hsdis disassembly plugin in jdk/src/utils/hsdis, with no luck. (Tried first off of the JDK8u source, then tried again with the JDK source, no love either way.)
    >
    >  
    >
    > Is there a definitive page (wiki, blog, etc) that describes how to build hsdis on different platforms? I’m trying right now in an Ubuntu 16 VM, but would also want to build on Windows and/or macOS. All the Web is showing me is posts from a few years ago that don’t seem to address some of the issues I’m running into.
    >
    >  
    >
    > I can copy build output if it’ll help, but wanted to go do my homework before doing that. :-)
    >
    >  
    >
    > Ted Neward
    >
    > Author, Speaker, Mentor
    >
    > http://www.newardassociates.com
    >
    > t: @tedneward | m: (425) 647-4526
    >
   


Reply | Threaded
Open this post in threaded view
|

Re: Building hsdis?

david buck
Hi Ted!

For Windows, I have found the instructions listed here to be the most
helpful:

https://dropzone.nfshost.com/hsdis.htm

I recommend building on Cygwin as described above. You will need the
MinGW packages installed in your Cygwin environment (also described in
the above post).

We realize the README could use some love. It is on my radar, but again,
bandwidth is a constraint at the moment

Cheers,
-Buck

On 2017/12/21 11:27, Ted Neward wrote:

> OK, built flawlessly.
>
> Couple of notes:
>
> (*) When I tried to do "make both", as mentioned in the README, it failed in the configure step: "C compiler cannot create executables". This was after "make all64" worked flawlessly. (Both have the BINUTILS variable set via the command-line; I'm eliding it for brevity.)
>
> (*) The Windows part of the build instructions in the README was I think what was confusing, but as an editor, I would probably suggest a bit of reordering/rewording to the parts before that to make it a little easier to grok. Happy to make some suggestions there if desired, but not critical.
>
> (*) Now, how should we proceed trying to build a Windows version of this? The README mentions both Cygwin and Ming, so I'm not sure what setup you're expecting the Windows developer to have on their machine.
>
> Ted Neward
> Author, Speaker, Mentor
> http://www.newardassociates.com
> t: @tedneward | m: (425) 647-4526
>
> On 12/20/17, 12:13 AM, "David Buck" <[hidden email]> wrote:
>
>      Hi Ted!
>      
>      No blog to point you to, but building on non-Windows platforms should be
>      pretty painless these days.
>      
>       > then tried again with the JDK source
>      
>      Yes, that is the one to use. The makefile had a number of issues that I
>      fixed recently but have not (yet) backported to 8u-dev.
>      
>      I was able to build on an Ubuntu 16.4 (AMD64) using the following
>      commands (output omitted):
>      
>      ===
>      hg clone http://hg.openjdk.java.net/jdk/hs
>      wget http://ftp.gnu.org/gnu/binutils/binutils-2.28.1.tar.gz
>      tar xf binutils-2.28.1.tar.gz
>      cd hs/src/utils/hsdis/
>      make all64 BINUTILS=../../../../binutils-2.28.1
>      ===
>      
>      The above steps resulted in the plugin being generated here:
>      
>      hs/src/utils/hsdis/build/linux-amd64/hsdis-amd64.so
>      
>      Note the version of binutils I used, there is some issue with 2.29 and
>      later versions that prevents the build from succeeding. I hope to
>      investigate if I get some extra bandwidth next year. Also, avoiding
>      "cross compiling" is probably a good idea. If you want to build a 32-bit
>      plugin, it is probably simpler to just build it in a 32-bit environment.
>      
>      Let us know once you get this working. macOS is pretty similar. Then we
>      can take a crack at a Windows build if you are up for it.
>      
>      Cheers,
>      -Buck
>      
>      On 2017/12/20 7:13, Ted Neward wrote:
>      > Hey, all. Been trying for a day and a half now to build the hsdis disassembly plugin in jdk/src/utils/hsdis, with no luck. (Tried first off of the JDK8u source, then tried again with the JDK source, no love either way.)
>      >
>      >
>      >
>      > Is there a definitive page (wiki, blog, etc) that describes how to build hsdis on different platforms? I’m trying right now in an Ubuntu 16 VM, but would also want to build on Windows and/or macOS. All the Web is showing me is posts from a few years ago that don’t seem to address some of the issues I’m running into.
>      >
>      >
>      >
>      > I can copy build output if it’ll help, but wanted to go do my homework before doing that. :-)
>      >
>      >
>      >
>      > Ted Neward
>      >
>      > Author, Speaker, Mentor
>      >
>      > http://www.newardassociates.com
>      >
>      > t: @tedneward | m: (425) 647-4526
>      >
>      
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Building hsdis?

Andrew Haley
In reply to this post by Volker Simonis
On 20/12/17 09:54, Volker Simonis wrote:
> Yes, that's exactly the issue. And it was communicated to the OpenJDK
> Governing Board more than two and a half years ago (see my mail
> "Providing 'hsdis' binaries not possible because of GPLv2/GPLv3
> license clash" from May 2015 [1]) and since then reiterated several
> times. I'll plan to raise this issue again at the public GB meeting at
> FOSDEM in February next year - however with very little hope that it
> will be resolved :(

How can the GB resolve it?  I can't think of anything we can do.

--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
Reply | Threaded
Open this post in threaded view
|

Re: Building hsdis?

Volker Simonis
Andrew Haley <[hidden email]> schrieb am Sa. 23. Dez. 2017 um 12:25:

> On 20/12/17 09:54, Volker Simonis wrote:
> > Yes, that's exactly the issue. And it was communicated to the OpenJDK
> > Governing Board more than two and a half years ago (see my mail
> > "Providing 'hsdis' binaries not possible because of GPLv2/GPLv3
> > license clash" from May 2015 [1]) and since then reiterated several
> > times. I'll plan to raise this issue again at the public GB meeting at
> > FOSDEM in February next year - however with very little hope that it
> > will be resolved :(
>
> How can the GB resolve it?  I can't think of anything we can do.
>

The GB obviously can not solve it directly in the same way it can not solve
the (still existing) inability to push HotSpot changes or to finally create
a Vulnerability Group.

But it can acknowledge the problem and try to put some pressure on Oracle
in order to work on and resolve the problem with a higher priority.

If a part of the OpenJDK is practically unusable because of licensing
issues I consider this inherently unhealthy. From my understanding it is
the GB which is responsible to “oversees the structure, operation, and
overall health of the OpenJDK”. Who else if not the GB should be qualified
to work on resolving it?

[1] http://openjdk.java.net/groups/gb/


> --
> Andrew Haley
> Java Platform Lead Engineer
> Red Hat UK Ltd. <https://www.redhat.com>
> EAC8 43EB D3EF DB98 CC77 2FAD A5CD
> <https://maps.google.com/?q=FAD+A5CD&entry=gmail&source=g>6035 332F A671
>
Reply | Threaded
Open this post in threaded view
|

Re: Building hsdis?

Andrew Haley
On 23/12/17 17:02, Volker Simonis wrote:

> Andrew Haley <[hidden email]> schrieb am Sa. 23. Dez. 2017 um 12:25:
>
>> On 20/12/17 09:54, Volker Simonis wrote:
>>> Yes, that's exactly the issue. And it was communicated to the OpenJDK
>>> Governing Board more than two and a half years ago (see my mail
>>> "Providing 'hsdis' binaries not possible because of GPLv2/GPLv3
>>> license clash" from May 2015 [1]) and since then reiterated several
>>> times. I'll plan to raise this issue again at the public GB meeting at
>>> FOSDEM in February next year - however with very little hope that it
>>> will be resolved :(
>>
>> How can the GB resolve it?  I can't think of anything we can do.
>
> The GB obviously can not solve it directly in the same way it can not solve
> the (still existing) inability to push HotSpot changes or to finally create
> a Vulnerability Group.
>
> But it can acknowledge the problem and try to put some pressure on Oracle
> in order to work on and resolve the problem with a higher priority.

Such as what, exactly?  Please propose something.

> If a part of the OpenJDK is practically unusable because of licensing
> issues I consider this inherently unhealthy. From my understanding it is
> the GB which is responsible to “oversees the structure, operation, and
> overall health of the OpenJDK”. Who else if not the GB should be qualified
> to work on resolving it?
>
> [1] http://openjdk.java.net/groups/gb/

The GB can only solve problems which, in principle, can be solved.  I
know of no reasonable way to solve this one.  There are some extreme
solutions, such as re-licensing all of HotSpot, but that seems
disproportionate.

--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
Reply | Threaded
Open this post in threaded view
|

Re: Building hsdis?

Volker Simonis
Andrew Haley <[hidden email]> schrieb am So. 24. Dez. 2017 um 09:27:

> On 23/12/17 17:02, Volker Simonis wrote:
> > Andrew Haley <[hidden email]> schrieb am Sa. 23. Dez. 2017 um 12:25:
> >
> >> On 20/12/17 09:54, Volker Simonis wrote:
> >>> Yes, that's exactly the issue. And it was communicated to the OpenJDK
> >>> Governing Board more than two and a half years ago (see my mail
> >>> "Providing 'hsdis' binaries not possible because of GPLv2/GPLv3
> >>> license clash" from May 2015 [1]) and since then reiterated several
> >>> times. I'll plan to raise this issue again at the public GB meeting at
> >>> FOSDEM in February next year - however with very little hope that it
> >>> will be resolved :(
> >>
> >> How can the GB resolve it?  I can't think of anything we can do.
> >
> > The GB obviously can not solve it directly in the same way it can not
> solve
> > the (still existing) inability to push HotSpot changes or to finally
> create
> > a Vulnerability Group.
> >
> > But it can acknowledge the problem and try to put some pressure on Oracle
> > in order to work on and resolve the problem with a higher priority.
>
> Such as what, exactly?  Please propose something.
>
> > If a part of the OpenJDK is practically unusable because of licensing
> > issues I consider this inherently unhealthy. From my understanding it is
> > the GB which is responsible to “oversees the structure, operation, and
> > overall health of the OpenJDK”. Who else if not the GB should be
> qualified
> > to work on resolving it?
> >
> > [1] http://openjdk.java.net/groups/gb/
>
> The GB can only solve problems which, in principle, can be solved.  I
> know of no reasonable way to solve this one.  There are some extreme
> solutions, such as re-licensing all of HotSpot, but that seems
> disproportionate.


There’a no need for any “extreme” solutions here. We’re speaking about 2
(in words “two”) files (i.e. src/utils/hsdis/hsdis.{c,h}) which are neither
part of the normal build nor part of any OpenJDK distribution. You have to
call the Makefile under src/utils/hsdis/ manually in order to build
hsdis.so. But this links in a part of the GNU binutils (which has been
relicensed to GPLv3) into the generated shared library. So currently,
everybody who builds hsdis violates the GNU license because he combines
GPLv2 with GPLv3 code.

I simply don’t understand what’s so complicated in relicensing these two
hsdis.{c,h} files to GPLv3? Just to stress it one more time: they are NOT
part of the HotSpot or the JDK. They are just a tool which can be used to
anslyze some HotSpot internals.

We could of course reimplement the hsdis functionality in an independent
project outside of the OpenJDK, but that would be indeed an “extrem”
solution for a trivial problem.


>
> --
> Andrew Haley
> Java Platform Lead Engineer
> Red Hat UK Ltd. <https://www.redhat.com>
> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
>
Reply | Threaded
Open this post in threaded view
|

Re: Building hsdis?

Mario Torre-5
> builds hsdis violates the GNU license because he
> combines GPLv2 with GPLv3 code

Are those files GPL 2 only or “at your option any later version” too?

Indeed, GPL v2 and v3 are not compatible, but if the upgradability is
allowed then the effective version is already 3. The rest of the openjdk
code is v2 only afaik though.

Cheers,
Mario
On Sun 24. Dec 2017 at 13:17, Volker Simonis <[hidden email]>
wrote:

> Andrew Haley <[hidden email]> schrieb am So. 24. Dez. 2017 um 09:27:
>
> > On 23/12/17 17:02, Volker Simonis wrote:
> > > Andrew Haley <[hidden email]> schrieb am Sa. 23. Dez. 2017 um 12:25:
> > >
> > >> On 20/12/17 09:54, Volker Simonis wrote:
> > >>> Yes, that's exactly the issue. And it was communicated to the OpenJDK
> > >>> Governing Board more than two and a half years ago (see my mail
> > >>> "Providing 'hsdis' binaries not possible because of GPLv2/GPLv3
> > >>> license clash" from May 2015 [1]) and since then reiterated several
> > >>> times. I'll plan to raise this issue again at the public GB meeting
> at
> > >>> FOSDEM in February next year - however with very little hope that it
> > >>> will be resolved :(
> > >>
> > >> How can the GB resolve it?  I can't think of anything we can do.
> > >
> > > The GB obviously can not solve it directly in the same way it can not
> > solve
> > > the (still existing) inability to push HotSpot changes or to finally
> > create
> > > a Vulnerability Group.
> > >
> > > But it can acknowledge the problem and try to put some pressure on
> Oracle
> > > in order to work on and resolve the problem with a higher priority.
> >
> > Such as what, exactly?  Please propose something.
> >
> > > If a part of the OpenJDK is practically unusable because of licensing
> > > issues I consider this inherently unhealthy. From my understanding it
> is
> > > the GB which is responsible to “oversees the structure, operation, and
> > > overall health of the OpenJDK”. Who else if not the GB should be
> > qualified
> > > to work on resolving it?
> > >
> > > [1] http://openjdk.java.net/groups/gb/
> >
> > The GB can only solve problems which, in principle, can be solved.  I
> > know of no reasonable way to solve this one.  There are some extreme
> > solutions, such as re-licensing all of HotSpot, but that seems
> > disproportionate.
>
>
> There’a no need for any “extreme” solutions here. We’re speaking about 2
> (in words “two”) files (i.e. src/utils/hsdis/hsdis.{c,h}) which are neither
> part of the normal build nor part of any OpenJDK distribution. You have to
> call the Makefile under src/utils/hsdis/ manually in order to build
> hsdis.so. But this links in a part of the GNU binutils (which has been
> relicensed to GPLv3) into the generated shared library. So currently,
> everybody who builds hsdis violates the GNU license because he combines
> GPLv2 with GPLv3 code.
>
> I simply don’t understand what’s so complicated in relicensing these two
> hsdis.{c,h} files to GPLv3? Just to stress it one more time: they are NOT
> part of the HotSpot or the JDK. They are just a tool which can be used to
> anslyze some HotSpot internals.
>
> We could of course reimplement the hsdis functionality in an independent
> project outside of the OpenJDK, but that would be indeed an “extrem”
> solution for a trivial problem.
>
>
> >
> > --
> > Andrew Haley
> > Java Platform Lead Engineer
> > Red Hat UK Ltd. <https://www.redhat.com>
> > EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Building hsdis?

Volker Simonis
On Sun, Dec 24, 2017 at 11:22 PM, Mario Torre
<[hidden email]> wrote:
>> builds hsdis violates the GNU license because he
>> combines GPLv2 with GPLv3 code
>
> Are those files GPL 2 only or “at your option any later version” too?
>

They are GPLv2 only, otherwise there wouldn't be a problem.

> Indeed, GPL v2 and v3 are not compatible, but if the upgradability is
> allowed then the effective version is already 3. The rest of the openjdk
> code is v2 only afaik though.
>
> Cheers,
> Mario
>
> On Sun 24. Dec 2017 at 13:17, Volker Simonis <[hidden email]>
> wrote:
>>
>> Andrew Haley <[hidden email]> schrieb am So. 24. Dez. 2017 um 09:27:
>>
>> > On 23/12/17 17:02, Volker Simonis wrote:
>> > > Andrew Haley <[hidden email]> schrieb am Sa. 23. Dez. 2017 um 12:25:
>> > >
>> > >> On 20/12/17 09:54, Volker Simonis wrote:
>> > >>> Yes, that's exactly the issue. And it was communicated to the
>> > >>> OpenJDK
>> > >>> Governing Board more than two and a half years ago (see my mail
>> > >>> "Providing 'hsdis' binaries not possible because of GPLv2/GPLv3
>> > >>> license clash" from May 2015 [1]) and since then reiterated several
>> > >>> times. I'll plan to raise this issue again at the public GB meeting
>> > >>> at
>> > >>> FOSDEM in February next year - however with very little hope that it
>> > >>> will be resolved :(
>> > >>
>> > >> How can the GB resolve it?  I can't think of anything we can do.
>> > >
>> > > The GB obviously can not solve it directly in the same way it can not
>> > solve
>> > > the (still existing) inability to push HotSpot changes or to finally
>> > create
>> > > a Vulnerability Group.
>> > >
>> > > But it can acknowledge the problem and try to put some pressure on
>> > > Oracle
>> > > in order to work on and resolve the problem with a higher priority.
>> >
>> > Such as what, exactly?  Please propose something.
>> >
>> > > If a part of the OpenJDK is practically unusable because of licensing
>> > > issues I consider this inherently unhealthy. From my understanding it
>> > > is
>> > > the GB which is responsible to “oversees the structure, operation, and
>> > > overall health of the OpenJDK”. Who else if not the GB should be
>> > qualified
>> > > to work on resolving it?
>> > >
>> > > [1] http://openjdk.java.net/groups/gb/
>> >
>> > The GB can only solve problems which, in principle, can be solved.  I
>> > know of no reasonable way to solve this one.  There are some extreme
>> > solutions, such as re-licensing all of HotSpot, but that seems
>> > disproportionate.
>>
>>
>> There’a no need for any “extreme” solutions here. We’re speaking about 2
>> (in words “two”) files (i.e. src/utils/hsdis/hsdis.{c,h}) which are
>> neither
>> part of the normal build nor part of any OpenJDK distribution. You have to
>> call the Makefile under src/utils/hsdis/ manually in order to build
>> hsdis.so. But this links in a part of the GNU binutils (which has been
>> relicensed to GPLv3) into the generated shared library. So currently,
>> everybody who builds hsdis violates the GNU license because he combines
>> GPLv2 with GPLv3 code.
>>
>> I simply don’t understand what’s so complicated in relicensing these two
>> hsdis.{c,h} files to GPLv3? Just to stress it one more time: they are NOT
>> part of the HotSpot or the JDK. They are just a tool which can be used to
>> anslyze some HotSpot internals.
>>
>> We could of course reimplement the hsdis functionality in an independent
>> project outside of the OpenJDK, but that would be indeed an “extrem”
>> solution for a trivial problem.
>>
>>
>> >
>> > --
>> > Andrew Haley
>> > Java Platform Lead Engineer
>> > Red Hat UK Ltd. <https://www.redhat.com>
>> > EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
>> >
Reply | Threaded
Open this post in threaded view
|

Re: Building hsdis?

Andrew Haley
In reply to this post by Volker Simonis
On 24/12/17 12:16, Volker Simonis wrote:

> Andrew Haley <[hidden email]> schrieb am So. 24. Dez. 2017 um 09:27:
>
>> On 23/12/17 17:02, Volker Simonis wrote:
>>> Andrew Haley <[hidden email]> schrieb am Sa. 23. Dez. 2017 um 12:25:
>>
>> The GB can only solve problems which, in principle, can be solved.  I
>> know of no reasonable way to solve this one.  There are some extreme
>> solutions, such as re-licensing all of HotSpot, but that seems
>> disproportionate.
>
> There’a no need for any “extreme” solutions here. We’re speaking about 2
> (in words “two”) files (i.e. src/utils/hsdis/hsdis.{c,h}) which are neither
> part of the normal build nor part of any OpenJDK distribution. You have to
> call the Makefile under src/utils/hsdis/ manually in order to build
> hsdis.so. But this links in a part of the GNU binutils (which has been
> relicensed to GPLv3) into the generated shared library. So currently,
> everybody who builds hsdis violates the GNU license because he combines
> GPLv2 with GPLv3 code.
>
> I simply don’t understand what’s so complicated in relicensing these two
> hsdis.{c,h} files to GPLv3? Just to stress it one more time: they are NOT
> part of the HotSpot or the JDK. They are just a tool which can be used to
> anslyze some HotSpot internals.

IANAL, but AFAIK It would not help.  The incompatibility is because
you can't link pure GPLv2 code (HotSpot) and pure GPLv3 code
(binutils) together, even via dynamic linkage.  Changing the licences
of hsdis.{c,h}) won't solve that problem.

--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
Reply | Threaded
Open this post in threaded view
|

Re: Building hsdis?

Volker Simonis
On Mon, Dec 25, 2017 at 11:58 PM, Andrew Haley <[hidden email]> wrote:

> On 24/12/17 12:16, Volker Simonis wrote:
>> Andrew Haley <[hidden email]> schrieb am So. 24. Dez. 2017 um 09:27:
>>
>>> On 23/12/17 17:02, Volker Simonis wrote:
>>>> Andrew Haley <[hidden email]> schrieb am Sa. 23. Dez. 2017 um 12:25:
>>>
>>> The GB can only solve problems which, in principle, can be solved.  I
>>> know of no reasonable way to solve this one.  There are some extreme
>>> solutions, such as re-licensing all of HotSpot, but that seems
>>> disproportionate.
>>
>> There’a no need for any “extreme” solutions here. We’re speaking about 2
>> (in words “two”) files (i.e. src/utils/hsdis/hsdis.{c,h}) which are neither
>> part of the normal build nor part of any OpenJDK distribution. You have to
>> call the Makefile under src/utils/hsdis/ manually in order to build
>> hsdis.so. But this links in a part of the GNU binutils (which has been
>> relicensed to GPLv3) into the generated shared library. So currently,
>> everybody who builds hsdis violates the GNU license because he combines
>> GPLv2 with GPLv3 code.
>>
>> I simply don’t understand what’s so complicated in relicensing these two
>> hsdis.{c,h} files to GPLv3? Just to stress it one more time: they are NOT
>> part of the HotSpot or the JDK. They are just a tool which can be used to
>> anslyze some HotSpot internals.
>
> IANAL, but AFAIK It would not help.  The incompatibility is because
> you can't link pure GPLv2 code (HotSpot) and pure GPLv3 code
> (binutils) together, even via dynamic linkage.  Changing the licences
> of hsdis.{c,h}) won't solve that problem.
>

There are two different problems here:

1. It is not possible to build and redistribute hsdis.so because of
GPLv2 and GPLv3 license incompatibilities.

This problem could be easily solved by re-licensing hsdis.{c,h} under
GPLv3. That would allow it to others (e.g. the AdoptOpenJD project) to
provide pre-built version of hsdis.so for various platforms and
versions of OpenJDK. This will be definitely of great benefit for the
OpenJDK community, especially taking into account that many popular
tools like JITwatch or JMH use or depend on hsdis.

2. The second problem is wether and when a program and its plug-ins
are considered a single combined program.

This is a long standing problem [1] and without being a lawyer (which
is probably an advantage :) I'd consider the usage of hsdis a
"borderline case" (because HotSpot and hsdis dont't share any complex,
common data structures - they just pass a byte stream forth and back).
But that's just my opinion.


We can not easily solve or decide problem 2. But we can resolve the
first problem and give everybody the freedom to decide question 2 for
himself. Without resolving the first problem (i.e. re-licensing
hsdis.{c,h} under GPLv3) most people won't even face problem two (if
this is a problem at all) because they simply don't have a version of
hsdis.

Regards,
Volker

[1] https://www.gnu.org/licenses/gpl-faq.en.html#GPLPlugins

> --
> Andrew Haley
> Java Platform Lead Engineer
> Red Hat UK Ltd. <https://www.redhat.com>
> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
Reply | Threaded
Open this post in threaded view
|

Re: Building hsdis?

Andrew Haley
On 27/12/17 11:26, Volker Simonis wrote:

> There are two different problems here:
>
> 1. It is not possible to build and redistribute hsdis.so because of
> GPLv2 and GPLv3 license incompatibilities.
>
> This problem could be easily solved by re-licensing hsdis.{c,h} under
> GPLv3. That would allow it to others (e.g. the AdoptOpenJD project) to
> provide pre-built version of hsdis.so for various platforms and
> versions of OpenJDK. This will be definitely of great benefit for the
> OpenJDK community, especially taking into account that many popular
> tools like JITwatch or JMH use or depend on hsdis.
>
> 2. The second problem is wether and when a program and its plug-ins
> are considered a single combined program.
>
> This is a long standing problem [1] and without being a lawyer (which
> is probably an advantage :) I'd consider the usage of hsdis a
> "borderline case" (because HotSpot and hsdis dont't share any complex,
> common data structures - they just pass a byte stream forth and back).
> But that's just my opinion.

Right, but there is substantial functionality which depends on binutils.

> We can not easily solve or decide problem 2. But we can resolve the
> first problem and give everybody the freedom to decide question 2
> for himself.

I believe that anybody distributing the resulting hsdis.so would be on
shaky legal ground.  Maybe it'd work in some countries, not others, I
don't know, but we shouldn't be trying to find clever schemes to evade
the clear intent of the FSF, the binutils copyright owner.

> Without resolving the first problem (i.e. re-licensing hsdis.{c,h}
> under GPLv3) most people won't even face problem two (if this is a
> problem at all) because they simply don't have a version of hsdis.

We need to seek a better way to solve this problem.

Neither of us are lawyers, but I don't like it, and I would be very
reluctant to be involved with any organization trying to get past
the FSF's copyright terms in this way.

--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
Reply | Threaded
Open this post in threaded view
|

Re: Building hsdis?

Volker Simonis
On Thu, Dec 28, 2017 at 11:48 AM, Andrew Haley <[hidden email]> wrote:

> On 27/12/17 11:26, Volker Simonis wrote:
>> There are two different problems here:
>>
>> 1. It is not possible to build and redistribute hsdis.so because of
>> GPLv2 and GPLv3 license incompatibilities.
>>
>> This problem could be easily solved by re-licensing hsdis.{c,h} under
>> GPLv3. That would allow it to others (e.g. the AdoptOpenJD project) to
>> provide pre-built version of hsdis.so for various platforms and
>> versions of OpenJDK. This will be definitely of great benefit for the
>> OpenJDK community, especially taking into account that many popular
>> tools like JITwatch or JMH use or depend on hsdis.
>>
>> 2. The second problem is wether and when a program and its plug-ins
>> are considered a single combined program.
>>
>> This is a long standing problem [1] and without being a lawyer (which
>> is probably an advantage :) I'd consider the usage of hsdis a
>> "borderline case" (because HotSpot and hsdis dont't share any complex,
>> common data structures - they just pass a byte stream forth and back).
>> But that's just my opinion.
>
> Right, but there is substantial functionality which depends on binutils.
>
>> We can not easily solve or decide problem 2. But we can resolve the
>> first problem and give everybody the freedom to decide question 2
>> for himself.
>
> I believe that anybody distributing the resulting hsdis.so would be on
> shaky legal ground.  Maybe it'd work in some countries, not others, I
> don't know, but we shouldn't be trying to find clever schemes to evade
> the clear intent of the FSF, the binutils copyright owner.
>
>> Without resolving the first problem (i.e. re-licensing hsdis.{c,h}
>> under GPLv3) most people won't even face problem two (if this is a
>> problem at all) because they simply don't have a version of hsdis.
>
> We need to seek a better way to solve this problem.
>
> Neither of us are lawyers, but I don't like it, and I would be very
> reluctant to be involved with any organization trying to get past
> the FSF's copyright terms in this way.

So than why aren't you reluctant about using hsdis itself? Or did you
(or your co-workers) never ever used any hsdis version based on
binutils > 2.17, released in June 2006 (small hint: aarch64 support
was added in binutils 2.23 around 2012 and is entirely GPLv3).

>
> --
> Andrew Haley
> Java Platform Lead Engineer
> Red Hat UK Ltd. <https://www.redhat.com>
> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
Reply | Threaded
Open this post in threaded view
|

Re: Building hsdis?

Mario Torre-5
2017-12-29 17:16 GMT+01:00 Volker Simonis <[hidden email]>:

> So than why aren't you reluctant about using hsdis itself? Or did you
> (or your co-workers) never ever used any hsdis version based on
> binutils > 2.17, released in June 2006 (small hint: aarch64 support
> was added in binutils 2.23 around 2012 and is entirely GPLv3).

Personal use is not a problem though, redistribution to public is.

That's not to suggest we shouldn't fix this of course.

Cheers,
Mario

--
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Java Champion - Blog: http://neugens.wordpress.com - Twitter: @neugens
Proud GNU Classpath developer: http://www.classpath.org/
OpenJDK: http://openjdk.java.net/projects/caciocavallo/

Please, support open standards:
http://endsoftpatents.org/
12