Cannot install into CentOS 6.6

CodeLite installation/troubleshooting forum
danim
CodeLite Curious
Posts: 2
Joined: Thu Apr 16, 2015 5:25 pm
Genuine User: Yes
IDE Question: C++
Contact:

Cannot install into CentOS 6.6

Post by danim »

As I've seen codelite has no rpm built for CentOS (and couldn't install Fedora ones on it, due to several previous unreachable prerrequisites), I followed the instructions for common linux at http://codelite.org/Developers/Linux
But when I tried the make -j4 command, I got several unrecognized command line option "-std=c++11" errors:

$ make -j4
[ 0%] [ 0%] Built target sqlite3lib
Building CXX object codelitegcc/CMakeFiles/codelite-cc.dir/main.cpp.o
cc1plus: error: unrecognized command line option "-std=c++11"
make[2]: *** [codelitegcc/CMakeFiles/codelite-cc.dir/main.cpp.o] Error 1
make[1]: *** [codelitegcc/CMakeFiles/codelite-cc.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 0%] [ 0%] Building CXX object sdk/codelite_indexer/CMakeFiles/codelite_indexer.dir/pptable.cpp.o
Building CXX object sdk/codelite_indexer/CMakeFiles/codelite_indexer.dir/codelite_index_main.cpp.o
cc1plus: error: unrecognized command line option "-std=c++11"cc1plus: error: unrecognized command line option "-std=c++11"

