OpenCV 2.4 clang compilation (Bug #1920)


Added by Michael Mueller almost 13 years ago. Updated almost 13 years ago.


Status:Cancelled Start date:2012-05-11
Priority:Normal Due date:
Assignee:Andrey Kamaev % Done:

0%

Category:build/install
Target version:2.4.1
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

Hi out there.

I could not find any good information if OpenCV is compatible with Clang.
However, if it should be I encountered an issue compiling 2.4. with clang 2.9 on ubuntu 11.10. If there is no compatibility planned, please close the bug.

Steps to reproduce:
- Run CMake with the given configuration
- After setting clang as compiler, the ENABLE_PRECOMPILED_HEADER flag will always be activated, can`t untoggle
- When running make the following error appears:

[ 0%] Generating opencv_core_pch_dephelp.cxx
Scanning dependencies of target opencv_core_pch_dephelp
[ 0%] Building CXX object modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.o
Linking CXX static library ../../lib/libopencv_core_pch_dephelp.a
[ 0%] Built target opencv_core_pch_dephelp
Scanning dependencies of target pch_Generate_opencv_core
[ 0%] Generating precomp.hpp
[ 0%] Generating precomp.hpp.gch/opencv_core_Release.gch
[ 0%] Built target pch_Generate_opencv_core
Scanning dependencies of target opencv_core
[ 1%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/dxt.cpp.o
error: unable to read PCH file: 'Is a directory'
make2: * [modules/core/CMakeFiles/opencv_core.dir/src/dxt.cpp.o] Error 1
make1:
[modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make: *
* [all] Error 2

Obviously something with precompiled headers.

Thank you for looking at it or giving a hint


Associated revisions

Revision 39754bd6
Added by Andrey Pavlenko over 11 years ago

Merge pull request #1920 from alalek:ocl_disable_workaround

History

Updated by Andrey Kamaev almost 13 years ago

You need to disable precompiled headers. Use cmake-gui application or from command line

cmake -DENABLE_PRECOMPILED_HEADERS=OFF ..

  • Status changed from Open to Cancelled
  • Target version set to 2.4.1
  • Category set to build/install
  • Assignee set to Andrey Kamaev

Updated by Michael Mueller almost 13 years ago

hi andrey,

tried that.cmake keeps reenabling the precompiled header flag during the configuration process when choosing clang as compiler.this is part of the bug.when gcc is used cmake can be convinced to disable precompiled headers

Also available in: Atom PDF