bugGNU Octave - Bugs: bug #53531, configure automatic detection of...

 
 

bug #53531: configure automatic detection of Java version fails with OpenJDK 10 and 11

Submitter:  Mike Miller <mtmiller>
Submitted:  Sat 31 Mar 2018 08:00:28 AM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 02 Apr 2018 07:36:22 PM UTC, comment #2: 

Thank you, configuration on the stable branch now works correctly for me with Java 9, 10, and 11, as well as when JAVA_HOME is unset. The version is reported correctly in the configure output as "9.0.4" or "10" or "11".

Mike Miller <mtmiller>
Group Member
Mon 02 Apr 2018 04:49:10 AM UTC, comment #1: 

I pushed a change to the sed pattern to remove extra characters after the version part of the string.  See http://hg.savannah.gnu.org/hgweb/octave/rev/523298448352.

That addresses the first part of the bug.  I don't think the second part is a problem because the test is


  if test $java_major -gt 1 || (test $java_major -eq 1 && test $java_minor -ge 5); then


Even thought the minor number will be read as 10 or 11, the major number is greater than 1 so the second test isn't used.

Marking bug as Ready for Test.

Rik <rik5>
Group administrator
Sat 31 Mar 2018 08:00:28 AM UTC, original submission:  

When configure tries to check the version of Java found to see if it is new enough, the string parsing fails on OpenJDK 10 and 11 on Debian unstable:


$ /usr/lib/jvm/java-9-openjdk-amd64/bin/java -version
openjdk version "9.0.4"
OpenJDK Runtime Environment (build 9.0.4+12-Debian-2)
OpenJDK 64-Bit Server VM (build 9.0.4+12-Debian-2, mixed mode)
$ /usr/lib/jvm/java-10-openjdk-amd64/bin/java -version
openjdk version "10" 2018-03-20
OpenJDK Runtime Environment (build 10+46-Debian-2)
OpenJDK 64-Bit Server VM (build 10+46-Debian-2, mixed mode)
$ /usr/lib/jvm/java-11-openjdk-amd64/bin/java -version
openjdk version "11" 2018-09-18
OpenJDK Runtime Environment (build 11+5-Debian-1)
OpenJDK 64-Bit Server VM (build 11+5-Debian-1, mixed mode)


Two differences from what configure expects

  • There is only a single number, not major.minor
  • There is additional text after the closing quote that the sed command doesn't delete
Mike Miller <mtmiller>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mtmiller (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-04-02 mtmiller StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2018-04-02 rik5 StatusNone Ready For Test

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code