Bug 862239 - FindJava.cmake doesn't understand IcedTea 1.7 version string
Summary: FindJava.cmake doesn't understand IcedTea 1.7 version string
Alias: None
Product: Fedora
Classification: Fedora
Component: cmake
Version: 17
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2012-10-02 12:03 UTC by Mary Ellen Foster
Modified: 2012-10-17 04:15 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2012-10-17 04:15:34 UTC
Type: Bug

Attachments (Terms of Use)

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
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):

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:
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.

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:
then log in and leave karma (feedback).

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