QGIS Source Code Build - build

following the QGIS Install guide
http://htmlpreview.github.io/?https://raw.github.com/qgis/QGIS/master/doc/INSTALL.html
I downloaded all the required packages on Windows and created a Build directory, trying to configure the source code on CMake I get this error :
""
QGIS version: 2.11.0 Master (21100)
Could not find GRASS 6
Could not find GRASS 7
GEOS_INCLUDE_DIR=GEOS_INCLUDE_DIR-NOTFOUND
GEOS_LIBRARY=GEOS_LIBRARY-NOTFOUND
CMake Error at cmake/FindGEOS.cmake:182 (MESSAGE):
Could not find GEOS
Call Stack (most recent call first):
CMakeLists.txt:193 (FIND_PACKAGE)
Configuring incomplete, errors occurred!
See also "C:/QGIS/build/QGIS/CMakeFiles/CMakeOutput.log".
See also "C:/QGIS/build/QGIS/CMakeFiles/CMakeError.log".
""
I cannot proceed to the next step, how do I fix this?

When downloading packages using OSGeo4W just type "grass" in it then click it so that it changes to "Install".
I too selected it but it did not install it .. I had to select it again to install.

Use the standalone installer found at http://www.qgis.org/wiki/Download.
Then, set up a GRASS Database through the "Plugins > Grass > New Mapset" menu.

Related

DicomToMesh OSX Building Issue

I want to compile DicomToMesh according to the instructions in this link.
> git clone https://github.com/AOT-AG/DicomToMesh.git
> cd DicomToMesh
> mkdir build
> cd build
> ccmake .. #opens ccmake window
By executing above instruction I supposed to get something similar to the following within the ccmake window,
BUILD_GUI OFF
CMAKE_BUILD_TYPE DEBUG
CMAKE_INSTALL_PREFIX /usr/local
USE_VTK_DICOM OFF
VTK_DIR /home/eidelen/Development/libs/vtk/build
But in my case I'm getting this result:
After pressing c, it generates following error:
CMake Error at /usr/local/lib/cmake/vtk-9.0/VTK-vtk-module-find-packages.cmake:115
(find_package):
By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5" (requested
version 5.15) with any of the following names:
Qt5Config.cmake
qt5-config.cmake
Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
to a directory containing one of the above files. If "Qt5" provides a
separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
/usr/local/lib/cmake/vtk-9.0/vtk-config.cmake:131 (include)
CMakeLists.txt:5 (find_package)
Configuring incomplete, errors occurred!
See also "/Users/mrhs/DicomToMesh/build/CMakeFiles/CMakeOutput.log".
See also "/Users/mrhs/DicomToMesh/build/CMakeFiles/CMakeError.log".
I have installed QT5 5.15.2 using
brew install qt5
I tried to follow this solution using command
brew install qtbase5-dev
brew install qtdeclarative5-dev
But getting Warning: No available formula or cask with the name "qtbase5-dev". and Error: No similarly named formulae found'
I have tried this solution by using the command
export CMAKE_PREFIX_PATH=/usr/local/Cellar/qt#5/
cd build
but it is showing No such file or directory
I'm using this for the first time and my be i'm missing something which I could not figure out yet. I will be really very thankful and will appreciate it if anyone can help me. I badly need to solve this issue and has spend a lot of time but in vain.
N.B. This is my CMakeError.log and CMakeOutput.log
Installing brew install qt5, at the end the process is going to display something like :
echo 'export PATH="/usr/local/opt/qt#5/bin:$PATH"' >> ~/.zshrc
export LDFLAGS="-L/usr/local/opt/qt#5/lib"
export CPPFLAGS="-I/usr/local/opt/qt#5/include"
Just type them in your terminal

Error in compiling the examples of OpenGL 4 Shading Language Cookbook, 3rd Edition

