Could NOT find MPI_C and MPI cmake on Ubuntu 18.04 - c++

- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'libusb-1.0>=1.0.17'
-- Found libusb-1.0, version 1.0.21
-- Checking for module 'opencv>=3.0'
-- Found opencv, version 3.2.0
-- Checking for module 'libcaer>=2.0'
-- Found libcaer, version 3.3.7
-- Could NOT find MPI_C (missing: MPI_C_WORKS)
-- Found MPI_CXX: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so (found version "3.1")
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find MPI (missing: MPI_C_FOUND) (found version "3.1")
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.10/Modules/FindMPI.cmake:1444 (find_package_handle_standard_args)
CMakeLists.txt:193 (find_package)
Tried everything exported the paths done everything I've found on google still have this annoying error.
Reading package lists... Done
Building dependency tree
Reading state information... Done
cmake is already the newest version (3.10.2-1ubuntu2.18.04.1).
Which command results:
endrel#Siraly:~/Developer/BrainHarmonics/build$ which mpicc
/usr/bin/mpicc
endrel#Siraly:~/Developer/BrainHarmonics/build$ which mpicxx
/usr/bin/mpicxx

From FindMPI.cmake module:
If the find procedure fails for a variable MPI_<lang>_WORKS, then the settings detected by or passed to the module did not work and even a simple MPI test program failed to compile.
-- Could NOT find MPI_C (missing: MPI_C_WORKS)
Your mpicc is found but probably not working correctly.
Maybe your CMakeLists.txt is wrong, but you didn't provide it's content, so it's hard to say.

Related

"TBB library cannot be found" CMake on MacOS

I'm trying to build PrusaSlicer from source on Mac. I don't have any experience with CMake. I'm following the instructions given here.
Every time I try to build dependencies. This command cmake ..gives me errors. Earlier it was saying "Boost cannot be found." I fixed that by installing boost with brew. Now it's stuck on TBB.
OS X SDK Path: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk
OS X Deployment Target: (default)
-- Boost::boost exists
CMake Error at /opt/local/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
TBB library cannot be found. Consider set TBBROOT environment variable.
(missing: TBB_LIBRARIES) (found version "2020.3")
Call Stack (most recent call first):
/opt/local/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/FindTBB.cmake.in:286 (find_package_handle_standard_args)
cmake/modules/FindTBB.cmake:29 (include)
CMakeLists.txt:384 (find_package)
-- Configuring incomplete, errors occurred!
I have installed TBB. If you would notice even this error has the version listed.
Things I have tried:
Installing boost, cmake and tbb via brew.
Installing boost, cmake and tbb via macports.
Try the following
cmake .. -DTBB_LIBRARYDIR=/opt/intel/tbb/lib/intel64/gcc4.8 -DTBB_INCLUDEDIR=/opt/intel/tbb/include
Note the subtle differences in the CMake var names and the path to include, not include/tbb.Let me know how that goes

CMake not able to find magnum plug-ins installed with vcpkg

I've cloned and am trying to compile & run a c++ project from here: https://git.ist.ac.at/gsperl/MADYPG
I've installed all the dependencies as listed with vcpkg, but I am getting an error regarding the jpeg, and png importer magnum plug-ins, despite having installed them directly with vcpkg. Has anyone run into something similar before?
logs:
['-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake']
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
-- Found OpenMP: TRUE (found version "2.0")
-- Found OpenMP: TRUE (found version "2.0")
-- Found Corrade: C:/dev/vcpkg/installed/x64-windows/include found components: Main
-- Found Corrade: C:/dev/vcpkg/installed/x64-windows/include found components: Containers rc Utility PluginManager
-- Found Magnum: C:/dev/vcpkg/installed/x64-windows/include found components: Trade GL MeshTools Primitives SceneGraph Shaders Sdl2Application DebugTools AnyImageImporter
-- Found Corrade: C:/dev/vcpkg/installed/x64-windows/include found components: Containers rc Utility
-- Found Magnum: C:/dev/vcpkg/installed/x64-windows/include found components: GL Shaders
-- Found Corrade: C:/dev/vcpkg/installed/x64-windows/include found components: Containers rc Utility PluginManager
-- Found Magnum: C:/dev/vcpkg/installed/x64-windows/include found components: Trade
CMake Error at C:/Users/user/Desktop/cmake-3.23.0-rc2-windows-x86_64/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find MagnumPlugins (missing: PngImporter JpegImporter)
Call Stack (most recent call first):
C:/Users/user/Desktop/cmake-3.23.0-rc2-windows-x86_64/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
C:/dev/vcpkg/installed/x64-windows/share/cmake/MagnumPlugins/FindMagnumPlugins.cmake:468 (find_package_handle_standard_args)
C:/dev/vcpkg/installed/x64-windows/share/cmake/MagnumPlugins/MagnumPluginsConfig.cmake:26 (include)
C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:782 (_find_package)
CMakeLists.txt:104 (find_package)
-- Configuring incomplete, errors occurred!
I've seen this similar thread as well cmake cannot find libraries installed with vcpkg, but all other packages seem to be found by cmake without issue, so the solution required here is probably more specific. Any help very appreciated!
here's the cmakeLists.txt I'm using: https://git.ist.ac.at/gsperl/MADYPG/-/blob/master/src/CMakeLists.txt

