Skip to content
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

rustc configure pops up dialog about javac on OS X #23138

Closed
comex opened this issue Mar 7, 2015 · 0 comments · Fixed by #24005
Closed

rustc configure pops up dialog about javac on OS X #23138

comex opened this issue Mar 7, 2015 · 0 comments · Fixed by #24005
Labels
O-macos Operating system: macOS

Comments

@comex
Copy link
Contributor

comex commented Mar 7, 2015

This is a fairly trivial issue, but on current OS X, javac, along with other commands from the JDK, is actually a wrapper program which checks if a JDK is installed; if one is not, it quits and pops up this message in the UI:

The rust configure script checks for javac by attempting to run it, so it produces the dialog, which is a bit annoying.

This is pretty poor behavior on OS X's part, since it should be no surprise that scripts would try to execute a command line tool. And, of course, it can be avoided by either installing the JDK or removing the wrapper binary. However, the configure script could work around this easily: since javac is only used by Rust in combination with antlr4 and grun, neither of which is likely to be installed if a JDK isn't, the script should check for those first, and skip the javac check if they aren't found.

@huonw huonw added the O-macos Operating system: macOS label Mar 7, 2015
ranma42 added a commit to ranma42/rust that referenced this issue Apr 3, 2015
MacOS X does not ship with Java installed by default. Instead it
includes binary stubs that upon execution pop up a message suggesting
the installation of the JDK.

Since `javac` is only used when `antlr4` is available, it is possible
to work around the popup by only probing for `javac` if `antlr4` has
been successfully detected (in which case the JDK is probably already
installed on the system).

Fixes rust-lang#23138.
Manishearth added a commit to Manishearth/rust that referenced this issue Apr 3, 2015
…excrichton

MacOS X does not ship with Java installed by default. Instead it
includes binary stubs that upon execution pop up a message suggesting
the installation of the JDK.

Since `javac` is only used when `antlr4` is available, it is possible
to work around the popup by only probing for `javac` if `antlr4` has
been successfully detected (in which case the JDK is probably already
installed on the system).

Fixes rust-lang#23138.
Manishearth added a commit to Manishearth/rust that referenced this issue Apr 4, 2015
…excrichton

 MacOS X does not ship with Java installed by default. Instead it
includes binary stubs that upon execution pop up a message suggesting
the installation of the JDK.

Since `javac` is only used when `antlr4` is available, it is possible
to work around the popup by only probing for `javac` if `antlr4` has
been successfully detected (in which case the JDK is probably already
installed on the system).

Fixes rust-lang#23138.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-macos Operating system: macOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants