Cmake fails in compiling Caffe with lmdb.h - c++

Windows 10 Visual Studio 14
I am trying to build a c++ code based on this github page. However, when I try to generate lib files in Cmake I get this error:
I don't know what's wrong with lmdb.h file. Should I build lmdb from scratch?
There are 2 error messages:
CMake Warning (dev) at cmake/Dependencies.cmake:46 (find_package):
Policy CMP0074 is not set: find_package uses _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 HDF5_ROOT is set to:
C:\Program Files\HDF_Group\HDF5\1.10.3
For compatibility, CMake is ignoring the variable. Call Stack (most
recent call first): CMakeLists.txt:49 (include) This warning is for
project developers. Use -Wno-dev to suppress it.
CMake Error at cmake/Utils.cmake:105 (if): Syntax error in cmake
code at
C:/Project/RCNN/Faster RCNN/caffe-faster-rcnn-dev/cmake/Utils.cmake:105
when parsing string
C:\Project\RCNN\Faster RCNN\Packages\lmdb-mdb.master\libraries\liblmdb/lmdb.h
Invalid escape sequence \P Call Stack (most recent call first):
cmake/Modules/FindLMDB.cmake:25 (caffe_parse_header)
cmake/Dependencies.cmake:52 (find_package) CMakeLists.txt:49
(include)
1: https://github.com/D-X-Y/caffe-faster-rcnn/tree/dev [2]:
https://i.stack.imgur.com/hc30J.png
Also the paths for GLOG, GFLAGS, and PROTOBUF are not found.

Related

problem with eclipse build cmake espidf Error: could not find CMAKE_PROJECT_NAME in Cache

I have a problem with the eclipse IDE with ESP-IDF, every time that i build a project i get this massage-
Building in: C:\Users\eclipse-workspace06\blynk\build
Configuring in: C:\Users\eclipse-workspace06\blynk\build
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=D:\espidfeclipse\esp-idf-v5.0\tools\cmake\toolchain-esp32.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCCACHE_ENABLE=1 -DIDF_TARGET=esp32 C:\Users\eclipse-workspace06\blynk
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.28.0.windows.1")
CMake Error at D:/espidfeclipse/esp-idf-v5.0/tools/cmake/build.cmake:181 (file):
file FILE([TO_CMAKE_PATH|TO_NATIVE_PATH] path result) must be called with
-- Configuring incomplete, errors occurred!
exactly three arguments.
Call Stack (most recent call first):
D:/espidfeclipse/esp-idf-v5.0/tools/cmake/idf.cmake:53 (__build_init)
D:/espidfeclipse/esp-idf-v5.0/tools/cmake/project.cmake:12 (include)
CMakeLists.txt:5 (include)
CMake Error at D:/espidfeclipse/esp-idf-v5.0/tools/cmake/project.cmake:18 (message):
Internal error, PYTHON build property not set correctly.
Call Stack (most recent call first):
CMakeLists.txt:5 (include)
cmake --build . -- -v
Error: could not find CMAKE_PROJECT_NAME in Cache
Build complete (1 errors, 0 warnings): C:\Users\eclipse-workspace06\blynk\build
Total time taken to build the project: 246 ms
The code is an example code that works on VScode and Arduino, i installed and reinstalled every thing 100 times already. ( and if i build regular c++ it works alright)
I will be grateful for any help i can get.
Thank you #drescherjm and #Tsyvarev for putting me on the right path.
I solved the problem and the solution is very odd. what i did was to delete all the python instances from the different environment variables and it worked for some bizarre reason.

Install BLAS DLLs separately or there is a full package or another soloution

