What CUDA version does torch/lua require? - lua

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.

Related

Installing Avro in freebsd platform

I am facing the following error while installing avro-c package on freebsd platform.
CMake Error at CMakeLists.txt:39 (message):
Cannot determine Avro version number
-- Configuring incomplete, errors occurred!
I have downloaded the latest source code from https://github.com/confluentinc/avro-c-packaging. Have used the following step to install-
mkdir build
cd build
cmake ../
I was expecting the package to get installed.

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

fatal error: opencv2/xfeatures2d.hpp: No such file or directory

I am trying to build this code:
https://docs.opencv.org/3.2.0/d5/d6f/tutorial_feature_flann_matcher.html
I am using Ubuntu 16.04 with CLion 2017.3 and have OpenCV 3.4 installed.
xfeatures2d.hpp can't be found on the system.
I have looked at many different problems on the internet, but couldn't find a solution.
Any help?
You have to include cmake comiplation flag to opencv OPENCV_EXTRA_MODULES_PATH and set it to the opencv_contrib/modules.
cmake -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules
Here's what I had to do to compile OpenCV with xfeatures2d:
Download opencv_contrib (I took a release from the releases page). This step is what gives us xfeatures2d.
Unpack the tarball somewhere, e.g., ~/src/opencv_contrib-4.5.5
When configuring OpenCV (the main OpenCV source like opencv-4.5.2) with CMake, add the following option to cmake command line (adjusting the value to be your actual path to the modules subdirectory of the opencv_contrib tarball):
-DOPENCV_EXTRA_MODULES_PATH=$HOME/src/opencv_contrib-4.5.5/modules/
Now just build as you normally would and install.
The above actions gave me the expected file (among others): /usr/include/opencv4/opencv2/xfeatures2d.hpp.

opencv-3.3.0 Stops compiling at 58%

I'm compiling opencv for Rasbian Stretch, running on the Pi 3b.
It compiled all the way to 58% before outputting this error.
Anybody familiar with the error and how to correct it?
[58%]Linking CXX shared library ../../lib/libopencv_datasets.so
CMakeFiles/opencv_datasets.dir/src/gr_chalearn.cpp.o: file not recognized: File truncated
collect2: error: id returned 1 exit status
modules/datasets/CMakeFiles/opencv_datasets.dir/build.make:858: recipe for target 'lib/libopencv_datasets.so.3.3.0' failed
make[2]: * [lib/libopencv_datasets.so.3.3.] Error 1
CMakeFiles/Makefile2:14481: recipe for target 'modules/datasets/CmakeFiles/opencv_datasets.dir/all' failed
make[1]: * [modules/datasets/CMakeFiles/opencv_datasets.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make *** [all] Error 2
I solved this issue by downloading opencv-3.4 and running make with -j4
Building OpenCV binaries on officially supported Ubuntu/Linux based operating systems has always been a little more troublesome than normal images. One of the core reasons is the visual graphics (mostly, but not limited to) used by these distributions are different than general ones. You'll find some similar errors while installing it on LXDE based Ubuntu distributions, for the same reason. I spotted different errors for the same method on Ubuntu 18.04 Gnome, Ubuntu 18.04 LXDE, Ubuntu 16.04 LXDE, and Raspbian OS. Having said that, there are always solutions available.
Please check this link for libraries required. Make sure you have all the repositories added which are required for installation. You must look extremely carefully for these libraries:
libgsteramer1.0-dev, libgstreamer1.0-plugins-base-dev & libgstreamer1.0-base-dev.
libprotobuf-dev & protobuf-compliler
libatlas-base-dev
libjasper-dev (this one for wheezy, you'll need to enable repository)
libfaac-dev
These libraries will be required and a test will run on them during CMake. Some of them have a lot of dependency issues like libpng-dev and libtheora-dev. If you can paste the initial part of your CMake build, we can pin-point those libraries.

Compilation project with Cmake . I'm getting an error

I'm trying to compile a project with CMake. I'm getting an error:
Found OpenCV Windows Pack but it has not binaries compatible with your
configuration.
You should manually point CMake variable OpenCV_DIR to your build of OpenCV
library.
Call Stack (most recent call first):
CMakeLists.txt:9 (FIND_PACKAGE)
CMake Error at CMakeLists.txt:9 (FIND_PACKAGE):
Found package configuration file:
C:/Users/Ghenja/AppData/Local/opencv/build/OpenCVConfig.cmake
but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be
NOT FOUND.
I don't understand what is happening. Please help me to solve this problem.
Clean your project and remove CMakeCache.txt. OpenCV_FOUND is probably cached now.
If that doesn't work, then run your cmake command with additional flags just to be sure:
cmake -DOpenCV_FOUND:BOOL=ON -DOpenCV_DIR=/path/to/your/OpenCV

Resources