pthread_create not found in ubuntu - c++

I am trying to run cocos2d-x on Ubuntu. It shows this error:
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
What does this mean?

it seems like it eventually finds pthread_create but it is missing Doxygen. Run sudo apt-get install doxygen, and retry it.

pthread_create may be present in few different places. Script checked them all and found this function in pthread. Then it looked for Doxygen and was not able to find it. Install it and try again, script should be able to proceed.

Related

Using vcpkg to install RTABMap with VSCode as editor

I want to install RTABMap with vcpkg and then use VSCode as editor to include RTABMap into my C++ project. I installed RTABMap as described on their wiki with vcpkg install rtabmap:x64-windows (i also tried the x86 triplet) and then wanted to use it in my project. To get started I wrote the following cmake file based on an example from their repository:
cmake_minimum_required(VERSION 3.5)
project(RTABMap_Test VERSION 0.1.0)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")
find_package(RTABMap REQUIRED)
find_package(OpenCV REQUIRED)
set(INCLUDE_DIRS
${RTABMap_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
set(LIBRARIES
${RTABMap_LIBRARIES}
${OpenCV_LIBRARIES}
)
include_directories(${INCLUDE_DIRS})
add_executable(RTABMap_Test main.cpp)
target_link_libraries(RTABMap_Test ${LIBRARIES})
and the following main.cpp file:
#include <rtabmap/core/Rtabmap.h>
int main(void) {
return 0;
}
The cmake settings in VSCode are as follows:
"cmake.configureSettings": {
"CMAKE_TOOLCHAIN_FILE": "G:/.vcpkg/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "x64-windows"
}
However, when I run CMake: Build from VSCode, cmake fails with the following message:
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
-- The C compiler identification is MSVC 19.32.31332.0
-- The CXX compiler identification is MSVC 19.32.31332.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at G:/.vcpkg/installed/x64-windows/share/rtabmap/RTABMapConfig.cmake:78 (MESSAGE):
Asked for "gui" module but RTABMap hasn't been built with gui support.
Call Stack (most recent call first):
G:/.vcpkg/scripts/buildsystems/vcpkg.cmake:843 (_find_package)
CMakeLists.txt:6 (find_package)
-- Found RTABMap: RTABMap_CORE_RELEASE-NOTFOUND;RTABMap_UTILITE_RELEASE-NOTFOUND;optimized;G:/.vcpkg/installed/x64-windows/lib/zlib.lib;debug;G:/.vcpkg/installed/x64-windows/debug/lib/zlibd.lib
-- Found Protobuf: G:/.vcpkg/installed/x64-windows/tools/protobuf/protoc.exe (found version "3.21.12.0")
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Found TIFF: optimized;G:/.vcpkg/installed/x64-windows/lib/tiff.lib;debug;G:/.vcpkg/installed/x64-windows/debug/lib/tiffd.lib (found version "4.5.0")
-- Found HDF5: hdf5::hdf5-shared (found version "1.12.2")
-- Found ZLIB: optimized;G:/.vcpkg/installed/x64-windows/lib/zlib.lib;debug;G:/.vcpkg/installed/x64-windows/debug/lib/zlibd.lib (found suitable version "1.2.13", minimum required is "1")
-- Found JPEG: optimized;G:/.vcpkg/installed/x64-windows/lib/jpeg.lib;debug;G:/.vcpkg/installed/x64-windows/debug/lib/jpeg.lib (found version "62")
-- Found ZLIB: optimized;G:/.vcpkg/installed/x64-windows/lib/zlib.lib;debug;G:/.vcpkg/installed/x64-windows/debug/lib/zlibd.lib (found version "1.2.13")
-- Found PNG: optimized;G:/.vcpkg/installed/x64-windows/lib/libpng16.lib;debug;G:/.vcpkg/installed/x64-windows/debug/lib/libpng16d.lib (found version "1.6.39")
-- Found GIF: optimized;G:/.vcpkg/installed/x64-windows/lib/gif.lib;debug;G:/.vcpkg/installed/x64-windows/debug/lib/gif.lib (found version "5.2.1")
-- Found LibArchive: G:/.vcpkg/installed/x64-windows/debug/lib/archive.lib (found version "3.6.2")
-- Found OpenCV: G:/.vcpkg/installed/x64-windows (found version "4.7.0")
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
RTABMap_CORE_RELEASE
linked by target "RTABMap_Test" in directory G:/FKIE/rtabmap_test
RTABMap_UTILITE_RELEASE
linked by target "RTABMap_Test" in directory G:/FKIE/rtabmap_test
-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
On the other hand, when I run cmake . -DCMAKE_TOOLCHAIN_FILE=G:/.vcpkg/scripts/buildsystems/vcpkg.cmake I get this error:
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
CMake Warning at G:/.vcpkg/installed/x64-windows/share/rtabmap/RTABMapConfig.cmake:78 (MESSAGE):
Asked for "gui" module but RTABMap hasn't been built with gui support.
Call Stack (most recent call first):
G:/.vcpkg/scripts/buildsystems/vcpkg.cmake:843 (_find_package)
CMakeLists.txt:6 (find_package)
-- Found ZLIB: optimized;G:/.vcpkg/installed/x64-windows/lib/zlib.lib;debug;G:/.vcpkg/installed/x64-windows/debug/lib/zlibd.lib (found suitable version "1.2.13", minimum required is "1")
-- Found ZLIB: optimized;G:/.vcpkg/installed/x64-windows/lib/zlib.lib;debug;G:/.vcpkg/installed/x64-windows/debug/lib/zlibd.lib (found version "1.2.13")
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
RTABMap_CORE_RELEASE
linked by target "RTABMap_Test" in directory G:/FKIE/rtabmap_test
RTABMap_UTILITE_RELEASE
linked by target "RTABMap_Test" in directory G:/FKIE/rtabmap_test
-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
The two missing variables are set in the RTABMapConfig.cmake.in located at the root directory of the RTABMap repository and used by the CMakeLists.txt, so I assume that I don't have to set them manually, meaning -- as far as I can tell -- when vcpkg installs RTABMap it doesn't properly configure RTABMap.
What to do?
I had to write this as an answer due to character limitation. It's however more of a hint on what to look at rather then how to fix it.
Let's take a look at how RTABMapConfig.cmake is generated via the precursor file RTABMapConfig.cmake.in:
Lines 18-21:
find_library(RTABMap_CORE_RELEASE NAMES rtabmap_core NO_DEFAULT_PATH HINTS #CONF_LIB_DIR#)
find_library(RTABMap_CORE_DEBUG NAMES rtabmap_cored NO_DEFAULT_PATH HINTS #CONF_LIB_DIR#)
IF(RTABMap_CORE_DEBUG AND RTABMap_CORE_RELEASE)
#...
Not ideal for a .cmake.in but I'm not going to judge that. All that I'm going to say is that parts of the code rely on certain variables being set. The same variables that were "NOT FOUND" in your generation i.e. this line in the generation step:
-- [...] RTABMap_CORE_RELEASE-NOTFOUND [...]
If you would traverse the .cmake.in file down you would notice the same for the other "NOT FOUND" variable.
Later on we have:
Line 47:
set(RTABMap_LIBRARIES ${RTABMap_CORE} ${RTABMap_UTILITE})
Which is (as you probably know by now) empty.
Conclusion and possible solutions:
The RTABMapConfig.cmake can't find the proper libraries (if they exist) this can be caused either by the fact that during the vcpkg install phase something went wrong and the libraries weren't built OR the RTABMapConfig.cmake was poorly generated and needs to be fixed (the paths to the core and utilite libraries specifically)
Check if something like rtabmap_core.lib exists and if not - compilation failed and you need to reinstall rtabmap
If ad1) isn't the case then open up the RTABMapConfig.cmake and look at the paths to these libraries - fix them if needed.
EDIT: If I were you I would open up an issue on vcpkg's github.

Looking for Q_WS_X11 - not found

Trying to build code for ADTF using cmake and I get the following error. Could anyone let me know what is missing from my end? OS is Windows
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - not found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- Found OpenGL: opengl32
CMake Error at C:/Program Files/CMake/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Qt4 (missing: QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE
QT_UIC_EXECUTABLE) (found version "4.7.1")
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.11/Modules/FindQt4.cmake:1328 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:76 (find_package)
-- Configuring incomplete, errors occurred!
See also "D:/ViL_ADTF_filter/build/CMakeFiles/CMakeOutput.log".
See also "D:/ViL_ADTF_filter/build/CMakeFiles/CMakeError.log".
Just provided the path of all the missing executables in the CMakeLists and it worked. Thanks for all the responses

How to handle with 'Policy CMP0074 is not set' warning while using Cmake to build PCL tutorials?

I want to complete this basic tutorial:
http://pointclouds.org/documentation/tutorials/writing_pcd.php#writing-pcd
Its very simple. When I prepare CMakeLists.txt and .cpp file, I run them with CMake GUI and I get this warning. I installed PCL 1.9.1 so I build file for Visual Studio 2017 64x.
Selecting Windows SDK version 10.0.17134.0 to target Windows 10.0.17763.
The C compiler identification is MSVC 19.15.26726.0
The CXX compiler identification is MSVC 19.15.26726.0
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x64/cl.exe
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x64/cl.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Detecting C compile features
Detecting C compile features - done
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x64/cl.exe
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x64/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
CMake Warning (dev) at CMakeLists.txt:5(find_package):
Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
Run "cmake --help-policy CMP0074" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
Environment variable PCL_ROOT is set to:
C:\libraries\PCL 1.9.1
For compatibility, CMake is ignoring the variable. This warning is for project developers. Use -Wno-dev to suppress it.
Found Eigen: C:/libraries/PCL 1.9.1/3rdParty/Eigen/eigen3
Eigen found (include: C:/libraries/PCL 1.9.1/3rdParty/Eigen/eigen3, version: 3.3.5)
Looking for pthread.h
Looking for pthread.h - not found
Found Threads: TRUE
Found Boost: C:/libraries/PCL 1.9.1/3rdParty/Boost/include/boost-1_68 (found suitable version "1.68.0", minimum required is "1.40.0") found components: system filesystem thread date_time iostreams serialization chrono atomic regex
Found FLANN: C:/libraries/PCL 1.9.1/3rdParty/FLANN/lib/flann_cpp_s.lib FLANN found (include: C:/libraries/PCL 1.9.1/3rdParty/FLANN/include, lib: optimized;C:/libraries/PCL 1.9.1/3rdParty/FLANN/lib/flann_cpp_s.lib;debug;C:/libraries/PCL 1.9.1/3rdParty/FLANN/lib/flann_cpp_s-gd.lib)
FLANN found (include: C:/libraries/PCL 1.9.1/3rdParty/FLANN/include, lib: optimized;C:/libraries/PCL 1.9.1/3rdParty/FLANN/lib/flann_cpp_s.lib;debug;C:/libraries/PCL 1.9.1/3rdParty/FLANN/lib/flann_cpp_s-gd.lib)
Found OpenNI2: C:/libraries/OpenNI2/Lib/OpenNI2.lib
OpenNI2 found (include: C:/libraries/OpenNI2/Include, lib: C:/libraries/OpenNI2/Lib/OpenNI2.lib)
OpenNI2 found (include: C:/libraries/OpenNI2/Include, lib: C:/libraries/OpenNI2/Lib/OpenNI2.lib)
Found Qhull: optimized;C:/libraries/PCL 1.9.1/3rdParty/Qhull/lib/qhullstatic.lib;debug;C:/libraries/PCL 1.9.1/3rdParty/Qhull/lib/qhullstatic_d.lib
QHULL found (include: C:/libraries/PCL 1.9.1/3rdParty/Qhull/include, lib: optimized;C:/libraries/PCL 1.9.1/3rdParty/Qhull/lib/qhullstatic.lib;debug;C:/libraries/PCL 1.9.1/3rdParty/Qhull/lib/qhullstatic_d.lib)
looking for PCL_COMMON
Found PCL_COMMON: C:/libraries/PCL 1.9.1/lib/pcl_common_release.lib
looking for PCL_KDTREE
Found PCL_KDTREE: C:/libraries/PCL 1.9.1/lib/pcl_kdtree_release.lib looking for PCL_OCTREE
Found PCL_OCTREE: C:/libraries/PCL 1.9.1/lib/pcl_octree_release.lib
looking for PCL_SEARCH
Found PCL_SEARCH: C:/libraries/PCL 1.9.1/lib/pcl_search_release.lib
looking for PCL_SAMPLE_CONSENSUS
Found PCL_SAMPLE_CONSENSUS: C:/libraries/PCL 1.9.1/lib/pcl_sample_consensus_release.lib
looking for PCL_FILTERS
Found PCL_FILTERS: C:/libraries/PCL 1.9.1/lib/pcl_filters_release.lib
looking for PCL_2D
Found PCL_2D: C:/libraries/PCL 1.9.1/include/pcl-1.9
looking for PCL_GEOMETRY
Found PCL_GEOMETRY: C:/libraries/PCL 1.9.1/include/pcl-1.9
looking for PCL_IO
Found PCL_IO: C:/libraries/PCL 1.9.1/lib/pcl_io_release.lib
looking for PCL_FEATURES
Found PCL_FEATURES: C:/libraries/PCL 1.9.1/lib/pcl_features_release.lib looking for PCL_ML
Found PCL_ML: C:/libraries/PCL 1.9.1/lib/pcl_ml_release.lib
looking for PCL_SEGMENTATION
Found PCL_SEGMENTATION: C:/libraries/PCL 1.9.1/lib/pcl_segmentation_release.lib
looking for PCL_VISUALIZATION
Found PCL_VISUALIZATION: C:/libraries/PCL 1.9.1/lib/pcl_visualization_release.lib
looking for PCL_SURFACE
Found PCL_SURFACE: C:/libraries/PCL 1.9.1/lib/pcl_surface_release.lib
looking for PCL_REGISTRATION
Found PCL_REGISTRATION: C:/libraries/PCL 1.9.1/lib/pcl_registration_release.lib
looking for PCL_KEYPOINTS
Found PCL_KEYPOINTS: C:/libraries/PCL 1.9.1/lib/pcl_keypoints_release.lib
looking for PCL_TRACKING
Found PCL_TRACKING: C:/libraries/PCL 1.9.1/lib/pcl_tracking_release.lib
looking for PCL_RECOGNITION
Found PCL_RECOGNITION: C:/libraries/PCL 1.9.1/lib/pcl_recognition_release.lib
looking for PCL_STEREO
Found PCL_STEREO: C:/libraries/PCL 1.9.1/lib/pcl_stereo_release.lib
looking for PCL_OUTOFCORE
Found PCL_OUTOFCORE: C:/libraries/PCL 1.9.1/lib/pcl_outofcore_release.lib
looking for PCL_PEOPLE
Found PCL_PEOPLE: C:/libraries/PCL 1.9.1/lib/pcl_people_release.lib
Found PCL: pcl_common;pcl_kdtree;pcl_octree;pcl_search;pcl_sample_consensus;pcl_filters;pcl_io;pcl_features;pcl_ml;pcl_segmentation;pcl_visualization;pcl_surface;pcl_registration;pcl_keypoints;pcl_tracking;pcl_recognition;pcl_stereo;pcl_outofcore;pcl_people;optimized;C:/libraries/PCL 1.9.1/3rdParty/Boost/lib/libboost_system-vc141-mt-x64-1_68.lib;debug;C:/libraries/PCL 1.9.1/3rdParty/Boost/lib/libboost_system-vc141-mt-gd-x64-1_68.lib;optimized;C:/libraries/PCL 1.9.1/3rdParty/Boost/lib/libboost_filesystem-vc141-mt-x64-1_68.lib;debug;C:/libraries/PCL 1.9.1/3rdParty/Boost/lib/libboost_filesystem-vc141-mt-gd-x64-1_68.lib;optimized;C:/libraries/PCL 1.9.1/3rdParty/Boost/lib/libboost_thread-vc141-mt-x64-1_68.lib;debug;C:/libraries/PCL 1.9.1/3rdParty/Boost/lib/libboost_thread-vc141-mt-gd-x64-1_68.lib;optimized;C:/libraries/PCL 1.9.1/3rdParty/Boost/lib/libboost_date_time-vc141-mt-x64-1_68.lib;debug;C:/libraries/PCL 1.9.1/3rdParty/Boost/lib/libboost_date_time-vc141-mt-gd-x64-1_68.lib;optimized;C:/libraries/PCL 1.9.1/3rdParty/Boost/lib/libboost_iostreams-vc141-mt-x64-1_68.lib;debug;C:/libraries/PCL 1.9.1/3rdParty/Boost/lib/libboost_iostreams-vc141-mt-gd-x64-1_68.lib;optimized;C:/libraries/PCL 1.9.1/3rdParty/Boost/lib/libboost_serialization-vc141-mt-x64-1_68.lib;debug;C:/libraries/PCL 1.9.1/3rdParty/Boost/lib/libboost_serialization-vc141-mt-gd-x64-1_68.lib;optimized;C:/libraries/PCL 1.9.1/3rdParty/Boost/lib/libboost_chrono-vc141-mt-x64-1_68.lib;debug;C:/libraries/PCL 1.9.1/3rdParty/Boost/lib/libboost_chrono-vc141-mt-gd-x64-1_68.lib;optimized;C:/libraries/PCL 1.9.1/3rdParty/Boost/lib/libboost_atomic-vc141-mt-x64-1_68.lib;debug;C:/libraries/PCL 1.9.1/3rdParty/Boost/lib/libboost_atomic-vc141-mt-gd-x64-1_68.lib;optimized;C:/libraries/PCL 1.9.1/3rdParty/Boost/lib/libboost_regex-vc141-mt-x64-1_68.lib;debug;C:/libraries/PCL 1.9.1/3rdParty/Boost/lib/libboost_regex-vc141-mt-gd-x64-1_68.lib;optimized;C:/libraries/PCL 1.9.1/3rdParty/Qhull/lib/qhullstatic.lib;debug;C:/libraries/PCL 1.9.1/3rdParty/Qhull/lib/qhullstatic_d.lib;C:/libraries/OpenNI2/Lib/OpenNI2.lib;optimized;C:/libraries/PCL 1.9.1/3rdParty/FLANN/lib/flann_cpp_s.lib;debug;C:/libraries/PCL 1.9.1/3rdParty/FLANN/lib/flann_cpp_s-gd.lib;vtksys;vtkCommonCore;vtkCommonMath;vtkCommonMisc;vtkCommonSystem;vtkCommonTransforms;vtkCommonDataModel;vtkCommonColor;vtkCommonExecutionModel;vtkCommonComputationalGeometry;vtkFiltersCore;vtkFiltersGeneral;vtkImagingCore;vtkImagingFourier;vtkalglib;vtkFiltersStatistics;vtkFiltersExtraction;vtkInfovisCore;vtkFiltersGeometry;vtkFiltersSources;vtkRenderingCore;vtkzlib;vtkfreetype;vtkRenderingFreeType;vtkRenderingContext2D;vtkChartsCore;vtkDICOMParser;vtklz4;vtkIOCore;vtkIOLegacy;vtkexpat;vtkIOXMLParser;vtkDomainsChemistry;vtkIOXML;vtkParallelCore;vtkFiltersAMR;vtkFiltersFlowPaths;vtkFiltersGeneric;vtkImagingSources;vtkFiltersHybrid;vtkFiltersHyperTree;vtkImagingGeneral;vtkFiltersImaging;vtkFiltersModeling;vtkFiltersParallel;vtkFiltersParallelImaging;vtkFiltersPoints;vtkFiltersProgrammable;vtkFiltersSMP;vtkFiltersSelection;vtkFiltersTexture;vtkFiltersTopology;verdict;vtkFiltersVerdict;vtkmetaio;vtkjpeg;vtkpng;vtktiff;vtkIOImage;vtkImagingHybrid;vtkInfovisLayout;vtkInteractionStyle;vtkImagingColor;vtkRenderingAnnotation;vtkRenderingVolume;vtkInteractionWidgets;vtkViewsCore;vtkproj4;vtkGeovisCore;vtkhdf5_hl;vtkhdf5;vtkIOAMR;vtkIOEnSight;vtkNetCDF;vtkexoIIc;vtkIOExodus;vtkRenderingOpenGL;vtkRenderingContextOpenGL;vtkgl2ps;vtkRenderingGL2PS;vtklibharu;vtkIOExport;vtkRenderingLabel;vtkIOExportOpenGL;vtkIOGeometry;vtkIOImport;vtklibxml2;vtkIOInfovis;vtkIOLSDyna;vtkIOMINC;vtkoggtheora;vtkIOMovie;vtknetcdfcpp;vtkIONetCDF;vtkIOPLY;vtkjsoncpp;vtkIOParallel;vtkIOParallelXML;vtksqlite;vtkIOSQL;vtkIOTecplotTable;vtkIOVideo;vtkImagingMath;vtkImagingMorphological;vtkImagingStatistics;vtkImagingStencil;vtkInteractionImage;vtkRenderingImage;vtkRenderingLIC;vtkRenderingLOD;vtkRenderingVolumeOpenGL;vtkViewsContext2D;vtkViewsInfovis (Required is at least version "1.2")
Configuring done
Generating done
After build, when I click open project and run it, I get this error.
Any solution for it?
The CMP0074 warning is not really a problem you as a user need to worry about. It's a warning for the developer of the CMakeLists.txt that a behavior in CMake has changed.
https://cmake.org/cmake/help/latest/policy/CMP0074.html
In CMake 3.12 and above the find_package() command now
searches prefixes specified by the _ROOT CMake variable
and the ROOT environment variable. Package roots are
maintained as a stack so nested calls to all find* commands inside
find modules also search the roots as prefixes. This policy provides
compatibility with projects that have not been updated to avoid using
_ROOT variables for other purposes.
The OLD behavior for this policy is to ignore _ROOT
variables. The NEW behavior for this policy is to use
_ROOT variables.
Basically the warning is that the developers of the CMakeLists.txt have not set the policy to enable the new behavior or to keep the old behavior however the PCL_ROOT was defined. CMake will not automatically use it because the new behavior is not enabled.
The ALL_BUILD error message is because the ALL_BUILD target / project is not an executable target. It's purpose is to force building of all projects in the solution. To fix that part you need to right click on an executable project / target in the Solution Explorer and click "Set this project as the startup project"

Building llvm with CMake on Windows

I am trying to build LLVM / Clang on Windows 10 pro following the instruction from llvm. I also have followed all suggestions I could find from prior posts and other sites, but still got errors. Thanks for the help.
I tried it with GCC and Visual Studio separately. Below are the tools I used:
CMake 3.8.0
MinGW GCC 5.3.0 / Visual Studio 15
Python 2.7
LLVM / Clang 4.0 (source files)
Here is what I got:
I checked the path for tools and I think it's fine
CMake was able to find the compiler (GCC or Visual Studio) and starts the configuration.
But there are quite a few files missing for both approahces, only
different files are missing
I also tried to add libraries and components to MinGW / msys and Visual Studio installations. But it didn't help.
Below is the log I got for the attempt with GCC:
!
-- The C compiler identification is GNU 5.3.0
-- The CXX compiler identification is GNU 5.3.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for dirent.h
-- Looking for dirent.h - found
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for errno.h
-- Looking for errno.h - found
-- Looking for execinfo.h
-- Looking for execinfo.h - not found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for link.h
-- Looking for link.h - not found
-- Looking for malloc.h
-- Looking for malloc.h - found
-- Looking for malloc/malloc.h
-- Looking for malloc/malloc.h - not found
-- Looking for ndir.h
-- Looking for ndir.h - not found
-- Looking for signal.h
-- Looking for signal.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for sys/dir.h
-- Looking for sys/dir.h - not found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - not found
-- Looking for sys/mman.h
-- Looking for sys/mman.h - not found
-- Looking for sys/ndir.h
-- Looking for sys/ndir.h - not found
-- Looking for sys/param.h
-- Looking for sys/param.h - found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - not found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for sys/uio.h
-- Looking for sys/uio.h - not found
-- Looking for termios.h
-- Looking for termios.h - not found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for valgrind/valgrind.h
-- Looking for valgrind/valgrind.h - not found
-- Looking for zlib.h
-- Looking for zlib.h - not found
-- Looking for fenv.h
-- Looking for fenv.h - found
-- Looking for FE_ALL_EXCEPT
-- Looking for FE_ALL_EXCEPT - found
-- Looking for FE_INEXACT
-- Looking for FE_INEXACT - found
-- Looking for mach/mach.h
-- Looking for mach/mach.h - not found
-- Looking for histedit.h
-- Looking for histedit.h - not found
-- Looking for CrashReporterClient.h
-- Looking for CrashReporterClient.h - not found
-- Looking for xar_open in xar
-- Looking for xar_open in xar - not found
-- Looking for arc4random
-- Looking for arc4random - not found
-- Looking for backtrace
-- Looking for backtrace - not found
-- Looking for _Unwind_Backtrace
-- Looking for _Unwind_Backtrace - found
-- Looking for getpagesize
-- Looking for getpagesize - not found
-- Looking for sysconf
-- Looking for sysconf - not found
-- Looking for getrusage
-- Looking for getrusage - not found
-- Looking for setrlimit
-- Looking for setrlimit - not found
-- Looking for isatty
-- Looking for isatty - found
-- Looking for futimens
-- Looking for futimens - not found
-- Looking for futimes
-- Looking for futimes - not found
-- Looking for posix_fallocate
-- Looking for posix_fallocate - not found
-- Looking for sigaltstack
-- Looking for sigaltstack - not found
-- Looking for lseek64
-- Looking for lseek64 - found
-- Looking for mallctl
-- Looking for mallctl - not found
-- Looking for mallinfo
-- Looking for mallinfo - not found
-- Looking for malloc_zone_statistics
-- Looking for malloc_zone_statistics - not found
-- Looking for mkdtemp
-- Looking for mkdtemp - found
-- Looking for mkstemp
-- Looking for mkstemp - found
-- Looking for mktemp
-- Looking for mktemp - found
-- Looking for getcwd
-- Looking for getcwd - found
-- Looking for gettimeofday
-- Looking for gettimeofday - found
-- Looking for getrlimit
-- Looking for getrlimit - not found
-- Looking for posix_spawn
-- Looking for posix_spawn - not found
-- Looking for pread
-- Looking for pread - not found
-- Looking for realpath
-- Looking for realpath - not found
-- Looking for sbrk
-- Looking for sbrk - not found
-- Looking for strtoll
-- Looking for strtoll - found
-- Looking for strerror
-- Looking for strerror - found
-- Looking for strerror_r
-- Looking for strerror_r - found
-- Looking for strerror_s
-- Looking for strerror_s - found
-- Looking for setenv
-- Looking for setenv - found
-- Looking for _chsize_s
-- Looking for _chsize_s - not found
-- Looking for _alloca
-- Looking for _alloca - found
-- Looking for __alloca
-- Looking for __alloca - not found
-- Looking for __chkstk
-- Looking for __chkstk - found
-- Looking for __chkstk_ms
-- Looking for __chkstk_ms - found
-- Looking for ___chkstk
-- Looking for ___chkstk - not found
-- Looking for ___chkstk_ms
-- Looking for ___chkstk_ms - not found
-- Looking for __ashldi3
-- Looking for __ashldi3 - found
-- Looking for __ashrdi3
-- Looking for __ashrdi3 - found
-- Looking for __divdi3
-- Looking for __divdi3 - found
-- Looking for __fixdfdi
-- Looking for __fixdfdi - found
-- Looking for __fixsfdi
-- Looking for __fixsfdi - found
-- Looking for __floatdidf
-- Looking for __floatdidf - found
-- Looking for __lshrdi3
-- Looking for __lshrdi3 - found
-- Looking for __moddi3
-- Looking for __moddi3 - found
-- Looking for __udivdi3
-- Looking for __udivdi3 - found
-- Looking for __umoddi3
-- Looking for __umoddi3 - found
-- Looking for __main
-- Looking for __main - found
-- Looking for __cmpdi2
-- Looking for __cmpdi2 - found
-- Looking for dlopen
-- Looking for dlopen - found
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - not found
-- Performing Test HAVE_INT64_T
-- Performing Test HAVE_INT64_T - Success
-- Performing Test HAVE_UINT64_T
-- Performing Test HAVE_UINT64_T - Success
-- Performing Test HAVE_U_INT64_T
-- Performing Test HAVE_U_INT64_T - Failed
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB - Success
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB - Success
-- Performing Test LLVM_HAS_ATOMICS
-- Performing Test LLVM_HAS_ATOMICS - Success
-- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG
-- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG - Success
-- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG
-- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG - Failed
-- Performing Test HAS_MAYBE_UNINITIALIZED
-- Performing Test HAS_MAYBE_UNINITIALIZED - Success
-- Native target architecture is X86
-- Threads enabled.
-- Doxygen disabled.
-- Sphinx disabled.
-- Go bindings disabled.
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- LLVM host triple: i686-pc-mingw32
-- LLVM default target triple: i686-pc-mingw32
-- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG
-- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG - Success
-- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
-- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Failed
-- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
-- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Failed
-- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG
-- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Failed
-- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG
-- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Success
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP - Failed
-- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG
-- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG - Failed
-- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG
-- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG - Failed
-- Performing Test C_SUPPORTS_WERROR_DATE_TIME
-- Performing Test C_SUPPORTS_WERROR_DATE_TIME - Success
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME - Success
-- Performing Test CXX_SUPPORTS_CXX11
-- Performing Test CXX_SUPPORTS_CXX11 - Success
-- Found PythonInterp: D:/Python27/python.exe (found version "2.7.13")
-- Constructing LLVMBuild project information
-- LLVMHello ignored -- Loadable modules not supported on this platform.
-- Targeting AArch64
-- Targeting AMDGPU
-- Targeting ARM
-- Targeting BPF
-- Targeting Hexagon
-- Targeting Lanai
-- Targeting Mips
-- Targeting MSP430
-- Targeting NVPTX
-- Targeting PowerPC
-- Targeting RISCV
-- Targeting Sparc
-- Targeting SystemZ
-- Targeting X86
-- Targeting XCore
-- Looking for sys/resource.h
-- Looking for sys/resource.h - not found
-- Clang version: 4.0.0
-- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG
-- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG - Failed
-- SampleAnalyzerPlugin ignored -- Loadable modules not supported on this platform.
-- PrintFunctionNames ignored -- Loadable modules not supported on this platform.
-- AnnotateFunctions ignored -- Loadable modules not supported on this platform.
-- BugpointPasses ignored -- Loadable modules not supported on this platform.
-- Configuring done
-- Generating done
[edit] I ran mingw32-make and got the following messages:
Scanning dependencies of target LLVMDemangle
[ 0%] Building CXX object lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.obj
[ 0%] Linking CXX static library ..\libLLVMDemangle.a
[ 0%] Built target LLVMDemangle
Scanning dependencies of target LLVMSupport
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/APFloat.cpp.obj
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/APInt.cpp.obj
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.obj
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ARMBuildAttrs.cpp.obj
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ARMWinEH.cpp.obj
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Allocator.cpp.obj
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/BlockFrequency.cpp.obj
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/BranchProbability.cpp.obj
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/CachePruning.cpp.obj
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/circular_raw_ostream.cpp.obj
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Chrono.cpp.obj
D:\ydyz\resources\llvmfiles\llvm_source\llvm2\lib\Support\Chrono.cpp: In function 'tm llvm::getStructTM(llvm::sys::TimePoint<>)':
D:\ydyz\resources\llvmfiles\llvm_source\llvm2\lib\Support\Chrono.cpp:29:15: error: '::localtime_s' has not been declared
int Error = ::localtime_s(&Storage, &OurTime);
^
lib\Support\CMakeFiles\LLVMSupport.dir\build.make:312: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/Chrono.cpp.obj' failed
mingw32-make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/Chrono.cpp.obj] Error 1
CMakeFiles\Makefile2:495: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/all' failed
mingw32-make[1]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/all] Error 2
Makefile:150: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
Below are the results I got when building it with VS 2017:
D:\ydyz\resources\llvm_source\build2>vcvars64
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.0.26403.7
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
D:\ydyz\resources\llvm_source\build2>cmake -G "Visual Studio 15" D:\ydyz\resources\llvm_source\llvm2
-- The C compiler identification is MSVC 19.10.25019.0
-- The CXX compiler identification is MSVC 19.10.25019.0
-- The ASM compiler identification is MSVC
-- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Warning: Did not find file Compiler/MSVC-ASM
-- Looking for dirent.h
-- Looking for dirent.h - not found
-- Looking for dlfcn.h
-- Looking for dlfcn.h - not found
-- Looking for errno.h
-- Looking for errno.h - found
-- Looking for execinfo.h
-- Looking for execinfo.h - not found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for link.h
-- Looking for link.h - not found
-- Looking for malloc.h
-- Looking for malloc.h - found
-- Looking for malloc/malloc.h
-- Looking for malloc/malloc.h - not found
-- Looking for ndir.h
-- Looking for ndir.h - not found
-- Looking for signal.h
-- Looking for signal.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for sys/dir.h
-- Looking for sys/dir.h - not found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - not found
-- Looking for sys/mman.h
-- Looking for sys/mman.h - not found
-- Looking for sys/ndir.h
-- Looking for sys/ndir.h - not found
-- Looking for sys/param.h
-- Looking for sys/param.h - not found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - not found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - not found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for sys/uio.h
-- Looking for sys/uio.h - not found
-- Looking for termios.h
-- Looking for termios.h - not found
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- Looking for valgrind/valgrind.h
-- Looking for valgrind/valgrind.h - not found
-- Looking for zlib.h
-- Looking for zlib.h - not found
-- Looking for fenv.h
-- Looking for fenv.h - found
-- Looking for FE_ALL_EXCEPT
-- Looking for FE_ALL_EXCEPT - found
-- Looking for FE_INEXACT
-- Looking for FE_INEXACT - found
-- Looking for mach/mach.h
-- Looking for mach/mach.h - not found
-- Looking for histedit.h
-- Looking for histedit.h - not found
-- Looking for CrashReporterClient.h
-- Looking for CrashReporterClient.h - not found
-- Looking for xar_open in xar
-- Looking for xar_open in xar - not found
-- Looking for arc4random
-- Looking for arc4random - not found
-- Looking for backtrace
-- Looking for backtrace - not found
-- Looking for _Unwind_Backtrace
-- Looking for _Unwind_Backtrace - not found
-- Looking for getpagesize
-- Looking for getpagesize - not found
-- Looking for sysconf
-- Looking for sysconf - not found
-- Looking for getrusage
-- Looking for getrusage - not found
-- Looking for setrlimit
-- Looking for setrlimit - not found
-- Looking for isatty
-- Looking for isatty - not found
-- Looking for futimens
-- Looking for futimens - not found
-- Looking for futimes
-- Looking for futimes - not found
-- Looking for posix_fallocate
-- Looking for posix_fallocate - not found
-- Looking for sigaltstack
-- Looking for sigaltstack - not found
-- Looking for lseek64
-- Looking for lseek64 - not found
-- Looking for mallctl
-- Looking for mallctl - not found
-- Looking for mallinfo
-- Looking for mallinfo - not found
-- Looking for malloc_zone_statistics
-- Looking for malloc_zone_statistics - not found
-- Looking for mkdtemp
-- Looking for mkdtemp - not found
-- Looking for mkstemp
-- Looking for mkstemp - not found
-- Looking for mktemp
-- Looking for mktemp - not found
-- Looking for getcwd
-- Looking for getcwd - not found
-- Looking for gettimeofday
-- Looking for gettimeofday - not found
-- Looking for getrlimit
-- Looking for getrlimit - not found
-- Looking for posix_spawn
-- Looking for posix_spawn - not found
-- Looking for pread
-- Looking for pread - not found
-- Looking for realpath
-- Looking for realpath - not found
-- Looking for sbrk
-- Looking for sbrk - not found
-- Looking for strtoll
-- Looking for strtoll - found
-- Looking for strerror
-- Looking for strerror - found
-- Looking for strerror_r
-- Looking for strerror_r - not found
-- Looking for strerror_s
-- Looking for strerror_s - found
-- Looking for setenv
-- Looking for setenv - not found
-- Looking for _chsize_s
-- Looking for _chsize_s - found
-- Looking for _alloca
-- Looking for _alloca - not found
-- Looking for __alloca
-- Looking for __alloca - not found
-- Looking for __chkstk
-- Looking for __chkstk - not found
-- Looking for __chkstk_ms
-- Looking for __chkstk_ms - not found
-- Looking for ___chkstk
-- Looking for ___chkstk - not found
-- Looking for ___chkstk_ms
-- Looking for ___chkstk_ms - not found
-- Looking for __ashldi3
-- Looking for __ashldi3 - not found
-- Looking for __ashrdi3
-- Looking for __ashrdi3 - not found
-- Looking for __divdi3
-- Looking for __divdi3 - not found
-- Looking for __fixdfdi
-- Looking for __fixdfdi - not found
-- Looking for __fixsfdi
-- Looking for __fixsfdi - not found
-- Looking for __floatdidf
-- Looking for __floatdidf - not found
-- Looking for __lshrdi3
-- Looking for __lshrdi3 - not found
-- Looking for __moddi3
-- Looking for __moddi3 - not found
-- Looking for __udivdi3
-- Looking for __udivdi3 - not found
-- Looking for __umoddi3
-- Looking for __umoddi3 - not found
-- Looking for __main
-- Looking for __main - not found
-- Looking for __cmpdi2
-- Looking for __cmpdi2 - not found
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - not found
-- Performing Test HAVE_INT64_T
-- Performing Test HAVE_INT64_T - Success
-- Performing Test HAVE_UINT64_T
-- Performing Test HAVE_UINT64_T - Success
-- Performing Test HAVE_U_INT64_T
-- Performing Test HAVE_U_INT64_T - Failed
-- Performing Test LLVM_HAS_ATOMICS
-- Performing Test LLVM_HAS_ATOMICS - Success
-- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG
-- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG - Failed
-- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG
-- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG - Failed
-- Native target architecture is X86
-- Threads enabled.
-- Doxygen disabled.
-- Sphinx disabled.
-- Go bindings disabled.
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- LLVM host triple: i686-pc-win32
-- LLVM default target triple: i686-pc-win32
-- Using Debug VC++ CRT: MDd
-- Using Release VC++ CRT: MD
-- Using MinSizeRel VC++ CRT: MD
-- Using RelWithDebInfo VC++ CRT: MD
-- Found PythonInterp: D:/Python27/python.exe (found version "2.7.13")
-- Constructing LLVMBuild project information
-- LLVMHello ignored -- Loadable modules not supported on this platform.
-- Targeting AArch64
-- Targeting AMDGPU
-- Targeting ARM
-- Targeting BPF
-- Targeting Hexagon
-- Targeting Lanai
-- Targeting Mips
-- Targeting MSP430
-- Targeting NVPTX
-- Targeting PowerPC
-- Targeting RISCV
-- Targeting Sparc
-- Targeting SystemZ
-- Targeting X86
-- Targeting XCore
-- Looking for sys/resource.h
-- Looking for sys/resource.h - not found
-- Clang version: 4.0.0
-- SampleAnalyzerPlugin ignored -- Loadable modules not supported on this platform.
-- PrintFunctionNames ignored -- Loadable modules not supported on this platform.
-- AnnotateFunctions ignored -- Loadable modules not supported on this platform.
-- BugpointPasses ignored -- Loadable modules not supported on this platform.
-- Configuring done
-- Generating done
-- Build files have been written to: D:/ydyz/resources/llvm_source/build2

Cmake error while building OGRE

I am building OGRE source using cmake ../../ogre_src_v1-8-1 in my build directory. I have looked into many similar errors but nothing has worked out for me.
The output of the cmake command mentioned above gives following output:
-- Configuring OGRE 1.8.1
-- Detected g++ 4.8
-- Enabling GCC visibility flags
-- Search path: /home/kamal/Documents/ogre_src_v1-8-1/build/Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/build/../Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/../Dependencies
-- Looking for ZLIB...
-- Found ZLIB: optimized;/usr/lib/x86_64-linux-gnu/libz.so;debug;/usr/lib/x86_64-linux-gnu/libz.so
-- Looking for ZZip...
-- Found ZZip: optimized;/usr/lib/x86_64-linux-gnu/libzzip.so;debug;/usr/lib/x86_64-linux-gnu/libzzip.so
-- Looking for FreeImage...
-- checking for module 'freeimage'
-- package 'freeimage' not found
-- Found FreeImage: optimized;/usr/lib/libfreeimage.so;debug;/usr/lib/libfreeimage.so
-- Looking for FREETYPE...
-- CMAKE_PREFIX_PATH: /home/kamal/Documents/ogre_src_v1-8-1/build/Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/build/../Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/../Dependencies;/usr/local;/usr/lib/x86_64-linux-gnu
-- CMAKE_PREFIX_PATH: /home/kamal/Documents/ogre_src_v1-8-1/build/Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/build/../Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/../Dependencies;/usr/local;/usr/lib/x86_64-linux-gnu
-- Could not locate FREETYPE
-- Looking for Cg...
-- checking for module 'Cg'
-- package 'Cg' not found
-- Found Cg: optimized;/usr/lib/x86_64-linux-gnu/libCg.so;debug;/usr/lib/x86_64-linux-gnu/libCg.so
-- Looking for POCO...
-- checking for module 'POCO'
-- package 'POCO' not found
-- Could not locate POCO
-- Looking for TBB...
-- Found TBB: optimized;/usr/lib/libtbb.so;debug;/usr/lib/libtbb.so
-- Looking for TBB_MALLOC...
-- Found TBB_MALLOC: optimized;/usr/lib/libtbbmalloc.so;debug;/usr/lib/libtbbmalloc.so
-- Looking for TBB_MALLOC_PROXY...
-- Found TBB_MALLOC_PROXY: optimized;/usr/lib/libtbbmalloc_proxy.so;debug;/usr/lib/libtbbmalloc_proxy.so
-- Looking for GLSL_Optimizer...
-- checking for module 'GLSL_Optimizer'
-- package 'GLSL_Optimizer' not found
-- Could not locate GLSL_Optimizer
-- Looking for HLSL2GLSL...
-- checking for module 'HLSL2GLSL'
-- package 'HLSL2GLSL' not found
-- Could not locate HLSL2GLSL
-- Looking for OIS...
-- Found OIS: optimized;/usr/lib/x86_64-linux-gnu/libOIS.so;debug;/usr/lib/x86_64-linux-gnu/libOIS.so
-- Looking for Softimage...
-- Could not locate Softimage
-- Looking for CppUnit...
-- checking for module 'cppunit'
-- package 'cppunit' not found
-- Could not locate CppUnit
CMake Error at CMake/Utils/MacroLogFeature.cmake:100 (MESSAGE):
-----------------------------------------------------------------------------
-- The following REQUIRED packages could NOT be located on your system.
-- Please install them before continuing this software installation.
-- If you are in Windows, try passing -DOGRE_DEPENDENCIES_DIR=<path to dependencies>
-----------------------------------------------------------------------------
+ freetype: Portable font engine <http://www.freetype.org>
-----------------------------------------------------------------------------
Call Stack (most recent call first):
CMake/Dependencies.cmake:234 (MACRO_DISPLAY_FEATURE_LOG)
CMakeLists.txt:194 (include)
-- Configuring incomplete, errors occurred!
How to resolve this issue? Any help shall be appreciated!
It's missing the freetype library which is required for building OGRE. Make sure that the lib itself and the development package is installed on your system.
This might help, the OGRE wiki page with installation instructions for the prerequisites for various linux distros Install OGRE Prerequisite