How to build flann in windows 10 from source?

I was trying to build flann from source in Windows-10 using cmake. During the installation process it says it cannot find liblz4.
I tried two method :
1) So I downloaded the prebuild lz4 from here (https://github.com/lz4/lz4/releases) and placed the C:\XXXX\Downloads\lz4_v1_9_1_win64\dll to my env path.
2) I used vcpkg to install lz4 first. Then did
C:\source\flann\build> cmake .. -DCMAKE_TOOLCHAIN_FILE=C:\XXXXXX\source\vcpkg\scripts\buildsystems\vcpkg.cmake -G "Visual Studio 15 2017 Win64".
None of the above two method worked. I still get cannot find liblz4 error.
-- Found PkgConfig: C:/XXXXXX/Downloads/cmake-3.13.3-win64-x64/bin/pkg-config.exe (found version "0.26") -- Checking for module 'liblz4' -- No package 'liblz4' found CMake Error at C:/Program Files/CMake/share/cmake-3.13/Modules/FindPkgConfig.cmake:452 (message): A required package was not found Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.13/Modules/FindPkgConfig.cmake:622 (_pkg_check_modules_internal) CMakeLists.txt:150 (pkg_check_modules) -- Configuring incomplete, errors occurred! See also "C:/XXXXXXX/source/flann/build/CMakeFiles/CMakeOutput.log".
Did you try to do as follows?(https://github.com/lz4/lz4)
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
vcpkg install lz4

Cmake error: unsuitable Qt version

I'm trying to run cmake via cmd (Windows) on a project I downloaded from GitHub, using cmake.
However, I'm getting the following error:
-- Found unsuitable Qt version "5.6.2" from C:/Anaconda2/Library/bin/qmake.exe
CMake Error at 3rdParty/FindMatlab-rwp.cmake:50 (MESSAGE):
Generator not compatible: MinGW Makefiles
Call Stack (most recent call first):
CMakeLists.txt:427 (find_package)
Any ideas what might be wrong? I tried to find info about the Qt mentioned, but I came up with nothing.

Gruel required to compile myblock

So I was following the gnuradio tutorial on building an OOT. However i got into trouble with boost so i followed a solution that made me install boost and export by the command:
export LD_LIBRARY_PATH=$BOOST_PREFIX/lib
I did that and got into another error after running cmake (below)
$cmake ../
-- Build type not specified: defaulting to release.
-- Boost version: 1.53.0
-- Found the following Boost libraries:
-- filesystem
-- system
-- checking for module 'gruel'
-- package 'gruel' not found
-- Could NOT find GRUEL (missing: GRUEL_LIBRARIES GRUEL_INCLUDE_DIRS)
-- checking for module 'gnuradio-core'
-- package 'gnuradio-core' not found
-- Could NOT find GNURADIO_CORE (missing: GNURADIO_CORE_LIBRARIES GNURADIO_CORE_INCLUDE_DIRS)
-- checking for module 'cppunit'
-- package 'cppunit' not found
-- Could NOT find CPPUNIT (missing: CPPUNIT_INCLUDE_DIRS)
CMake Error at CMakeLists.txt:91 (message):
Gruel required to compile newblock
-- Configuring incomplete, errors occurred!
please can any one help me solve this problem and add blocks to gnu radio
You're missing the cppunit development headers; please install them.
The errors about Gruel indicate that you're trying to use a OOT template that was made for an older version of GNU Radio. Gruel was part of old versions of GNU Radio, and has been merged into other parts of GNU Radio, and is not available anymore.
The correct way of generating a module is using gr_modtool, which comes with GNU Radio, and automatically will only generate valid OOTs. This is rather nicely documented in the official Guided Tutorials, gr_modtool nm my_module_name, see Tutorial 3.
Best regards,
Marcus