Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

A similar problem has been reported here with no solution:

I've added and upgraded gcc to centos

cd /etc/yum.repos.d
yum --enablerepo=testing-1.1-devtools-6 install devtoolset-1.1-gcc devtoolset-1.1-gcc-c++
scl enable devtoolset-1.1 bash

The result is this for my gcc

[root@hhvm-build-centos cmake-]# gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/opt/centos/devtoolset-1.1/root/usr --mandir=/opt/centos/devtoolset-1.1/root/usr/share/man --infodir=/opt/centos/devtoolset-1.1/root/usr/share/info --with-bugurl= --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --disable-build-with-cxx --disable-build-poststage1-with-cxx --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,fortran,lto --enable-plugin --with-linker-hash-style=gnu --enable-initfini-array --disable-libgcj --with-ppl --with-cloog --with-mpc=/home/centos/rpm/BUILD/gcc-4.7.2-20121015/obj-x86_64-redhat-linux/mpc-install --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.7.2 20121015 (Red Hat 4.7.2-5) (GCC) 

And I tried to then install cmake through

But I keep running into this error:

Linking CXX executable ../bin/ccmake
/opt/centos/devtoolset-1.1/root/usr/libexec/gcc/x86_64-redhat-linux/4.7.2/ld: CMakeFiles/ccmake.dir/CursesDialog/cmCursesMainForm.cxx.o: undefined reference to symbol 'keypad'
/opt/centos/devtoolset-1.1/root/usr/libexec/gcc/x86_64-redhat-linux/4.7.2/ld: note: 'keypad' is defined in DSO /lib64/ so try adding it to the linker command line
/lib64/ could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
gmake[2]: *** [bin/ccmake] Error 1
gmake[1]: *** [Source/CMakeFiles/ccmake.dir/all] Error 2
gmake: *** [all] Error 2

The problem seems to come from the new gcc installed because it works with the default install. Is there a solution to this problem?

share|improve this question

migrated from Jun 29 '13 at 8:43

This question came from our site for system and network administrators.

This question appears to be off-topic because it is about – Ward Jun 29 '13 at 4:03

2 Answers 2

I think the problem is with the more recent versions of binutils. I tried to compile OpenFOAM with gcc-4.7.2 using binutils 2.23.2 and got the same error with cmake. I tried versions 2.8.3, 2.8.4 and the most recent - all without success (same keypad error). However I later succeeded in compiling cmake-2.8.3 (using gcc 4.7.3 but I think 4.7.2 will work as well) but using binutils 2.23 (not my idea I would add). You can follow the discussion in posts 18-21

share|improve this answer

in folder OpenFOAM/ThirdParty-2.3.1/cmake- in file CMakeLists.txt add the following line

target_link_libraries(ccmake tinfo)

(just below other target_link_libraries commands)


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.