Opened 11 years ago

Last modified 11 years ago

#42105 new defect

fop and other java ports should check for JVM on activation

Reported by: macports.5.msliczniak@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc:
Port: fop

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I upgraded from 10.7.x to 10.9.x and followed the migration path here: wiki:Migration

On some 10.8.x machines I had used xorg-server port instead of Xquartz downloadable and decided to do so as well, I attached the log file.

The gist of the issues is here:

No Java runtime present, requesting install.
2014-01-09 08:25:03.059 java[57015:1007] JLRequestRuntimeInstall: Error calling: CFMessagePortCreateRemote

I login to the Window session (don't know the right term for it on Mac OS) as a regular user, and I use /usr/bin/login -p ... to login as the admin user from the Terminal. From there I run sudo port install... Well this notification did not work.

Also probably some details should be put in a faq or installing pages about java and what is needed for macports on what versions of Mac OS. I naively assumed that openjdk would be installed as a dependency when needed (in fact I'm pretty sure that on older versions opensdk6 was a port and installed to build some other documentation variant).

I found this issue somewhat related: #42020

Some more details:

$ date
Thu Jan  9 08:23:52 CST 2014

$ type -a java
java is /usr/bin/java
$ /usr/bin/java -v
No Java runtime present, requesting install.
...

13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64

Attachments (1)

xorg-server+docs.txt (41.2 KB) - added by macports.5.msliczniak@… 11 years ago.

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by macports.5.msliczniak@…

Attachment: xorg-server+docs.txt added

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Owner: changed from macports-tickets@… to jeremyhu@…
Port: xorg-server added

comment:2 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Owner: changed from jeremyhu@… to macports-tickets@…
Port: fop added; xorg-server removed
Summary: xorg-server +docs fails on 10.9 without java and notification failsfop and other java ports should check for JVM on activation

Yes, you should install the JDK if you are going to be using java ports like fop (which is used to build X11 documentation)

I don't know what you mean by "and notification fails"

comment:3 Changed 11 years ago by macports.5.msliczniak@…

Sorry, I mean this:

$ /usr/bin/login -p admin
...
admin$ /usr/bin/java -v
No Java runtime present, requesting install.
2014-01-12 15:25:10.859 java[62064:507] JLRequestRuntimeInstall: Error calling: CFMessagePortCreateRemote

I'm saying that when I log in to the Mac OS GUI as a user not in the admin group and then /usr/bin/login -p ... to one that is so that I can run sudo port install ... in the cases of ports that run /usr/bin/java I don't get the dialog explaining that there is no java installed and that something should be added to the installation or faq page detailing what java you might need on what OS X version.

Last edited 11 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:4 in reply to:  3 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to macports.5.msliczniak@…:

I'm saying that when I log in to the Mac OS GUI as a user not in the admin group and then /usr/bin/login -p ... to one that is so that I can run sudo port install ... in the cases of ports that run /usr/bin/java I don't get the dialog explaining that there is no java installed and that something should be added to the installation or faq page detailing what java you might need on what OS X version.

None of that behavior is because of MacPorts, and we cannot do anything to change that—aside from providing a version of Java within MacPorts to avoid weird behaviors of the system version, which may be something we should try to do, but I don't think anyone has attempted it yet.

comment:5 Changed 11 years ago by macports.5.msliczniak@…

Here: http://www.macports.org/install.php

An item 5 optional could be added similar to what is there for X11 as item 4 optional id there now but explaining that java should be installed. If the current state of openjdk7 works for macports, that can be an listed as an option there. But if that is the case then it should be a port too and used as a dependency for all the ports that run java now.

But that is a big job, so ports like fop should fail early if there is not a working java. /usr/bin/java returns 1 afterall when there is not a working java installed on 10.9.x for example. I ran port install without the -v option first and I'm sure that somewhere there would have been info about what went wrong but did not scroll back. I just saw that for some reason a pdf was not able to be created. So I just assumed something like doxygen was failing and tried again with the -v this time. And it was a lot of scrolling to see what had happened.

Maybe the idea was that when the person runs such a command the dialog box pops-up saying that there is no working java install, that would be a good clue, but it does not work when someone uses /usr/bin/login as I do or what about someone who ssh in, won't see that either.

So conclusion and just my opinion:

1) Should be mentioned on web page that some ports need java and where to get it.

2) Ports that use java should check to see if there is a working java as part of install.

3) (long term) Java should be a dep and built from source for those ports that need it.

Last edited 11 years ago by macports.5.msliczniak@… (previous) (diff)
Note: See TracTickets for help on using tickets.