I have same problem on this page:
https://sampforum.blast.hk/showthread.php?tid=56564&page=558
Unfortunately there's no solution.
Код:
[root@localhost build]# cmake ..
-- The C compiler identification is GNU 4.4.7
-- The CXX compiler identification is GNU 4.4.7
-- 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
-- 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
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Failed
CMake Error at CMakeLists.txt:74 (message):
The compiler /usr/bin/c++ does not fulfill all required standards. Please
use a different C++ compiler.
-- Configuring incomplete, errors occurred!
See also "/home/kasutaja/Desktop/mysql/SA-MP-MySQL-master/build/CMakeFiles/CMakeOutput.log".
See also "/home/kasutaja/Desktop/mysql/SA-MP-MySQL-master/build/CMakeFiles/CMakeError.log".
[root@localhost build]# cmake --version
cmake version 2.8.12.2
[root@localhost build]# /opt/rh/devtoolset-2/root/usr/bin/gcc --version
gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)
Copyright © 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Код:
Performing C++ SOURCE FILE Test COMPILER_SUPPORTS_CXX11 failed with the following output:
Change Dir: /home/kasutaja/Desktop/mysql/SA-MP-MySQL-master/build/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/gmake "cmTryCompileExec1377417873/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec1377417873.dir/build.make CMakeFiles/cmTryCompileExec1377417873.dir/build
gmake[1]: Entering directory `/home/kasutaja/Desktop/mysql/SA-MP-MySQL-master/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/kasutaja/Desktop/mysql/SA-MP-MySQL-master/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building CXX object CMakeFiles/cmTryCompileExec1377417873.dir/src.cxx.o
/usr/bin/c++ -m32 -std=c++11 -DCOMPILER_SUPPORTS_CXX11 -o CMakeFiles/cmTryCompileExec1377417873.dir/src.cxx.o -c /home/kasutaja/Desktop/mysql/SA-MP-MySQL-master/build/CMakeFiles/CMakeTmp/src.cxx
cc1plus: error: unrecognized command line option "-std=c++11"
gmake[1]: Leaving directory `/home/kasutaja/Desktop/mysql/SA-MP-MySQL-master/build/CMakeFiles/CMakeTmp'
gmake[1]: *** [CMakeFiles/cmTryCompileExec1377417873.dir/src.cxx.o] Error 1
gmake: *** [cmTryCompileExec1377417873/fast] Error 2
Source file was:
#include <tuple>
#include <functional>
#include <unordered_map>
#include <forward_list>
#include <string>
class CTest
{
public:
CTest() = default;
~CTest() = default;
CTest(const CTest &rhs) = delete;
CTest(CTest &&mv)
{
m_Num = mv.m_Num;
m_NumPtr = mv.m_NumPtr;
}
int m_Num = 42;
int *m_NumPtr = nullptr;
std::unordered_map<std::string, int> m_Map;
std::forward_list<int> m_ForwardList;
};
int main(void)
{
int RefVar = 123;
std::tuple<
int,
std::function<bool(int, int&)>>
MyTuple(
42, [&RefVar](int num1, int &sub_ref)
{
RefVar += num1;
sub_ref += RefVar;
return true;
}
);
enum class StronglyTypedEnum
{
ENUM_VAR1,
ENUM_VAR2
};
CTest test_class;
return 0;
}
I'm trying compile on CentOS Linux 6.6, because VPS operation system is too CentOS Linux 6.6. (64bit)
I did this too:
http://people.centos.org/tru/devtools-2/readme
I have boost installed by yum install boost.
What's problem and how I can fix it?
Also...
Код:
[root@localhost build]# cmake --DCMAKE_C_COMPILER=/opt/rh/devtoolset-2/root/usr/bin/gcc -DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-2/root/usr/bin/g++ ..
CMake Error at CMakeLists.txt:74 (message):
The compiler /opt/rh/devtoolset-2/root/usr/bin/g++ does not fulfill all
required standards. Please use a different C++ compiler.
-- Configuring incomplete, errors occurred!
See also "/home/kasutaja/Desktop/mysql/SA-MP-MySQL-master/build/CMakeFiles/CMakeOutput.log".
See also "/home/kasutaja/Desktop/mysql/SA-MP-MySQL-master/build/CMakeFiles/CMakeError.log".
You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_CXX_COMPILER= /opt/rh/devtoolset-2/root/usr/bin/g++
-- Generating done
-- Build files have been written to: /home/kasutaja/Desktop/mysql/SA-MP-MySQL-master/build
And there's no 2 log files, but it says that I should look those log files.
// edit.. I updated g++ too, because it was 4.2.X not 4.8.X. Only gcc was 4.8.X. After upgrading now both is 4.8.X.
Still receiving errors:
Код:
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /opt/rh/devtoolset-2/root/usr/bin/g++
Build flags:
Id flags:
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /opt/rh/devtoolset-2/root/usr/bin/g++
Build flags:
Id flags: -c
The output was:
No such file or directory
Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
Determining if the CXX compiler works failed with the following output:
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /opt/rh/devtoolset-2/root/usr/bin/g++
Build flags:
Id flags:
The output was:
No such file or directory
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /opt/rh/devtoolset-2/root/usr/bin/g++
Build flags:
Id flags: -c
The output was:
No such file or directory
Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
Determining if the CXX compiler works failed with the following output:
Performing C++ SOURCE FILE Test COMPILER_SUPPORTS_CXX11 failed with the following output:
Change Dir: /home/kasutaja/Desktop/mysql/SA-MP-MySQL-master/build/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/gmake "cmTryCompileExec222989886/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec222989886.dir/build.make CMakeFiles/cmTryCompileExec222989886.dir/build
gmake[1]: Entering directory `/home/kasutaja/Desktop/mysql/SA-MP-MySQL-master/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/kasutaja/Desktop/mysql/SA-MP-MySQL-master/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building CXX object CMakeFiles/cmTryCompileExec222989886.dir/src.cxx.o
/opt/rh/devtoolset-2/root/usr/bin/g++ -m32 -std=c++11 -DCOMPILER_SUPPORTS_CXX11 -o CMakeFiles/cmTryCompileExec222989886.dir/src.cxx.o -c /home/kasutaja/Desktop/mysql/SA-MP-MySQL-master/build/CMakeFiles/CMakeTmp/src.cxx
Linking CXX executable cmTryCompileExec222989886
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec222989886.dir/link.txt --verbose=1
/opt/rh/devtoolset-2/root/usr/bin/g++ -m32 -std=c++11 -DCOMPILER_SUPPORTS_CXX11 CMakeFiles/cmTryCompileExec222989886.dir/src.cxx.o -o cmTryCompileExec222989886 -rdynamic
/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/ld: cannot find /usr/lib/libstdc++.so.6
/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/ld: skipping incompatible /opt/rh/devtoolset-2/root/usr/lib/gcc/x86_64-redhat-linux/4.8.2/libstdc++_nonshared.a when searching for -lstdc++_nonshared
/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/ld: cannot find -lstdc++_nonshared
/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/ld: cannot find /lib/libgcc_s.so.1
collect2: error: ld returned 1 exit status
gmake[1]: Leaving directory `/home/kasutaja/Desktop/mysql/SA-MP-MySQL-master/build/CMakeFiles/CMakeTmp'
gmake[1]: *** [cmTryCompileExec222989886] Error 1
gmake: *** [cmTryCompileExec222989886/fast] Error 2