Centos CMakeはgcc 4.7.2を使用してインストールすることはできません。

Centos CMakeはgcc 4.7.2を使用してインストールすることはできません。

同様の問題がここに報告されましたが、解決策はありません。https://www.centos.org/modules/newbb/print.php?form=1&topic_id=42696&forum=56&order=ASC&start=0

gccを追加してcentosにアップグレードしました。

cd /etc/yum.repos.d
wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo 
yum --enablerepo=testing-1.1-devtools-6 install devtoolset-1.1-gcc devtoolset-1.1-gcc-c++
scl enable devtoolset-1.1 bash

私のgccの結果は次のとおりです

[root@hhvm-build-centos cmake-2.8.11.1]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/centos/devtoolset-1.1/root/usr/libexec/gcc/x86_64-redhat-linux/4.7.2/lto-wrapper
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=http://bugzilla.redhat.com/bugzilla --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) 

その後、私はcmakeをインストールしてみました:http://www.cmake.org/cmake/resources/software.html#latest

しかし、引き続き次のエラーが発生します。

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/libtinfo.so.5 so try adding it to the linker command line
/lib64/libtinfo.so.5: 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

問題は、基本インストールで動作する新しいgccインストールで発生したようです。この問題に対する解決策はありますか?

ベストアンサー1

問題は、最新バージョンのbinutilsにあると思います。 binutils 2.23.2を使用してgcc-4.7.2でOpenFOAMをコンパイルしようとしましたが、cmakeを使用して同じエラーが発生しました。バージョン2.8.3、2.8.4、および最新の2.8.12.1を試しましたが、すべて成功しませんでした(同じキーボードエラー)。しかし、後でcmake-2.8.3を正常にコンパイルしましたが(gcc 4.7.3を使用しましたが、4.7.2も動作すると思います)バイナリユーティリティ 2.23(これは私の考えではないことを付け加えたい)。投稿18-21の議論に従うことができます。 http://www.cfd-online.com/Forums/openfoam-installation/121996-error-installing-openfoam-2-2-0-centos-6-4-a.html

おすすめ記事