I downloaded the source code of OpenGL 4 Shading Language Cookbook, 3rd Edition from PacktPublishing github
I have downloaded the glm source code version glm-0.9.9.3 and
I have downloaded the glfw source code version glfw-3.2.1.
I successfully compiled, built and installed both glm and glfw using the "cmake ."
To find the GLFW installation, I executed the below command in the src (examples) folder
cmake -D CMAKE_PREFIX_PATH=e:\mysrcpath\glfw-3.2.1\src .
I am getting the below error
-- Selecting Windows SDK version to target Windows 10.0.17134.
CMake Error at E:/glfw-3.2.1/src/glfw3Config.cmake:1 (include):
include could not find load file:
E:/glfw-3.2.1/src/glfw3Targets.cmake
Call Stack (most recent call first):
CMakeLists.txt:13 (find_package)
-- Found OpenGL: opengl32
-- Configuring incomplete, errors occurred!
The glfw3Config.cmake is having the code
include("${CMAKE_CURRENT_LIST_DIR}/glfw3Targets.cmake")
The "CMAKE_CURRENT_LIST_DIR" is
E:/glfw-3.2.1/src/
But the glfw3Targets.cmake is located in
E:/glfw-3.2.1/CMakeFiles/Export/lib/cmake/glfw3/
The 'cmake' build is not able to find the glfw3Targets.cmake in the correct path.
How to fix this issue?
It seem like GLFW version 3.2.1 does not support using it directly from the build tree. You should install GLFW instead and add the directory to the cmake prefix paths.
in the glfw directory:
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=c:/local/ ..
cmake --build . --target install
Then when invoking cmake for your projects:
cmake -D CMAKE_PREFIX_PATH=c:/local/

Ubuntu OpenCV not compiling

I'm trying to compile OpenCV 3.2 with contributions with the following commands:
1.
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/usr/local/ -DOPENCV_EXTRA_MODULES_PATH=/home/matteo/Desktop/Xilinx/OpenCV/source/opencv_contrib/modules/ /home/matteo/Desktop/Xilinx/OpenCV/source/opencv-3.2.0/
2.
make -j7 # runs 7 jobs in parallel
3.
sudo make install
Can you explain why I get
...
........
...........
........................
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
-- Caffe: NO
-- Protobuf: NO
-- Glog: NO
-- Downloading ...
CMake Error at cmake/OpenCVUtils.cmake:1043 (file):
file DOWNLOAD cannot open file for write.
Call Stack (most recent call first):
../opencv_contrib/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake:32 (ocv_download)
../opencv_contrib/modules/dnn/CMakeLists.txt:5 (include)
CMake Error at cmake/OpenCVUtils.cmake:1047 (message):
Failed to download . Status=
Call Stack (most recent call first):
../opencv_contrib/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake:32 (ocv_download)
../opencv_contrib/modules/dnn/CMakeLists.txt:5 (include)
-- Configuring incomplete, errors occurred!
I'm working with Ubuntu 16.04 . I already had OpenCV on the system: maybe I unistall it in the wrong way? I remember to compile OpenCV 3.2 with the same command used above.
You must have matching versions of the opencv_contrib and the opencv itself.
Under the opencv github, go to the OpenCV releases and download the 3.2.0 (it should be the same in the master branch).
Now, go to https://github.com/opencv/opencv_contrib/releases and download the 3.2.0. Then you will have both versions matching.
After that all the cmake commands found on the README.md at opencv_contrib master branch should work fine.
I get the same error, that exact error, around the protobuf. There's another error on the xfeatures2d module, too, if your delete the dnn modules (so they don't get configured/built). My problem is, I need the "non-free" xfeatures2d module. :(
The problem appears to be in the opencv_contrib, in the DNN and xfeatures2d modules, but I'm not sure how to fix it. the call to ocv_download seems to be having empty inputs, even though the dnn and xfeatures2d cmake files are passing in arguments. I am not even a novice with cmake, so I'm not sure how to troubleshoot further.
I get this error on both Mac configuring for XCode and on Windows configuring for Visual Studio, using the latest version of cmake-gui, 3.8.0-rc3.
EDIT: I think I've found the issue, though. I opened an issue in the opencv_contrib github. There is a call to ocv_download in the dnn and xfeatures2d cmake files that uses FILENAME as the first parameter, but should be using PACKAGE instead. When I changed the parameters to PACKAGE, CMake successfully configured opencv with the opencv_contrib modules.
Hope this helps! :)
You might not use the same version of opencv and opencv_contrib
https://github.com/opencv/opencv_contrib/archive/<version>.zip
https://github.com/opencv/opencv/archive/<version>.zip
like master or 3.2.0
SHORT
You need to have the same version in opencv and opencv_contrib (.../opencv_contrib/modules/... belongs to an independent repo).
Either the same release or the last commit in BOTH repositories.
Check which version you have and move the other. In your case, I guess you have to change the version of opencv_contrib, then move to the release with git or download it from github.
git checkout <number_opencv_version i.e. 3.2.0>
LONG
I guess as Ken Lee, that you do not have the same version in the repositories.
As Matt referenced in the opened issue, there is a problem with the call of ocv_download because the version is not the one that was used when opencv-3.1, therefore it fails because the parameter is not the expected one.
It happens to me when I was using opencv 3.1.0 and the last version of opencv_contrib. You could change the cmake files one by one, but it is easier to take the correct version in each repo.
There is a right conflict in your build folder (may result from your previous sudo make install). I don't remember how I fixed it, but you can try recursively chown to both source and build folders (or chmod to 777).

