I am trying to install a c++ compiler on a IBM Power7 with Fedora 26. In /usr/bin it is installed gcc [(GCC) 7.2.1 20170915 (Red Hat 7.2.1-2)]
but it has not the c++ compiler (I tried gcc -lstdc++
but the result is: `
/usr/bin/ld: cannot find -lstdc++
I do not have sudo rights so I have to install everything from source. I was able to install:
but when I try to install locally gcc, after a successfull configure
, when I try make
I got this error:
configure: error: in `/home/aantonietti/gcc/host-powerpc64-unknown-linux-gnu/gcc':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
make[2]: *** [Makefile:4333: configure-stage1-gcc] Error 1
make[2]: Leaving directory '/home/aantonietti/gcc'
make[1]: *** [Makefile:23745: stage1-bubble] Error 2
make[1]: Leaving directory '/home/aantonietti/gcc'
make: *** [Makefile:945: all] Error 2
I also tried to install clang++
but it needs tons of other dependecies.
Do you have any hint on how to install just the gcc-c++
compiler?
Why don't you run dnf install gcc-c++
? It will install the C++ system compiler bring in linking support for libstdc++
as well.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.