Cmake Error Compiling Hydrogen 0.9.7 Beta1 - c++

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.

Related

Make command not producing an executable file

I just started using C++ and want to use CMake to compile a simple hello world program, but I don't know what to do with the MakeFile once it is produced. I have a directory called tutorial that contains my tutorial.cpp file containing the hello world code. I also have a CMakeLists file that contains:
cmake_minimum_required(VERSION 3.14.4)
project (tutorial)
add_executable(tutorial tutorial.cpp)
When I run the command cmake . from the tutorial directory in my terminal, all the correct (at least I think they are correct) files are produced and I get the following output:
-- The C compiler identification is AppleClang 10.0.1.10010046
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working C compiler:
/Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler:
/Library/Developer/CommandLineTools/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:
/Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler:
/Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to:
/Users/kshitijsachan/Documents/cs/cpp/tutorial
I then typed in make in the terminal and got no output. How can I actually run the makefile that was produced?
Run make <some_valid_target_name> - like make all or make install (if such commonly used targets exist) or whatever other targets your project defined. Check your projects documentation or CMakeLists.txt file for valid target names.
See also cmake_add_executable which adds a target.

CMake with mingw on Windows 10: Detecting CXX compiler ABI info - failed

I want to use cmake to create MinGW Makefiles on windows 10. I have installed mingw and I can use mingw32-make and g++ commands without issue.
The test project is a super simple CMakeLists.txt file:
cmake_minimum_required(VERSION 3.10)
project(hello-world)
add_executable(hello-world main.cpp)
and a simple main.cpp file:
#include <iostream>
int main() {
std::cout << "hello Visual Studio Code! :)" << '\n';
return 0;
}
These are the commands I use to create the makefiles:
>> mkdir build
>> cd build
>> cmake -G "MinGW Makefiles" ..
This is where I get errors:
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.10/Modules/CMakeDetermineCompilerId.cmake:495 (file):
file STRINGS file
"C:/Projects/test/build/CMakeFiles/3.10.1/CompilerIdCXX/a.exe" cannot be read.
... some more errors in the test files
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- 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: C:/MinGW/bin/g++.exe
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring incomplete, errors occurred!
This is from the error log:
The CXX compiler identification could not be found in "C:/Projects/test/build/CMakeFiles/3.10.1/CompilerIdCXX/a.exe"
What is the CXX compiler ABI info and how can it be, that there is a working CXX compiler detected but this fails?
Let me know if you need anymore info about the setup!
What turned out to be my culprit was Windows Defender! Turned that off and the CXX compiler ABI info - failed issue went away.
I used the CMake-GUI tool to figure out the missing tool dependencies. For example : CMAKE_ADDR2LINE was not set, once I pointed it to the correct location of addr2line.exe ,the errors were resolved.

Mongodb C++ compilation issue

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/

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.