[CMake] Re: CMAKE_CXX_COMPILER_FULLPATH-NOTFOUND...

Patrick Gelin patrick.gelin at free.fr
Sun Mar 25 09:37:42 EST 2007


Bill Hoffman wrote:

> Patrick Gelin wrote:
>> Hi,
>>
>> this is my problem:
>>
>> gelinp at gelinux:~/Desktop/lilidab$ cmake .
>> -- Check for working CXX compiler: CMAKE_CXX_COMPILER_FULLPATH-NOTFOUND
>> CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER_FULLPATH-NOTFOUND"
>> was
>> not found.   Please set CMAKE_CXX_COMPILER to a valid compiler path or
>> name.
>> CMake Error: Internal CMake error, TryCompile configure of cmake failed
>> -- Check for working CXX compiler: CMAKE_CXX_COMPILER_FULLPATH-NOTFOUND
>> -- broken
>> CMake Error: Error in cmake code at
>> /usr/share/CMake/Modules/CMakeTestCXXCompiler.cmake:25:
>> MESSAGE The C++ compiler "CMAKE_CXX_COMPILER_FULLPATH-NOTFOUND" is not
>> able to compile a simple test program.
>> It fails with the following output:
>>  
>>
>> CMake will not be able to correctly generate this project.
>> Current CMake
>> stack:
>> /home/gelinp/Desktop/lilidab/CMakeLists.txt;/usr/share/CMake/Modules/CMakeCInformation.cmake;/usr/share/CMake/Modules/CMakeCXXInformation.cmake;/usr/share/CMake/Modules/CMakeTestCXXCompiler.cmake
>> CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER_FULLPATH-NOTFOUND"
>> was
>> not found.   Please set CMAKE_CXX_COMPILER to a valid compiler path or
>> name.
>> -- Configuring done
>>
>> I installed g++ and gcc packages but it is the same problem.
>>
>> What can I do?
>>
>> Thank you for your help.
>>
>>   
> Find out what gcc/g++ are called on your machine.   Then set CC to gcc
> and CXX to g++.  My guess is on your OS gcc was installed as gcc-4.0.1
> or some other version appended to the name.   CMake only looks for
> standard names for compilers....   cc, gcc, g++, c++, CC, etc.   Some
> linux distros have been installing the executables with versions
> appended to the names, and cmake can't keep up with the names.   I would
> think that autoconf would have the same issue.   So, you can either set
> CC and CXX before running cmake, or put a symlink from gcc-some-version
> to gcc in your bin directory.
> 
> -Bill

Hello Bill,

I don't think so because the comand below show that gcc and g++ exist like
this:
gelinp at gelinux:~$ gcc --version
gcc (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)
Copyright (C) 2006 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.

gelinp at gelinux:~$ g++ --version
g++ (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)
Copyright (C) 2006 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.

By the way, when you say "Then set CC to gcc and CXX to g++" are you talking
about variables to set into .bashrc file or variable to set into the
CMakeList.txt file? I don't really understand that CmakeList.txt file
because I'm a newbe for cmake and I want only to compile a tool. I
used .configure, then make because that I know...

Thank you for your help.



More information about the CMake mailing list