Mongodb C++ compilation issue - c++

I am trying to compile mongodb driver for c++ and following instructions given in url : Mongocxx
I am getting below errors :
-- The CXX compiler identification is GNU 4.8.5
-- Check for working CXX compiler: /bin/c++
-- Check for working CXX compiler: /bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The C compiler identification is GNU 4.8.5
-- Check for working C compiler: /bin/cc
-- Check for working C compiler: /bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking for module 'libbson-1.0>=1.5.0'
--
CMake Error at /usr/share/cmake3/Modules/FindPkgConfig.cmake:424 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake3/Modules/FindPkgConfig.cmake:597 (_pkg_check_modules_internal)
cmake/FindLibBSON.cmake:33 (pkg_check_modules)
src/bsoncxx/CMakeLists.txt:67 (find_package)
-- Configuring incomplete, errors occurred!
See also "/data/2/nirmal/mongo_cpp/mongo-cxx-
driver/build/CMakeFiles/CMakeOutput.log".
I checked libbson is already installed in /usr/local/bin .
Unable to figure the root cause.
Kindly assist.

If you are building version 3.1.X or 3.0.x you have to specify libbson of your libmongoc (mongodb c driver) installation.
"Users building mongocxx versions 3.1.x and 3.0.x should specify the libmongoc installation directory by using the -DLIBMONGOC_DIR and -DLIBBSON_DIR options to cmake. See the following example, which assumes that both libmongoc and libbson are installed into /your/cdriver/prefix:"
if you are building on a linux system try something like this:
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local .. -DBSONCXX_POLY_USE_MNMLSTC=1 -DLIBMONGOC_DIR=/usr -DLIBBSON_DIR=/usr/lib64
More detailed information can be found https://mongodb.github.io/mongo-cxx-driver/mongocxx-v3/installation/

Related

When Cross Compiling (Linux to Windows) The Vulkan Loader There Are Many Undefined References to Vulkan Objects

When using the mingw-32 cmake the code from https://github.com/KhronosGroup/Vulkan-Loader fails to compile this is the cmake command I am using:x86_64-w64-mingw32-cmake -DVULKAN_HEADERS_INSTALL_DIR=/usr/x86_64-w64-mingw32/ -DVulkanRegistry_DIR=/usr/x86_64-w64-mingw32/share/vulkan/registry/ -DUSE_MASM=OFF ..
Which Outputs:
-- The C compiler identification is GNU 11.1.0
-- The CXX compiler identification is GNU 11.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/x86_64-w64-mingw32-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/x86_64-w64-mingw32-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found VulkanHeaders: /usr/x86_64-w64-mingw32/include
-- Found VulkanRegistry: /usr/x86_64-w64-mingw32/share/vulkan/registry
-- Detected Vulkan Version 1.2.182
-- Looking for secure_getenv
-- Looking for secure_getenv - not found
-- Looking for __secure_getenv
-- Looking for __secure_getenv - not found
CMake Warning at loader/CMakeLists.txt:27 (message):
Using non-secure environmental lookups. This loader will not properly
disable environent variables when run with elevated permissions.
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.7.3")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/flippers2652/Documents/Temp/Vulkan-Loader/build
Output from make: https://pastebin.pl/view/7467739f
Thank you.
P.S. Distrobution is manjaro.
The problem was that I had a MASM assembler. Which caused it to attempt an assembly thing that it failed to do.

Cmake FindBoost error-POP without matching PUSH

I am trying to install LightGBM-gpu on Centos. It seems boost 1.56 can be find, but this error occurred.I google it all day but can not solve it.
Here is the Message
$ cmake -DUSE_GPU=1 -DOpenCL_LIBRARY=/usr/local/cuda/lib64/libOpenCL.so -DOpenCL_INCLUDE_DIR=/usr/local/cuda/include/ ..
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenMP_C: -fopenmp (found version "3.1")
-- Found OpenMP_CXX: -fopenmp (found version "3.1")
-- Looking for CL_VERSION_2_0
-- Looking for CL_VERSION_2_0 - not found
-- Looking for CL_VERSION_1_2
-- Looking for CL_VERSION_1_2 - found
-- Found OpenCL: /usr/local/cuda/lib64/libOpenCL.so (found version "1.2")
-- OpenCL include directory: /usr/local/cuda/include
Boost 1.56.0 found.
Found Boost components:
filesystem;system
CMake Error in /usr/local/share/cmake-3.9/Modules/FindBoost.cmake:
cmake_policy POP without matching PUSH
Call Stack (most recent call first):
CMakeLists.txt:144 (find_package)
-- Performing Test MM_PREFETCH
-- Performing Test MM_PREFETCH - Success
-- Using _mm_prefetch
-- Performing Test MM_MALLOC
-- Performing Test MM_MALLOC - Success
-- Using _mm_malloc
-- Configuring incomplete, errors occurred!
See also "/home/rd/LightGBM/build/CMakeFiles/CMakeOutput.log".
See also "/home/rd/LightGBM/build/CMakeFiles/CMakeError.log".
This question was cross-posted to the LightGBM issues page as microsoft/LightGBM#3613. The issue was solved there.
Updating CMake to at least version 3.14 fixes this issue.