make[2]: *** [sdk/codelite_indexer/CMakeFiles/codelite_indexer.dir/codelite_index_main.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [sdk/codelite_indexer/CMakeFiles/codelite_indexer.dir/pptable.cpp.o] Error 1
make[1]: *** [sdk/codelite_indexer/CMakeFiles/codelite_indexer.dir/all] Error 2
Scanning dependencies of target codelite_cppcheck
[ 0%] [ 0%] [ 0%] Building CXX object codelitephp/CMakeFiles/PHPParser.dir/PHPParser/clplatform.cpp.o
Building CXX object codelitephp/CMakeFiles/PHPParser.dir/PHPParser/php_utils.cpp.o
Building CXX object codelitephp/CMakeFiles/PHPParser.dir/PHPParser/php_event.cpp.o
cc1plus: error: unrecognized command line option "-std=c++11"
cc1plus: error: unrecognized command line option "-std=c++11"
make[2]: *** [codelitephp/CMakeFiles/PHPParser.dir/PHPParser/php_event.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
cc1plus: error: unrecognized command line option "-std=c++11"
make[2]: *** [codelitephp/CMakeFiles/PHPParser.dir/PHPParser/clplatform.cpp.o] Error 1
make[2]: *** [codelitephp/CMakeFiles/PHPParser.dir/PHPParser/php_utils.cpp.o] Error 1
make[1]: *** [codelitephp/CMakeFiles/PHPParser.dir/all] Error 2
[ 0%] [ 0%] [ 0%] [ 0%] Building CXX object sdk/codelite_cppcheck/CMakeFiles/codelite_cppcheck.dir/cli/pathmatch.cpp.o
Building CXX object sdk/codelite_cppcheck/CMakeFiles/codelite_cppcheck.dir/cli/cppcheckexecutor.cpp.o
Building CXX object sdk/codelite_cppcheck/CMakeFiles/codelite_cppcheck.dir/cli/main.cpp.o
Building CXX object sdk/codelite_cppcheck/CMakeFiles/codelite_cppcheck.dir/cli/filelister.cpp.o
cc1plus: error: unrecognized command line option "-std=c++11"
cc1plus: error: unrecognized command line option "-std=c++11"
make[2]: *** [sdk/codelite_cppcheck/CMakeFiles/codelite_cppcheck.dir/cli/pathmatch.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [sdk/codelite_cppcheck/CMakeFiles/codelite_cppcheck.dir/cli/cppcheckexecutor.cpp.o] Error 1
cc1plus: error: unrecognized command line option "-std=c++11"
make[2]: *** [sdk/codelite_cppcheck/CMakeFiles/codelite_cppcheck.dir/cli/main.cpp.o] Error 1
cc1plus: error: unrecognized command line option "-std=c++11"
make[2]: *** [sdk/codelite_cppcheck/CMakeFiles/codelite_cppcheck.dir/cli/filelister.cpp.o] Error 1
make[1]: *** [sdk/codelite_cppcheck/CMakeFiles/codelite_cppcheck.dir/all] Error 2
make: *** [all] Error 2

Is it due to the gcc version (4.4.7)?

Thank you in advance
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Cannot install into CentOS 6.6

Post by eranif »

Is it due to the gcc version (4.4.7)?
Looks like it.
CodeLite uses some C++11 features which requires the "-std=c++11" flag. You might want to try and replace -std=c++11 with "-std=gnu++11"
You will need to modify CMakeLists.txt files:

Run this command form a terminal:

Code: Select all

eran@eran-linux ~/devl/codelite $ find  . -name "CMakeLists.txt" |xargs grep -n --color "\-std=c++11"
./CMakeLists.txt:73:  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
./CMakeLists.txt:226:set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
./LLDBDebugger/CMakeLists.txt:49:        add_definitions(-std=c++11)
Otherwise, you will need to get a newer gcc

Eran
Make sure you have read the HOW TO POST thread
danim
CodeLite Curious
Posts: 2
Joined: Thu Apr 16, 2015 5:25 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Cannot install into CentOS 6.6

Post by danim »

Thank you for your quick answer, eranif,

Replacing the c++11 per gnu++11 now I get the errors unrecognized command line option "-std=gnu++11"

So I install newer gcc compiler. I saw in another post that the gcc version recommended for compiling codelite was 4.9.3... but gcc seems to have jumped from 4.9.2 to 5.1 version. Will it be enough v4.9.2 (probably easier to install than v5)?

$ make -j4
-- BUILD_DIRECTORY is set to /home/hpc/mimas/dmolina/tmp/codelite/build-release
-- OS name Linux
-- wx-config used is: /usr/bin/wx-config
-- wxWidgets version is: 3.0.2
-- gtk version is: 2
-- LIBSSH_LIB is set to /usr/lib64/libssh.so
-- PLUGINS_DIR is set to /usr/lib64/codelite
-- Using wxAuiNotebook
-- Building in Release mode
-- Executables will be written into /home/hpc/mimas/dmolina/tmp/codelite/build-release/bin
-- Shared Objects will be written into /home/hpc/mimas/dmolina/tmp/codelite/build-release/lib
-- Adding -DNDEBUG to definitions
-- CPACK_SYSTEM_NAME centos-final-x86_64
-- ARCH 64
-- ARCH_NAME x86_64
-- *** NOTICE ***: clang code completion support is disabled
-- *** NOTICE ***: On Ubuntu / Debian you might want to install libclang-3.4-dev package
-- USE_SFTP is set to 1
-- Flex support is disabled
-- libcodelite.so is using RPATH set to /usr/lib64/codelite
-- libplugin.so is using RPATH set to /usr/lib64/codelite
-- Adding Valgrind Plugin
**
** NOTICE ** Could not locate libhunspell. SpellChecker plugin will not be build
** NOTICE ** Try installing libhunspell-dev package
**
**** NOTICE: lldb is not available. You could try installing the lldb-3.4-dev (or equivalent) package
-- Internal Web Browser is disabled
-- CL_SRC_ROOT is set to /home/hpc/mimas/dmolina/tmp/codelite
-- Flex support is disabled
-- Generating desktop file...
-- Including plugin.cmake module
-- CMAKE_SOURCE_DIR is set to /home/hpc/mimas/dmolina/tmp/codelite
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hpc/mimas/dmolina/tmp/codelite/build-release
[ 0%] [ 0%] Built target sqlite3lib
Building CXX object codelitegcc/CMakeFiles/codelite-cc.dir/main.cpp.o
[ 0%] Building CXX object codelitegcc/CMakeFiles/codelite-cc.dir/winproc.cpp.o
[ 0%] Building CXX object sdk/codelite_indexer/CMakeFiles/codelite_indexer.dir/pptable.cpp.o
cc1plus: error: unrecognized command line option "-std=gnu++11"
cc1plus: error: unrecognized command line option "-std=gnu++11"
make[2]: *** [codelitegcc/CMakeFiles/codelite-cc.dir/main.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
cc1plus: error: unrecognized command line option "-std=gnu++11"
make[2]: *** [sdk/codelite_indexer/CMakeFiles/codelite_indexer.dir/pptable.cpp.o] Error 1
[ 0%] make[1]: *** [sdk/codelite_indexer/CMakeFiles/codelite_indexer.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 0%] [ 0%] Building CXX object codelitephp/CMakeFiles/PHPParser.dir/PHPParser/php_utils.cpp.o
Building CXX object codelitephp/CMakeFiles/PHPParser.dir/PHPParser/php_event.cpp.o
Building CXX object codelitephp/CMakeFiles/PHPParser.dir/PHPParser/clplatform.cpp.o
make[2]: *** [codelitegcc/CMakeFiles/codelite-cc.dir/winproc.cpp.o] Error 1
make[1]: *** [codelitegcc/CMakeFiles/codelite-cc.dir/all] Error 2
cc1plus: error: unrecognized command line option "-std=gnu++11"
make[2]: *** [codelitephp/CMakeFiles/PHPParser.dir/PHPParser/php_utils.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
cc1plus: error: unrecognized command line option "-std=gnu++11"
[ 0%] make[2]: *** [codelitephp/CMakeFiles/PHPParser.dir/PHPParser/php_event.cpp.o] Error 1
cc1plus: error: unrecognized command line option "-std=gnu++11"
make[2]: *** [codelitephp/CMakeFiles/PHPParser.dir/PHPParser/clplatform.cpp.o] Error 1
Building CXX object codelitephp/CMakeFiles/PHPParser.dir/PHPParser/php_code_completion.cpp.o
cc1plus: error: unrecognized command line option "-std=gnu++11"
make[2]: *** [codelitephp/CMakeFiles/PHPParser.dir/PHPParser/php_code_completion.cpp.o] Error 1
make[1]: *** [codelitephp/CMakeFiles/PHPParser.dir/all] Error 2
make: *** [all] Error 2
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Cannot install into CentOS 6.6

Post by eranif »

4.9.2 is perfectly fine.
Revert the local changes you did, delete the file CMakeCache.txt, re-run cmake and you should be fine

Eran
Make sure you have read the HOW TO POST thread
Post Reply