Bug 862239 - FindJava.cmake doesn't understand IcedTea 1.7 version string
FindJava.cmake doesn't understand IcedTea 1.7 version string
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: cmake (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Orion Poplawski
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-02 08:03 EDT by Mary Ellen Foster
Modified: 2012-10-17 00:15 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-17 00:15:34 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mary Ellen Foster 2012-10-02 08:03:39 EDT
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 08:07:22 EDT
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 11:33:18 EDT
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-02 23:22:01 EDT
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).

Note You need to log in before you can comment on or make changes to this bug.