View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012878CMakeModulespublic2012-01-17 12:552012-11-05 14:33
ReporterDan Kegel 
Assigned ToRolf Eike Beer 
PlatformLinuxOSUbuntuOS Version12.04
Product VersionCMake 2.8.7 
Target VersionCMake 2.8.9Fixed in VersionCMake 2.8.9 
Summary0012878: find_package(Java) gives warning "regex not supported" again
DescriptionJava.cmake has a hard-coded regex to parse java version strings, and it did
not expect 'icedtea' to appear in them.

It did seem to expect 'oem' to appear in them, so blindly piggyback on that
to add 'icedtea'. (Since a character class is used, it would also support
-tie-me-a-code and other anagrams, but fixing that is best done by
the author of that regex if desired.)

See attached patch.
Steps To ReproduceSame as for bug 11676, but on latest ubuntu (12.04) with latest jdk (openjdk-7-jdk).
Additional InformationExact log:

CMake Warning at /usr/local/cmake/share/cmake-2.8/Modules/FindJava.cmake:120 (message):
  regex not supported: java version "1.7.0_147-icedtea"

  OpenJDK Runtime Environment (IcedTea7 2.0) (7~b147-2.0-1ubuntu2)

  OpenJDK 64-Bit Server VM (build 21.0-b17, mixed mode). Please report
TagsNo tags attached.
Attached Filespatch file icon icedtea.patch [^] (845 bytes) 2012-01-17 12:56 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
David Cole (manager)
2012-06-25 08:32

Is the attached patch correct?

Do we have to match "oem" without matching "icedtea-oem" on some platforms?

(i.e. -- should the "icedtea-" be *separately* optional from the "oem-"?)
David Cole (manager)
2012-06-25 08:33

Oh, never mind. I see the comment about the character class now...

Maybe it's better fixed by just leaving that section of the reg ex as ".*" to match anything there...?
Rolf Eike Beer (developer)
2012-06-25 09:11

I think the best regex is really


i.e. allowing anything after the number. This is only used for Jave_VERSION_STRING which may contain more or less arbitrary content anyway.
David Cole (manager)
2012-06-25 10:46


The regex you propose in [^] sounds reasonable to me. As long as we can extract the numerical portions of the string for version comparisons down to the patch level, I think that's good.

Any reason not to just do that?

I can probably do it later today if we're agreed it's the best fix.
Rolf Eike Beer (developer)
2012-06-25 12:55

I'm all for it. I just have not touched it because I thought that stuff had a reason for being there in the first place. Looks like it doesn't.

Fix pushed to next:;a=commitdiff;h=304562e7b51d17735f8e8980e028a00d88b6d1ea [^]
David Cole (manager)
2012-11-05 14:33

Closing resolved issues that have not been updated in more than 4 months.

- Issue History
Date Modified Username Field Change
2012-01-17 12:55 Dan Kegel New Issue
2012-01-17 12:56 Dan Kegel File Added: icedtea.patch
2012-06-25 08:32 David Cole Note Added: 0029824
2012-06-25 08:33 David Cole Note Added: 0029825
2012-06-25 09:11 Rolf Eike Beer Note Added: 0029826
2012-06-25 10:46 David Cole Note Added: 0029827
2012-06-25 12:55 Rolf Eike Beer Note Added: 0029828
2012-06-25 12:55 Rolf Eike Beer Assigned To => Rolf Eike Beer
2012-06-25 12:55 Rolf Eike Beer Status new => resolved
2012-06-25 12:55 Rolf Eike Beer Resolution open => fixed
2012-06-25 12:55 Rolf Eike Beer Fixed in Version => CMake 2.8.9
2012-06-25 12:55 Rolf Eike Beer Target Version => CMake 2.8.9
2012-11-05 14:33 David Cole Note Added: 0031460
2012-11-05 14:33 David Cole Status resolved => closed

Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker