I'm not able to compile on Fedora 31. I installed fmt and followed these instructions:
git clone https://github.com/facebook/folly.git
cd folly
mkdir _build
cd _build
cmake ..
When I run cmake .., I get the following error:
[vagrant#localhost _build]$ cmake ..
-- The CXX compiler identification is GNU 9.3.1
-- The C compiler identification is GNU 9.3.1
-- 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
-- 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
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
Could NOT find Boost (missing: Boost_INCLUDE_DIR context filesystem
program_options regex system thread) (Required is at least version
"1.51.0")
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake/Modules/FindBoost.cmake:2166 (find_package_handle_standard_args)
CMake/folly-deps.cmake:36 (find_package)
CMakeLists.txt:113 (include)
-- Configuring incomplete, errors occurred!
See also "/vagrant/folly/_build/CMakeFiles/CMakeOutput.log".
See also "/vagrant/folly/_build/CMakeFiles/CMakeError.log".
Related
This is what I do:
git clone https://github.com/mysql/mysql-connector-cpp.git
Than I do:
cd mysql-connector-cpp
git checkout 8.0
cmake .
And than I receive the following output:
-- 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
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- BIG_ENDIAN: 0
Building version 8.0.26
Building on system: Linux-5.11.0-27-generic (x86_64)
Using cmake generator: Unix Makefiles
Using toolset:
Building 64bit code
Building shared connector library
Configuring CDK as part of MySQL_CONCPP project
-- Looking for SSL library.
CMake Error at cdk/cmake/DepFindSSL.cmake:79 (message):
Cannot find appropriate system libraries for SSL. Make sure you've
specified a supported SSL version. Consult the documentation for WITH_SSL
alternatives
Call Stack (most recent call first):
cdk/cmake/DepFindSSL.cmake:354 (main)
cdk/cmake/dependency.cmake:42 (include)
cdk/CMakeLists.txt:96 (find_dependency)
-- Setting up Protobuf.
==== Configuring Protobuf build using cmake generator: Unix Makefiles -DCMAKE_SYSTEM_NAME=Linux;-DCMAKE_SYSTEM_VERSION=5.11.0-27-generic
-- 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
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- BIG_ENDIAN: 0
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Performing Test protobuf_HAVE_BUILTIN_ATOMICS
-- Performing Test protobuf_HAVE_BUILTIN_ATOMICS - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /home/armegon/mysql-connector-cpp/cdk/protobuf
==== Protobuf build configured.
Processor Count: 8
-- Setting up RapidJSON.
Skipping second declaration of config option: THROW_AS_ASSERT (found in: /home/armegon/mysql-connector-cpp/cdk/CMakeLists.txt)
-- Performing Test HAVE_STATIC_ASSERT
-- Performing Test HAVE_STATIC_ASSERT - Success
-- Performing Test HAVE_IS_SAME
-- Performing Test HAVE_IS_SAME - Failed
-- Check size of off64_t
-- Check size of off64_t - done
-- Looking for fseeko
-- Looking for fseeko - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- ZSTD_LEGACY_SUPPORT not defined!
-- Performing Test HAVE_SHARED_PTR
-- Performing Test HAVE_SHARED_PTR - Success
-- Performing Test HAVE_SYSTEM_ERROR
-- Performing Test HAVE_SYSTEM_ERROR - Success
-- Check size of wchar_t
-- Check size of wchar_t - done
-- Looking for sys/endian.h
-- Looking for sys/endian.h - not found
-- Looking for sys/byteorder.h
-- Looking for sys/byteorder.h - not found
Wrote configuration header: /home/armegon/mysql-connector-cpp/cdk/include/mysql/cdk/config.h
Preparing to merge SHARED library: connector (xapi;devapi)
Connector library name: mysqlcppconn8
Building version 8.0.26
Generating INFO_SRC
Generating INFO_BIN
Install location: /usr/local/mysql/connector-c++-
Connector libraries will be installed at: lib64
Project configuration options:
: BUILD_STATIC: OFF
Build static version of connector library
: WITH_SSL: system
Either 'system' to use system-wide OpenSSL library, or custom OpenSSL location. (default : system)
: WITH_JDBC: OFF
Whether to build a variant of connector library which implements legacy JDBC API
-- Configuring incomplete, errors occurred!
See also "/home/armegon/mysql-connector-cpp/CMakeFiles/CMakeOutput.log".
See also "/home/armegon/mysql-connector-cpp/CMakeFiles/CMakeError.log".
The content of CMakeOutput.log is here and the content of CMakeError.log is here.
Any idea how can I fix this issue ?
Never, ever do an in-source build. cmake . is always wrong. It even says so in the MySQL documentation: https://dev.mysql.com/doc/connector-cpp/8.0/en/connector-cpp-installation-source-cpp.html
This worked for me:
$ git clone --depth 1 --branch 8.0 https://github.com/mysql/mysql-connector-cpp.git
$ cmake -G "Unix Makefiles" -S mysql-connector-cpp -B mysql-connector-cpp-build -DCMAKE_BUILD_TYPE=Release
$ cmake --build mysql-connector-cpp-build
It also looks like you're missing the SSL dependency. If you're running a Debian derivative (Ubuntu, Mint), you can install this with:
$ sudo apt install libssl-dev
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.
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.
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/
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.