Cmake Error Compiling Hydrogen 0.9.7 Beta1

I am attempting to compile Hydrogen 0.9.7 beta 2 with Cmake and I keep getting a cmakelists.txt error: CMake Error at CMakeLists.txt:139 (MANDATORY_PKG):
Unknown CMake command "MANDATORY_PKG"
Reviewing the list of Cmake commands I cant find a command that corresponds to MANDATORY_PKG. Is this deprecated language?
Here is the output of the attempted build.
tinman13#tinman13-scythion:~/hydrogen-1.0.0-beta1/build$ sudo cmake /home/tinman13 /hydrogen-1.0.0-beta1/build
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
fatal: not a git repository (or any of the parent directories): .git
CMake Error at CMakeLists.txt:138 (INCLUDE):
INCLUDE could not find load file:
StatusSupportOptions
CMake Error at CMakeLists.txt:139 (MANDATORY_PKG):
Unknown CMake command "MANDATORY_PKG".
-- Configuring incomplete, errors occurred!
See also "/home/tinman13/hydrogen-1.0.0-beta1/build/CMakeFiles/CMakeOutput.log".
CMakeOutput.log is a large rambling file but i'll post it if you like.
Is there anything that can be done to rectify this? Can i switch to an older version of CMake? Googling produces very little on the topic of unknown CMake commands and nothing related to Hydrogen. Any help would be greatly appreciated.

Plugin refuses to compile due to COMPILER_SUPPORTS_CXX11 test failing

This is the following output i keep getting when i run the commands
I'm not sure exactly where im going wrong here. I'm also having issues with boost yum says the boost libraries installed.
cmake teamspeak-connector
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /opt/rh/devtoolset-2/root/usr/bin/gcc
-- Check for working C compiler: /opt/rh/devtoolset-2/root/usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /opt/rh/devtoolset-2/root/usr/bin/c++
-- Check for working CXX compiler: /opt/rh/devtoolset-2/root/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Failed
CMake Error at CMakeLists.txt:73 (message):
The compiler /opt/rh/devtoolset-2/root/usr/bin/c++ does not fulfill all
required standards. Please use a different C++ compiler.
-- Configuring incomplete, errors occurred!
See also "/root/sampcompiles/samp-tsconnector-1.2.1/CMakeFiles/CMakeOutput.log".
See also "/root/sampcompiles/samp-tsconnector-1.2.1/CMakeFiles/CMakeError.log".

cocos2d-x 3.6 error: Error running command, return code: 1

I have a problem with cocos2d-x 3.6, I installed the program and create my first hello world file found in the program, but when I try to run, I get the following error, someone could tell me how to fix it and explain why it happened the error
cocos run -s ~/MyCompany2/MyGame -p linux
Running command: compile
Building mode: debug
running: 'cmake -DCMAKE_BUILD_TYPE=Debug -DDEBUG_MODE=ON ..'
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
It appears you are builing natively for Linux with GCC
-- OpenGL include dirs: /usr/include
-- GLEW include dirs: /usr/include
-- PkgConfig found
-- checking for module 'glfw3'
-- package 'glfw3' not found
CMake Error at cocos2d/cmake/Modules/FindPackageHandleStandardArgs.cmake:136
(message):
Could NOT find GLFW3 (missing: GLFW3_LIBRARIES GLFW3_INCLUDE_DIR)
Call Stack (most recent call first):
cocos2d/cmake/Modules/FindPackageHandleStandardArgs.cmake:343
(_FPHSA_FAILURE_MESSAGE)
cocos2d/cmake/Modules/FindGLFW3.cmake:152
(find_package_handle_standard_args)
cocos2d/cmake/Modules/CocosBuildHelpers.cmake:44 (find_package)
cocos2d/CMakeLists.txt:187 (cocos_find_package)
-- Configuring incomplete, errors occurred!
See also "/home/jmuniz/MyCompany2/MyGame/linux-build/CMakeFile/CMakeOutput.log".
Error running command, return code: 1
The way to read errors in your build chain is typically from the top down; find the first thing marked "error" and fix that.
In this case, the first error is:
CMake Error at cocos2d/cmake/Modules/FindPackageHandleStandardArgs.cmake:136 (message):
Could NOT find GLFW3 (missing: GLFW3_LIBRARIES GLFW3_INCLUDE_DIR)
and right above it the very helpful:
-- package 'glfw3' not found
So, it seems that what you're building requires this glfw3, and it can't find it.
I'm guessing that it's this: http://www.glfw.org/
You should check that you have that. If you don't, download it and install it appropriately for your system (which may, depending on what OS you're running, be as easy as finding it in your package manager), and try again.