-
Notifications
You must be signed in to change notification settings - Fork 900
configury: use javac vs javah whenever possible. #5001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@hppritcha @bwbarrett FYI, this PR might break JDK older than 8. |
@hppritcha @bwbarrett @jsquyres This change is required to support recently-released OpenJDK 10. But it causes a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me.
looks good to me. jenkins 32bit builds still not happy but that has nothing to do with this PR. |
bot:ibm:gnu:retest |
bot:ompi:retest Brian broke the 32bit builds... |
@kawashima-fj have you tried to build the java bindings with java 7? I vaguely recall that some more recent additions to the bindings prevent compiling with java7. Can you check this? |
@hppritcha Yes, I tried it. Without this PR:
With this PR:
I confirmed the following things on x86_64.
A possible related issue is #3705/#4121. I will recall it... |
As I mentioned here on the developer mailing list, I'll rebase an attempt to fix how Open mPI's build process handles finding JDK tools on OS X/macOS that I'm working on (still only locally at the moment, but it will become a PR soon) against this after it's merged. |
let me know if we want to support JDK < 8. |
For 3.0 and 3.1, we definitely want to keep supporting Java 7, because otherwise we'd have a fairly major backwards compatibility problem. I think 4.0 (aka master) is an open question. |
a936f91
to
045af83
Compare
@bwbarrett I reworked this PR so tries |
@ggouaillardet If you have JDK 8 in In this case, |
Good point, I will think about a solution. |
045af83
to
0be7b86
Compare
@kawashima-fj it should be good now
|
0be7b86
to
bc9d571
Compare
@ggouaillardet I confirmed almost successful build & run with OpenJDK 7/8/9/10 and
I finally find that |
@kawashima-fj thanks for the insight ! I suspected such an issue might occur, but was unable to evidence it. I will fully review the process and update the PR |
Signed-off-by: Gilles Gouaillardet <[email protected]>
javah is no more available from Java 10, so try javac -h first (available since Java 8) and fallback on javah Refs. open-mpi#5000 Signed-off-by: Gilles Gouaillardet <[email protected]>
bc9d571
to
5370586
Compare
@kawashima-fj we should be good now, can you please give this PR a final review ? |
:bot:mellanox:retest |
@ggouaillardet I'll review and test later today or tomorrow. |
@ggouaillardet I reviewed and tested it on OpenJDK 7/8/9/10. Perfect. For our record: |
…acOS. Also avoid picking up Apple's Java shims via the sym. links to them in `/usr/bin` on systems where any one of them could possibly exhibit behavior that is erratic and, to some extent, likely to be incorrect nowadays (cf.: - https://www.mail-archive.com/[email protected]/msg20551.html - open-mpi#5015 (comment) - the last part of open-mpi#5015 (comment) - open-mpi#5015 (comment) for more detailed context.) Works alongside open-mpi#5001 to close open-mpi#5000. Signed-off-by: Bryce Glover <[email protected]> (cherry picked from commit open-mpi/ompi@8c32cd8)
…acOS. Also avoid picking up Apple's Java shims via the sym. links to them in `/usr/bin` on systems where any one of them could possibly exhibit behavior that is erratic and, to some extent, likely to be incorrect nowadays (cf.: - https://www.mail-archive.com/[email protected]/msg20551.html - open-mpi#5015 (comment) - the last part of open-mpi#5015 (comment) - open-mpi#5015 (comment) for more detailed context.) Works alongside open-mpi#5001 to close open-mpi#5000. Signed-off-by: Bryce Glover <[email protected]> (cherry picked from commit open-mpi/ompi@8c32cd8)
This broke OMPI on OSX systems without Java SDK. The configure exits with the following:
|
Are you sure that this PR is to blame? That looks like the part of the build infrastructure that goes through the logic I changed in #5015. I'm not sure how what I did could have caused this to break, though, at least at first glance; I'm pretty sure I didn't touch anything having to do with whether the Java bindings are enabled or not, and I would suspect that those always required you to have a JDK installed… |
I am not 100% sure this PR was to be blamed, but I thought it was the last thing that touched the java support. If I don't want java bindings, and especially if I did not requested them specifically, why should I have an SDK installed ? |
George is right -- we do not require a Java SDK to build/run OMPI. Regardless of whether it was this PR or #5001, both of them touched the Java configury recently, and we apparently got it wrong. 😦 |
Well, back to the drawing board it is, then. Upon further investigation, I believe my inserting this line into that file as a blind copy of the suggestion that you requested near the bottom of the code sketch you put in list item 2 of this review comment of yours is to blame; one of us should have noticed that this would cause this part of the build scripting to abort and thus make the fallback logic below unreachable. Removing that line should fix the resulting problem that @bosilca reported; I'll file a new PR to do just that against |
@RandomDSdevel Perfect -- thanks! (and correct: mucking with public git history in a large multi-developer project -- just say no!) |
That PR accidentally changed Open MPI's build configuration infrastruc- ture's Java toolchain detection logic so that it would, as reported by @bosilca in open-mpi#5001 (comment) and tracked down by me in open-mpi#5001 (comment), abort your entire in-progress Open MPI build when it failed to find an OS X/macOS JDK instead of simply falling back to checking for a JDK in locations where it would be found on other platforms. _Oops…!_ Signed-off-by: Bryce Glover <[email protected]> (cherry picked from commit 4a05c7e)
That PR accidentally changed Open MPI's build configuration infrastruc- ture's Java toolchain detection logic so that it would, as reported by @bosilca in open-mpi#5001 (comment) and tracked down by me in open-mpi#5001 (comment), abort your entire in-progress Open MPI build when it failed to find an OS X/macOS JDK instead of simply falling back to checking for a JDK in locations where it would be found on other platforms. _Oops…!_ Signed-off-by: Bryce Glover <[email protected]> (cherry picked from commit open-mpi/ompi@4a05c7e)
That PR accidentally changed Open MPI's build configuration infrastruc- ture's Java toolchain detection logic so that it would, as reported by @bosilca in open-mpi#5001 (comment) and tracked down by me in open-mpi#5001 (comment), abort your entire in-progress Open MPI build when it failed to find an OS X/macOS JDK instead of simply falling back to checking for a JDK in locations where it would be found on other platforms. _Oops…!_ Signed-off-by: Bryce Glover <[email protected]> (cherry picked from commit 4a05c7e)
…acOS. Also avoid picking up Apple's Java shims via the sym. links to them in `/usr/bin` on systems where any one of them could possibly exhibit behavior that is erratic and, to some extent, likely to be incorrect nowadays (cf.: - https://www.mail-archive.com/[email protected]/msg20551.html - #5015 (comment) - the last part of #5015 (comment) - #5015 (comment) for more detailed context.) Works alongside #5001 to close #5000. Signed-off-by: Bryce Glover <[email protected]> (cherry picked from commit 8c32cd8) Signed-off-by: KAWASHIMA Takahiro <[email protected]>
javah has been removed from Java 10, so use javac -h instead
(that is already usable in Java 8)
Refs. #5000
Signed-off-by: Gilles Gouaillardet [email protected]