I'm trying to compile GNU GCC on OSX (SnowLeopard). I first compiled gmp, mpfr and mpc 1) GMP cd gmp-5.0.1 ./configure --prefix=$(cd ../install-gmp && pwd) make install 2) MPFR cd mpfr-2.4.2 ./configure --prefix=$(cd ../install-mpfr && pwd) --with-gmp=/Users/maluta/Software/install-gmp make install 3) MPC cd mpc-0.8.1 ./configure --prefix=$(cd ../install-mpc && pwd) --with-gmp=/Users/maluta/Software/install-gmp --with-mpfr=/Users/maluta/Software/install-mpfr make install And then gcc-core 4) GCC (4.3.4) ../gcc-4.3.4/configure --prefix=$(cd ../install-gcc && pwd) --with-gmp=/Users/maluta/Software/install-gmp --with-mpfr=/Users/maluta/Software/install-mpfr --with-mpc=/Users/maluta/Software/install-mpc --disable-checking --enable-werror --enable-languages=c --program-transform-name=/^[cg][^.-]*$/s/$/-4.3.4/ But I got the following error message: $ make (...) /Users/maluta/Software/build-gcc/./prev-gcc/xgcc -B/Users/maluta/Software/build-gcc/./prev-gcc/ -B/Users/maluta/Software/install-gcc/i386-apple-darwin10.2.0/bin/ -g -O2 -fomit-frame-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -DHAVE_CONFIG_H -o cc1-dummy c-lang.o stub-objc.o attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o c-semantics.o c-incpath.o cppdefault.o c-ppoutput.o c-cppbuiltin.o prefix.o c-objc-common.o c-dump.o c-pch.o c-parser.o darwin-c.o c-gimplify.o tree-mudflap.o c-pretty-print.o c-omp.o dummy-checksum.o \ main.o libbackend.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a ../libcpp/libcpp.a ./../intl/libintl.a -liconv ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -L/Users/maluta/Software/install-gmp/lib -L/Users/maluta/Software/install-mpfr/lib -lmpfr -lgmp ld: warning: in /Users/maluta/Software/install-mpfr/lib/libmpfr.dylib, file is not of required architecture ld: warning: in /Users/maluta/Software/install-gmp/lib/libgmp.dylib, file is not of required architecture Undefined symbols: "_mpfr_lgamma", referenced from: _fold_builtin_2 in libbackend.a(builtins.o) "___gmpz_set_ui", referenced from: _get_type_static_bounds in libbackend.a(tree.o) _split_to_var_and_offset in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) "_mpfr_underflow_p", referenced from: _do_mpfr_ckconv in libbackend.a(builtins.o) "_mpfr_get_version", referenced from: _print_version in libbackend.a(toplev.o) _print_version in libbackend.a(toplev.o) "___gmpz_fdiv_q", referenced from: _number_of_iterations_ne in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_lt in libbackend.a(tree-ssa-loop-niter.o) "___gmpz_sub_ui", referenced from: _number_of_iterations_lt in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) "_mpfr_free_str", referenced from: _real_from_mpfr in libbackend.a(real.o) "_mpfr_set_inf", referenced from: _mpfr_from_real in libbackend.a(real.o) "_mpfr_set_nan", referenced from: _mpfr_from_real in libbackend.a(real.o) "_mpfr_set_str", referenced from: _mpfr_from_real in libbackend.a(real.o) "___gmpz_out_str", referenced from: _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) "_mpfr_j0", referenced from: _mpfr_j0$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_j1", referenced from: _mpfr_j1$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_remquo", referenced from: _fold_builtin_n in libbackend.a(builtins.o) "_mpfr_jn", referenced from: _mpfr_jn$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_y0", referenced from: _mpfr_y0$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_y1", referenced from: _mpfr_y1$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_yn", referenced from: _mpfr_yn$non_lazy_ptr in libbackend.a(builtins.o) "___gmpz_clear", referenced from: _mpz_get_double_int in libbackend.a(double-int.o) _mpz_get_double_int in libbackend.a(double-int.o) _bounds_add in libbackend.a(tree-ssa-loop-niter.o) _bounds_add in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_ne in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_ne in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_ne in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_lt in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_lt in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_lt in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_lt in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_lt in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_lt in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_lt in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_lt in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) "_mpfr_number_p", referenced from: _do_mpfr_ckconv in libbackend.a(builtins.o) "_mpfr_overflow_p", referenced from: _do_mpfr_ckconv in libbackend.a(builtins.o) "___gmpz_export", referenced from: _mpz_get_double_int in libbackend.a(double-int.o) "___gmpz_init", referenced from: _mpz_get_double_int in libbackend.a(double-int.o) _mpz_get_double_int in libbackend.a(double-int.o) _bounds_add in libbackend.a(tree-ssa-loop-niter.o) _bounds_add in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_ne in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_ne in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_lt in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_lt in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_lt in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_lt in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_lt in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) "_mpfr_clears", referenced from: _do_mpfr_arg2 in libbackend.a(builtins.o) _do_mpfr_sincos in libbackend.a(builtins.o) _fold_builtin_n in libbackend.a(builtins.o) _fold_builtin_n in libbackend.a(builtins.o) "_mpfr_sin_cos", referenced from: _do_mpfr_sincos in libbackend.a(builtins.o) "___gmpz_swap", referenced from: _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) "_mpfr_get_str", referenced from: _real_from_mpfr in libbackend.a(real.o) "___gmpz_import", referenced from: _mpz_set_double_int in libbackend.a(double-int.o) _mpz_set_double_int in libbackend.a(double-int.o) "_mpfr_remainder", referenced from: _mpfr_remainder$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_acosh", referenced from: _mpfr_acosh$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_atan2", referenced from: _mpfr_atan2$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_atanh", referenced from: _mpfr_atanh$non_lazy_ptr in libbackend.a(builtins.o) "___gmpz_add", referenced from: _bounds_add in libbackend.a(tree-ssa-loop-niter.o) _bounds_add in libbackend.a(tree-ssa-loop-niter.o) _determine_value_range in libbackend.a(tree-ssa-loop-niter.o) _determine_value_range in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_lt in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_lt in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) "_mpfr_asinh", referenced from: _mpfr_asinh$non_lazy_ptr in libbackend.a(builtins.o) "___gmpz_cmp", referenced from: _mpz_get_double_int in libbackend.a(double-int.o) _mpz_get_double_int in libbackend.a(double-int.o) _bounds_add in libbackend.a(tree-ssa-loop-niter.o) _bounds_add in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_lt in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_lt in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_lt in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_lt in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) "_mpfr_clear", referenced from: _do_mpfr_arg1 in libbackend.a(builtins.o) _do_mpfr_bessel_n in libbackend.a(builtins.o) _fold_builtin_2 in libbackend.a(builtins.o) "___gmpz_set", referenced from: _mpz_get_double_int in libbackend.a(double-int.o) _mpz_get_double_int in libbackend.a(double-int.o) _bounds_add in libbackend.a(tree-ssa-loop-niter.o) _bounds_add in libbackend.a(tree-ssa-loop-niter.o) _determine_value_range in libbackend.a(tree-ssa-loop-niter.o) _determine_value_range in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_ne in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_ne in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_ne in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) "___gmpz_sub", referenced from: _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) "_mpfr_gamma", referenced from: _mpfr_gamma$non_lazy_ptr in libbackend.a(builtins.o) "___gmpz_init_set", referenced from: _number_of_iterations_ne in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) "_mpfr_exp10", referenced from: _mpfr_exp10$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_expm1", referenced from: _mpfr_expm1$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_init2", referenced from: _do_mpfr_arg1 in libbackend.a(builtins.o) _do_mpfr_bessel_n in libbackend.a(builtins.o) _fold_builtin_2 in libbackend.a(builtins.o) "_mpfr_hypot", referenced from: _mpfr_hypot$non_lazy_ptr in libbackend.a(builtins.o) "___gmp_version", referenced from: ___gmp_version$non_lazy_ptr in libbackend.a(toplev.o) "_mpfr_log10", referenced from: _mpfr_log10$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_log1p", referenced from: _mpfr_log1p$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_set_erangeflag", referenced from: _real_from_mpfr in libbackend.a(real.o) "_mpfr_clear_flags", referenced from: _do_mpfr_arg2 in libbackend.a(builtins.o) _do_mpfr_sincos in libbackend.a(builtins.o) _do_mpfr_arg1 in libbackend.a(builtins.o) _do_mpfr_bessel_n in libbackend.a(builtins.o) _fold_builtin_n in libbackend.a(builtins.o) _fold_builtin_n in libbackend.a(builtins.o) _fold_builtin_2 in libbackend.a(builtins.o) "___gmpz_sizeinbase", referenced from: _mpz_get_double_int in libbackend.a(double-int.o) "_mpfr_inits2", referenced from: _do_mpfr_arg2 in libbackend.a(builtins.o) _do_mpfr_sincos in libbackend.a(builtins.o) _fold_builtin_n in libbackend.a(builtins.o) _fold_builtin_n in libbackend.a(builtins.o) "_mpfr_acos", referenced from: _mpfr_acos$non_lazy_ptr in libbackend.a(builtins.o) "___gmpz_add_ui", referenced from: _number_of_iterations_lt in libbackend.a(tree-ssa-loop-niter.o) _number_of_iterations_exit in libbackend.a(tree-ssa-loop-niter.o) "_mpfr_cbrt", referenced from: _mpfr_cbrt$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_atan", referenced from: _mpfr_atan$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_asin", referenced from: _mpfr_asin$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_cosh", referenced from: _mpfr_cosh$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_erfc", referenced from: _mpfr_erfc$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_exp2", referenced from: _mpfr_exp2$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_log2", referenced from: _mpfr_log2$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_tanh", referenced from: _mpfr_tanh$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_sinh", referenced from: _mpfr_sinh$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_sqrt", referenced from: _mpfr_sqrt$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_dim", referenced from: _mpfr_dim$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_cos", referenced from: _mpfr_cos$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_fma", referenced from: _fold_builtin_n in libbackend.a(builtins.o) "_mpfr_erf", referenced from: _mpfr_erf$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_exp", referenced from: _mpfr_exp$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_max", referenced from: _mpfr_max$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_log", referenced from: _mpfr_log$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_min", referenced from: _mpfr_min$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_pow", referenced from: _mpfr_pow$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_tan", referenced from: _mpfr_tan$non_lazy_ptr in libbackend.a(builtins.o) "_mpfr_sin", referenced from: _mpfr_sin$non_lazy_ptr in libbackend.a(builtins.o) ld: symbol(s) not found collect2: ld returned 1 exit status make[3]: *** [cc1-dummy] Error 1 make[2]: *** [all-stage2-gcc] Error 2 make[1]: *** [stage2-bubble] Error 2 make: *** [all] Error 2 ------ I tried to build GNU binutils to use GNU ld without success (the package compile and install but don't generate ld nor gprof) Command used to generate binutils: ./configure --prefix=$(cd ../install-binutils/ && pwd) --with-gmp=/Users/maluta/Software/install-gmp --with-mpfr=/Users/maluta/Software/install-mpfr --with-mpc=/Users/maluta/Software/install-mpc --disable-werror I want build gcc-core to build gcc-ada and ghdl. Best regards, --tm