Building hsdis?

David Buck david.buck at oracle.com
Thu Dec 21 02:44:25 UTC 2017


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" <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