opencv wrongly detects Java as installed on Mac OS X 10.7+ (Bugfix #2903)


Added by Misty De Meo almost 12 years ago. Updated almost 12 years ago.


Status:Done Start date:2013-03-22
Priority:Normal Due date:
Assignee:Misty De Meo % Done:

0%

Category:build/install
Target version:2.4.5
Affected version:branch 'master' (2.4.9) Operating System:
Difficulty: HW Platform:
Pull request:https://github.com/Itseez/opencv/pull/694

Description

Mac OS X 10.7 and newer don't come with Java installed. They do include some stub binaries, which ask the user if they want to install Java when run.

OpenCV's cmake script just checks for the existence of an ant binary and appears to assume that Java's available if ant is. As a result, cmake will configure the build to use Java and it will fail once it tries to compile the Java bindings.

This can be fixed by checking for the exit status of `ant -version` - it'll exit 0 if Java is installed, or 1 otherwise.

The user who reported this to me provided the attached patch.


opencv-2.4.4-ant.diff (939 Bytes) Misty De Meo, 2013-03-22 01:24 am


Associated revisions

Revision d262b04d
Added by Roman Donchenko over 10 years ago

Merge pull request #2903 from mmaraya:2.4

History

Updated by Daniil Osokin almost 12 years ago

Thanks for attention! Please, contribute a pull request (http://code.opencv.org/projects/opencv/wiki/How_to_contribute) with this bugfix. It will speedup fixing in many times!

  • Tracker changed from Bug to Bugfix

Updated by Daniil Osokin almost 12 years ago

  • Assignee changed from Andrey Kamaev to Misty De Meo

Updated by Daniil Osokin almost 12 years ago

Great! Many thanks for contribution!

  • Pull request set to https://github.com/Itseez/opencv/pull/694

Updated by Andrey Kamaev almost 12 years ago

Fix is merged to code base.

  • Target version set to 2.4.5
  • Status changed from Open to Done

Also available in: Atom PDF