Bug 862239

Summary: FindJava.cmake doesn't understand IcedTea 1.7 version string
Product: [Fedora] Fedora Reporter: Mary Ellen Foster <mefoster>
Component: cmakeAssignee: Orion Poplawski <orion>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: jreznik, ltinkl, orion, pertusus, pmachata, rdieter
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-17 04:15:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mary Ellen Foster 2012-10-02 12:03:39 UTC
Description of problem:
On Fedora 17+, the default Java version is 1.7.0. This version isn't expected by FindJava.cmake.

Here are the symptoms: with the following minimal CMakeLists.txt
    CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
    FIND_PACKAGE (Java REQUIRED)
You get the following output from cmake:
-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/lib64/ccache/gcc
-- Check for working C compiler: /usr/lib64/ccache/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/lib64/ccache/c++
-- Check for working CXX compiler: /usr/lib64/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Warning at /usr/share/cmake/Modules/FindJava.cmake:120 (message):
  regex not supported: java version "1.7.0_06-icedtea"

  OpenJDK Runtime Environment (fedora-2.3.1.fc17.2-x86_64)

  OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode).  Please report
Call Stack (most recent call first):
  CMakeLists.txt:2 (FIND_PACKAGE)


-- Found Java: /bin/java (found version "..") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mef3/Documents/JAMES/software/state/build.cmake


I'm not sure what the reason is for the Java version munging, but it seems that the regular expressions in FindJava.cmake need to be tweaked to understand this type of version string.

Version-Release number of selected component (if applicable):
cmake-2.8.8-4.fc17.x86_64
java-1.7.0-openjdk-1.7.0.6-2.3.1.fc17.2.x86_64

How reproducible:
Every time

Steps to Reproduce:
1. Run cmake with the above file
  
Actual results:
Warnings, and Java_VERSION* are not set


Expected results:
Correctly set Java_VERSION variables

Comment 1 Mary Ellen Foster 2012-10-02 12:07:22 UTC
Addendum: this seems to be fixed in upstream CMake 2.8.9:
    http://public.kitware.com/Bug/view.php?id=12878
Updating to rawhide cmake-2.8.9-1.fc18.x86_64 fixes the problem, so this would probably be solved by building 2.8.9 for F17 as well.

Comment 2 Fedora Update System 2012-10-02 15:33:18 UTC
cmake-2.8.9-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/cmake-2.8.9-1.fc17

Comment 3 Fedora Update System 2012-10-03 03:22:01 UTC
Package cmake-2.8.9-1.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing cmake-2.8.9-1.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-15257/cmake-2.8.9-1.fc17
then log in and leave karma (feedback).