1
votes

The main problem I met is that I have installed dependencies such as MPC, MPFR, GMP, use homebrew. And then I tried to install i386-elf-gcc

Firstly I tapped brew tap altkatz/homebrew-gcc_cross_compilers and then brew install i386-elf-gcc , for sure some errors occurred.

configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.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 ftp://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.

Actually I've already installed MPC and so on with homebrew, these things just located in /usr/local/Cellar

Then I brew install i386-elf-gcc --with-mpc=/usr/local/Cellar/mpc/0.27/bin --with-gmp=/usr/local/Cellar/gmp/6.0.0a/lib --with-mpfr=/usr/local/Cellar/mpfr/3.1.3/lib

Finally I got this

configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+. Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify their locations. 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.

Nothing changed...

Could anybody here help me? please.....

just wanna brew install i386-elf-gcc

However thanks everyone viewed this question, thank you

2

2 Answers

2
votes

try

brew tap nativeos/i386-elf-toolchain
brew install i386-elf-binutils i386-elf-gcc

https://github.com/nativeos/homebrew-i386-elf-toolchain

0
votes

Firstly, I used brew tap altkatz/homebrew-gcc_cross_compilers, but it didn't work.

Then I used MacPort like this and it worked:

$ port search i386-elf-gcc

$ sudo port install i386-elf-gcc

This installed i386-elf-gcc @4.7.2 successfully for me.

However, I couldn't find i386-elf-gdb in MacPort or HomeBrew. So I downloaded the source file of gdb and change the configure(./configure file), then make make install and it is ok now.

For details: https://icoderme.wordpress.com/2010/05/05/install-i386-elf-gdb-on-mac-os-x/