Installing the SFGUI with Cmake

I've been trying to install SFGUI library with Cmake tool with instructions given here: SFGUI Install Tutorial . Still got many problems in major with Cmake, which couldn't find few files from SFGUI directory, for example
CMake Error: The source "D:/SFGUI-master/CMakeLists.txt" does not match the source "D:/SFGUI-0.3.0/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory.
Restarting didn't help. Could anyone write how to install this in simple steps? Regards.
cmake is telling you that the files it has generated in it's cache from a previous run don't match the source files you are currently using. I would imagine that you ran cmake, then switched git branches or tags and tried to run cmake again. You can just rm -r CMakeFiles in your build directory to remove the cache. Then you should be able to run cmake again without errors.
Thanks! It moved a little bit, but stopped actually at error:
CMake Error at cmake/Modules/FindSFML.cmake:306 (message):
Could NOT find SFML (missing: SFML_GRAPHICS_LIBRARY SFML_WINDOW_LIBRARY
SFML_SYSTEM_LIBRARY)
Call Stack (most recent call first):
CMakeLists.txt:21 (find_package)
Configuring incomplete, errors occurred!
See also "C:/Users/admin/Documents/Visual Studio 2015/Projects/sfml1/sfml1/CMakeFiles/CMakeOutput.log".
To be honest, I will write down steps I did: 1.Configured SFML in VS15 in Windows 8.1 2. I installed the newswet version of CMake 3. Installed also newest SFGUI from Github. 4.In Cmake GUI as a build I choose my project in VS and as a source - SFGUI directory. 5.In CMake Configure and there are the errors. Did I missed something?

qttorch Build Error Ubuntu 14.04

I'm trying to install qttorch package on Ubuntu 14.04,
but I get this error during installation:
CMake Warning at /usr/share/cmake-3.2/Modules/FindQt4.cmake:626 (message):
/usr/bin/qmake reported QT_INSTALL_LIBS as "/usr/lib/x86_64-linux-gnu" but
QtCore could not be found there. Qt is NOT installed correctly for the
target build environment.
Call Stack (most recent call first):
CMakeLists.txt:38 (FIND_PACKAGE)
CMake Error at /usr/share/cmake-3.2/Modules/FindQt4.cmake:634 (message):
Could NOT find QtCore. Check
/tmp/luarocks_qtlua-scm-1-2765/qtlua/build/CMakeFiles/CMakeError.log for
more details.
Call Stack (most recent call first):
CMakeLists.txt:38 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
See also "/tmp/luarocks_qtlua-scm-1-2765/qtlua/build/CMakeFiles/CMakeOutput.log".
Error: Failed installing dependency: https://raw.githubusercontent.com/torch/rocks/master/qtlua-scm-1.rockspec - Build error: Failed building.
Is libqtcore4 the right package for QTCore? or is there another package that should be installed?
because it's already installed in "/usr/lib/x86_64-linux-gnu" as qmake reported!
I also tried reinstalling it, but still the same error!!
In most Linux distributions the packages are split between development and none-development parts. Usually the normal package only includes the shared library, data and executables while the dev package adds headers, static libraries and build tools like qmake. I assume this split is done to save space.
For ubuntu the dev packages usually has the -dev suffix. So try if a libqtcore4-dev package exists. Otherwise, libqt4-dev should include it.