Building hsdis?

David Buck david.buck at oracle.com
Wed Dec 20 08:54:43 UTC 2017


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" <david.buck at oracle.com> 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
>      >
>      
> 
> 


More information about the build-dev mailing list