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
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):
-- 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):
Steps to Reproduce:
1. Run cmake with the above file
Warnings, and Java_VERSION* are not set
Correctly set Java_VERSION variables
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.
cmake-2.8.9-1.fc17 has been submitted as an update for Fedora 17.
* 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).