I am configuring a project via CMAKE 3.10.1 with MinGW.also I installed BLAS from sources(compiled with CMAKE) .I got Two DLL files. libblas.dll and liblapack.dll.I see only BLAS_blas_LIBRARY is pointed to C:/Windows/System32/libblas.dll. others not.such as :
BLAS_Accelerate_LIBRARY-NOTFOUND
BLAS_acml_LIBRARY-NOTFOUND
BLAS_acml_mp_LIBRARY-NOTFOUND
BLAS_complib.sgimath_LIBRARY-NOTFOUND
BLAS_cxml_LIBRARY-NOTFOUND
BLAS_dxml_LIBRARY-NOTFOUND
BLAS_essl_LIBRARY-NOTFOUND
BLAS_f77blas_LIBRARY-NOTFOUND
BLAS_goto2_LIBRARY-NOTFOUND
BLAS_mkl_intel_c_dll_LIBRARY-NOTFOUND
BLAS_mkl_intel_lp64_dll_LIBRARY-NOTFOUND
BLAS_openblas_LIBRARY-NOTFOUND
BLAS_scsl_LIBRARY-NOTFOUND
BLAS_sgemm_LIBRARY-NOTFOUND
BLAS_sunperf_LIBRARY-NOTFOUND
BLAS_vecLib_LIBRARY-NOTFOUND
only
BLAS_blas_LIBRARY C:/Windows/System32/libblas.dll
The CMake stop at this error :
CMake Error at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBLAS.cmake:699 (message):
A required library with BLAS API not found. Please specify library
location.
Call Stack (most recent call first):
CMakeLists.txt:155 (FIND_PACKAGE)
so I should install all of those DLLs separately(I searched and googled a lot,there are not integrated) or there is a full BLAS package?or problem is with something else.
here is :
my Cmake snapshot
here is :
all my instruction

Gnuradio crash after installing own block

