zlib.h - no such file or directory, when building opencv - opencv

When I am building OpenCV, and running the make command, I get the following error:-
even though i have zlib installed in the path :-
zlib: /usr/include/zlib.h /usr/share/man/man3/zlib.3.gz
Has anyone encountered this error before?

Related

Lightgbm gpu installation

I am trying to run Lightgbm with gpu on Spyder. For installing the library I tried many commands but most have failed.
I tried "pip install lightgbm --install-option=--gpu" in anaconda prompt and got the
error.
The I followed the https://github.com/Microsoft/LightGBM/blob/master/docs/Installation-Guide.rst#build-gpu-version
I installed git, vs 2022, cmake and opencl(Cuda Toolkit)
For boost binaries I copied the boost_1_78_0 file in "C:\Boost".
But the file doesn't contain any "lib64-msvc-14.0"(or similar folder). This is the first problem but it contain libs folder so I gave that path(Hope that's right).
But then I get this error:
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
"CMake Error: The source directory "C:/Users/User Name/LightGBM/build" does not appear to contain CMakeLists.txt"
Any help is appreciated. Thanks

Problem with OpenCV C++ Ubuntu 16.04-/usr/bin/ld: cannot find -lopencv_*

I am new to Ubuntu. I installed OpenCV following http://milq.github.io/install-opencv-ubuntu-debian/. Note that opencv_contrib are not installed. I had an error initially that opencv4.pc file was not found which I corrected by creating a new opencv4.pc in usr/local/lib and making appropriate changes in ~/.bashrc file. Now the error while compiling using c++ file from :
https://cv-tricks.com/installation/opencv-4-1-ubuntu18-04/.
This is the error I got:
.
I tried to locate the missing files in other locations but I was unable to find them. Please help me solve my problem.

What CUDA version does torch/lua require?

I'm trying to install Torch/Lua version and am getting the build errors shown below. I see this discussion on Github encountering the same errors, but I don't see a resolution to it.
https://github.com/torch/torch7/issues/670
What version of CUDA does torch require? My best guess right now is that this is a CUDA version mismatch.
CMake Error at THC_generated_THCBlas.cu.o.cmake:267 (message):
Error generating file
~/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCBlas.cu.o
CMake Error at THC_generated_THCSleep.cu.o.cmake:267 (message):
Error generating file
~/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCSleep.cu.o
lib/THC/CMakeFiles/THC.dir/build.make:392: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o] Error 1
It appears that these issues were related to the g++ version I had (4.8). I installed the latest g++ version (5.2), then had to delete the torch directory, re-clone it, and the installation worked. Note that build artifacts will be left over so actually removing the whole torch directory was necessary.

OpenCV SFM Compliation

I am trying to build scene_reconstruction.cpp sample from OpenCV, but I have the following error:
In file included from /usr/local/include/opencv2/sfm.hpp:42:0,
from scene_reconstruction.cpp:1:
/usr/local/include/opencv2/sfm/numeric.hpp:41:22: fatal error: Eigen/Core: No such file or directory
compilation terminated.
But I did install eigen. I tried building opencv with BUILD_EXAMPLE=ON flag, the building using make, will just terminates at 9% Built target opencv_python3
Can anyone please explain to me?

error with creating framework

I try to install opencv on macbook pro following this instruction
i have problem when i build OpenCV framework. when i type
$ python opencv/ios/build_framework.py iOS
i got this problem:
CMake Error: Internal CMake error, TryCompile configure of cmake failed -- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h CMake Error at /opt/local/share/cmake-2.8/Modules/CMakeCInformation.cmake:37
Configuring incomplete, errors occurred!
error: can't exec '/Developer/usr/bin/xcodebuild' (No such file or directory)
I check Developer/usr/bin/xcodebuild. I have this folder. But i need to type without "/" in front. What is the problem here?
You need to install cmake
and run again
http://www.cmake.org/cmake/help/install.html

Resources