I am trying to compile a pice of software using Cmake and get the following error. I have checked using yum to make sure that gcc. gcc-c++ and ncurses are all installed and up to date. Any ideas?
-- The C compiler identification is GNU 4.4.7
-- The CXX compiler identification is unknown
-- Check for working C compiler: /usr/lib64/ccache/gcc
-- Check for working C compiler: /usr/lib64/ccache/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
CMake Error at CMakeLists.txt:5 (project):
The CMAKE_CXX_COMPILER:
g++44
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
problem with g++ and CXX in Cmake
Re: problem with g++ and CXX in Cmake
sorry, one other pievce of info. This is the bootstrap shell.
[Moderator edited to insert code tags so as to preserve formatting.]
Code: Select all
if [ $(uname) == 'Linux' ]
then
if [ -e /etc/gentoo-release ]
then
export LDFLAGS="-nopie"
elif [ -e /etc/redhat-release ]
then
CMAKE_DEFS="-DCMAKE_CXX_COMPILER=g++44"
fi
elif [ $(uname) == 'Darwin' ]
then
# sudo ports install gcc44
CMAKE_DEFS="-DCMAKE_CXX_COMPILER=/opt/local/bin/g++-mp-4.4"
fi
CMAKE_DEFS="-DCMAKE_INSTALL_PREFIX=${PWD} $CMAKE_DEFS"
if [ $# == 1 ]
then
case $1 in
'debug')
CMAKE_DEFS="-DCMAKE_BUILD_TYPE=Debug $CMAKE_DEFS"
;;
'release')
CMAKE_DEFS="-DCMAKE_BUILD_TYPE=Release $CMAKE_DEFS"
;;
'static')
CMAKE_DEFS="-DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS=-static $CMAKE_DEFS"
;;
esac
fi
rm -rf build
mkdir build
cd build && cmake .. ${CMAKE_DEFS}
Re: problem with g++ and CXX in Cmake
The g++ compiler on CentOS 6 is just called g++ not g++44. Your script is setting the wrong value, it seems to think it's on CentOS 5 where the default compiler is 4.1.2 and the 4.4.7 compiler is an optional parallel install called g++44.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: problem with g++ and CXX in Cmake
problem solved, there is an error in the bootstrap file.