0
  • I am trying a build gcc on my Mac it is an intel Mac. I do have these libraries, the libraries are here, so it is usr/local/lib for the libraries and the headers are here usr/local/include. I also successfully compiled and install gmp and mpfr accept the mpc for some reason it is not locating.

gcc error:

configure: error: Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+. Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify their locations. Source code for these libraries can be found at their respective hosting sites as well as at https://gcc.gnu.org/pub/gcc/infrastructure/. See also http://gcc.gnu.org/install/prerequisites.html for additional info. If you obtained GMP, MPFR and/or MPC from a vendor distribution package, make sure that you have installed both the libraries and the header files. They may be located in separate packages.

Mpc error:

configure: error: gmp.h cannot be found or is unusable.

Rose
  • 1
  • 1
  • Welcome, I suggest taking the [tour] and reading [ask] and [mcve]. Did you run the prerequisities `./contrib/download_prerequisites` script shipped with the GCC source code? Check https://gcc.gnu.org/wiki/InstallingGCC The hard way is *not* recommended. If you do want to do it the hard way, you have to tell us how your include paths are set up. – Vladimir F Героям слава Oct 21 '22 at 11:48
  • Notably, please check how environment variables like `C_INCLUDE_PATH`, `CPLUS_INCLUDE_PATH` and `CPATH` are set and try to add `/usr/local/include` into them. – Vladimir F Героям слава Oct 21 '22 at 12:09
  • 2
    Just in case: unless you really need to have a custom GCC installation built by yourself, it's way easier to get GCC through the [MacPorts](https://www.macports.org/) package manager (which also carries tons of useful unix tools). – PierU Oct 21 '22 at 13:26
  • @Vladimir F Героям слава I have tried what you wrote about the path but I have another error after that. **'/usr/local/include/c++/11.2.0/new:40:10: fatal error: bits/c++config.h: No such file or directory 40 | #include | ^~~~~~~~~~~~~~~~~~ compilation terminated. make[3]: *** [charset.o] Error 1 make[2]: *** [all-build-libcpp] Error 2 make[1]: *** [stage1-bubble] Error 2 make: *** [all] Error 2'** – Rose Oct 21 '22 at 21:04
  • No idea about this error, you can ask separately, but I repeat, the hard way is **not** recommended. You should use the provided `./contrib/download_prerequisites` instead. – Vladimir F Героям слава Oct 21 '22 at 21:32

0 Answers0