GCC 10.1.0 on macOS Big Sur

Viewed 2005

I'm trying to Compile GCC 10.1.0 on macOS Big Sur with the new arm powered Mac. Due of the lack of tutorials for compiling on Big Sur, I decided to compile as if on Catalina using this tutorial. All was well until I ran the 'make' command which then gave me a series of confusing errors. Appending 'make' with '-j 8' returns a different error rather than just 'make' as shown below.

make -j 8

Making all in expr
Undefined symbols for architecture x86_64:
  "__sch_istable", referenced from:
      _main in fixincl.o
      _initialize in fixincl.o
      _process in fixincl.o
      _char_macro_def_fix in fixfixes.o
      _char_macro_use_fix in fixfixes.o
      _format_fix in fixfixes.o
      _wrap_fix in fixfixes.o
      ...
  "__sch_toupper", referenced from:
      _wrap_fix in fixfixes.o
      _gnu_type_fix in fixfixes.o
  "_fdopen_unlocked", referenced from:
      _process in fixincl.o
      _load_file in fixincl.o
      _create_file in fixincl.o
      _proc2_fopen in procopen.o
  "_freopen_unlocked", referenced from:
      _main in fixincl.o
      _initialize in fixincl.o
  "_xcalloc", referenced from:
      _run_compiles in fixincl.o
      _run_shell in server.o
  "_xmalloc", referenced from:
      _process in fixincl.o
      _wrap_fix in fixfixes.o
      _run_shell in server.o
  "_xmalloc_set_program_name", referenced from:
      _initialize in fixincl.o
  "_xrealloc", referenced from:
      _run_shell in server.o
      _load_file_data in fixlib.o
  "_xregcomp", referenced from:
      _compile_re in fixlib.o
      _mn_get_regexps in fixlib.o
  "_xregerror", referenced from:
      _compile_re in fixlib.o
      _mn_get_regexps in fixlib.o
  "_xregexec", referenced from:
      _process in fixincl.o
      _machine_name_test in fixtests.o
      _char_macro_def_fix in fixfixes.o
      _char_macro_use_fix in fixfixes.o
      _format_fix in fixfixes.o
      _machine_name_fix in fixfixes.o
      _wrap_fix in fixfixes.o
      ...
  "_xstrdup", referenced from:
      _run_shell in server.o
  "_xstrerror", referenced from:
      _initialize in fixincl.o
      _process in fixincl.o
      _load_file in fixincl.o
      _create_file in fixincl.o
      _chain_open in procopen.o
      _load_file_data in fixlib.o
ld: symbol(s) not found for architecture x86_64
make[6]: Nothing to be done for `all'.
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [full-stamp] Error 1
make[6]: Nothing to be done for `all-am'.
make[2]: *** [all-build-fixincludes] Error 2
make[2]: *** Waiting for unfinished jobs....
Making all in tune
make[5]: Nothing to be done for `all'.
Making all in doc
make[5]: Nothing to be done for `all'.
make[5]: Nothing to be done for `all-am'.
make[3]: Nothing to be done for `all'.
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2

make

checking for __gmpz_init in -lgmp... no
configure: error: libgmp not found or uses a different ABI (including static vs shared).
Please read the INSTALL file -- see "In case of problem".
make[2]: *** [configure-stage1-mpfr] Error 1
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2

Below is a list of things I've tried when compiling GCC (I'm new to compiling GCC so any help would be appreciated!)

  • running 'make' with 'sudo'

Any help on resolving the errors would be greatly appreciated, thanks!

0 Answers
Related