i am trying to install a own Block for gnuradio. I go through this(http://gnuradio.org/redmine/projects/gnuradio/wiki/Guided_Tutorial_GNU_Radio_in_C++) tutorial. But in Step 5, Installing, I get some problems.
I installed it, but i didnt see the Block in gnuradio-companion.
I added the path:
export PYTHONPATH=/usr/local/lib/python2.7/site-packages/
export GRC_BLOCKS_PATH=/usr/local/share/gnuradio/grc/blocks/
Now i can see the Block: But if I want to use it, the gnuradio-companion crash.
^[[A^[[BFatal Python error: PyThreadState_Get: no current thread
Abort trap: 6
Gnuradio Version: 3.7.10.1
OS: OS X El Capitan
What could be the problem? Wrong/Missing path? Mistake in the program?
/edit2: To add a Block, writen in python works fine(With the tutorial: http://gnuradio.org/redmine/projects/gnuradio/wiki/Guided_Tutorial_GNU_Radio_in_Python)
/edit: When I install it, I get many warnings when i use cmake:
-- Build type not specified: defaulting to release.
-- Boost version: 1.59.0
-- Found the following Boost libraries:
-- filesystem
-- system
Checking for GNU Radio Module: RUNTIME
* INCLUDES=/opt/local/include
* LIBS=/opt/local/lib/libgnuradio-runtime.dylib;/opt/local/lib/libgnuradio-pmt.dylib
GNURADIO_RUNTIME_FOUND = TRUE
CMake Warning (dev) at cmake/Modules/GrTest.cmake:45 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
The LOCATION property should not be read from target "test-tutorialCPP".
Use the target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.
Call Stack (most recent call first):
lib/CMakeLists.txt:77 (GR_ADD_TEST)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Using install prefix: /usr/local
-- Building for version: v1.0-compat-xxx-xunknown / 1.0.0git
--
-- Checking for module SWIG
-- Found SWIG version 3.0.10.
CMake Warning (dev) at cmake/Modules/GrTest.cmake:45 (get_target_property):
Policy CMP0026 is not set: Disallow use of the LOCATION target property.
Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
The LOCATION property should not be read from target
"gnuradio-tutorialCPP". Use the target name directly with
add_custom_command, or use the generator expression $<TARGET_FILE>, as
appropriate.
Call Stack (most recent call first):
python/CMakeLists.txt:44 (GR_ADD_TEST)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at cmake/Modules/GrTest.cmake:45 (get_target_property):
Policy CMP0045 is not set: Error on non-existent target in
get_target_property. Run "cmake --help-policy CMP0045" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
get_target_property() called with non-existent target
"/opt/local/bin/python2.7".
Call Stack (most recent call first):
python/CMakeLists.txt:44 (GR_ADD_TEST)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at cmake/Modules/GrTest.cmake:45 (get_target_property):
Policy CMP0045 is not set: Error on non-existent target in
get_target_property. Run "cmake --help-policy CMP0045" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
get_target_property() called with non-existent target
"/Users/abc/dev/gnuradio/modul/gr-tutorialCPP/python/qa_my_qpsk_demod_cb.py".
Call Stack (most recent call first):
python/CMakeLists.txt:44 (GR_ADD_TEST)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/abc/dev/gnuradio/modul/gr-tutorialCPP/build
This happens when GNU Radio and your module are linked against different Python libraries.
On OSX, there is usually a system installation and another one from Homebrew or MacPorts. Try linking everything against the Homebrew/MacPorts libraries.
You seem to have a Python installation in /opt/local. Use cmake to reconfigure your module and point PYTHON_LIBRARY and PYTHON_INCLUDE_DIR to the installation in /opt.

Installing OpenCV 3.1.0 with CMake on Windows 7, opencv_ffmpeg.dll invalid hash

I'm trying to install OpenCV 3.1.0 with MSVC2015 compiler using CMake. I get an error saying that the file hash is different from the expected hash. I have no access to internet on the PC this needs to be installed on. I tired to install it successfully on a PC with internet to see if I could copy those files to the PC without internet. But that didn't work as CMake deletes the files, and tries to do it it's own way. I also tried this solution, but it didn't work.
Here is the error message:
CMake Warning at cmake/OpenCVUtils.cmake:872 (message):
Download: Local copy of opencv_ffmpeg.dll has invalid MD5 hash:
d41d8cd98f00b204e9800998ecf8427e (expected:
89c783eee1c47bfc733f08334ec2e31c)
Call Stack (most recent call first):
3rdparty/ffmpeg/ffmpeg.cmake:10 (ocv_download)
cmake/OpenCVFindLibsVideo.cmake:206 (include)
CMakeLists.txt:536 (include)
Downloading opencv_ffmpeg.dll...
CMake Error at cmake/OpenCVUtils.cmake:895 (file):
file DOWNLOAD HASH mismatch
for file: [C:/OpenCV/opencv/sources/3rdparty/ffmpeg/downloads/89c783eee1c47bfc733f08334ec2e31c/opencv_ffmpeg.dll]
expected hash: [89c783eee1c47bfc733f08334ec2e31c]
actual hash: [d41d8cd98f00b204e9800998ecf8427e]
status: [6;"Couldn't resolve host name"]
Call Stack (most recent call first):
3rdparty/ffmpeg/ffmpeg.cmake:10 (ocv_download)
cmake/OpenCVFindLibsVideo.cmake:206 (include)
CMakeLists.txt:536 (include)
CMake Error at cmake/OpenCVUtils.cmake:899 (message):
Failed to download opencv_ffmpeg.dll. Status=6;"Couldn't resolve host
name"
Call Stack (most recent call first):
3rdparty/ffmpeg/ffmpeg.cmake:10 (ocv_download)
cmake/OpenCVFindLibsVideo.cmake:206 (include)
CMakeLists.txt:536 (include)
I would like to be able to install this without internet, but it proves very diffucult. Does anyone have any solutions to this?
Thanks in advance.
I found sub-string ffmpeg.dll in opencv\sources\3dparty\ffmpeg\ffmpeg.cmake:
set(FFMPEG_BINARIES_COMMIT "8aeefc4efe3215de89d8c7e114ae6f7a6091b8eb")
set(FFMPEG_FILE_HASH_BIN32 "89c783eee1c47bfc733f08334ec2e31c")
set(FFMPEG_FILE_HASH_BIN64 "35fe6ccdda6d7a04e9056b0d73b98e76")
set(FFMPEG_FILE_HASH_CMAKE "8606f947a780071f8fcce8cbf39ceef5")
set(FFMPEG_DOWNLOAD_URL https://raw.githubusercontent.com/Itseez/opencv_3rdparty/${FFMPEG_BINARIES_COMMIT}/ffmpeg/)
ocv_download(PACKAGE ...)
Download files:
https://raw.githubusercontent.com/Itseez/opencv_3rdparty/8aeefc4efe3215de89d8c7e114ae6f7a6091b8eb/ffmpeg/{opencv_ffmpeg.dll,opencv_ffmpeg_64.dll,ffmpeg_version.cmake}
and copy it to:
opencv\sources\3rdparty\ffmpeg\downloads\%HASH%\
Then cmake.exe -G "CodeBlocks - MinGW Makefiles" .
and mingw32-make.exe

Unsupported Compiler

This is the error I'm getting on the CMake GUI:
CMake Error at cmake/Config.cmake:106 (message):
Unsupported compiler
Call Stack (most recent call first):
CMakeLists.txt:20 (include)
Configuring incomplete, errors occurred!
See also "C:/cygwin/home/sfml-build/CMakeFiles/CMakeOutput.log".
See also "C:/cygwin/home/sfml-build/CMakeFiles/CMakeError.log".
I'm not sure what causes this. I clicked "Configure" and that is what happened.
This is line 20:
# include the configuration file
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Config.cmake)
I'm new to CMake so I'm not sure what that means.
SFML doesn't support cygwin at the moment. ref