problem compiling gcc11 on macOS High Sierra

Andreas Zezas <[email protected]>
Newsgroups gmane.os.apple.fink.general
Message-ID <[email protected]>
   Hello, 

      I am trying to update my fink packages but I have trouble installing gcc. 

      I have also tried installing earlier versions of gcc  (like gcc7)   and I get the same result. 
      I did run fink selfupdate  and it is happy. 

      Is there anything I can do to solve the problem ?

     I append the output from the last steps before it fails.
      I am running MacOS v 10.13.6  with the Xcode command-line tools installed  but not the full Xcode. 

       Thank you, 

        Andreas


g++ -std=c++11  -fno-PIE -c  -DIN_GCC_FRONTEND -g -O2 -DIN_GCC     -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -I. -I../../gcc-11.3.0/gcc -I../../gcc-11.3.0/gcc/. -I../../gcc-11.3.0/gcc/../include -I../../gcc-11.3.0/gcc/../libcpp/include -I../../gcc-11.3.0/gcc/../libcody -I/sw/include -I/sw/include  -I../../gcc-11.3.0/gcc/../libdecnumber -I../../gcc-11.3.0/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-11.3.0/gcc/../libbacktrace -I/sw/include -I/sw/include -o cc1-checksum.o -MT cc1-checksum.o -MMD -MP -MF ./.deps/cc1-checksum.TPo cc1-checksum.c
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
warning: unknown warning option '-Werror=format-diag' [-Wunknown-warning-option]
1 warning generated.
g++ -std=c++11 -no-pie   -g -O2 -DIN_GCC     -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H  -o cc1 c/c-lang.o c-family/stub-objc.o attribs.o c/c-errors.o c/c-decl.o c/c-typeck.o c/c-convert.o c/c-aux-info.o c/c-objc-common.o c/c-parser.o c/c-fold.o c/gimple-parser.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-indentation.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o c-family/c-ubsan.o c-family/known-headers.o c-family/c-attribs.o c-family/c-warn.o c-family/c-spellcheck.o i386-c.o darwin-c.o \
  cc1-checksum.o libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a -lintl -L/sw/lib -liconv  ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a  -L/sw/lib -lisl -L/sw/lib -L/sw/lib -lmpc -lmpfr -lgmp   -lz 
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
ld: warning: could not create compact unwind for __Z18ix86_target_stringxxiiPKcS0_11fpmath_unit19prefer_vector_widthbb.cold: stack size is large but stack subq instruction not found
ld: warning: could not create compact unwind for __Z32ix86_valid_target_attribute_treeP9tree_nodeS0_P11gcc_optionsS2_b: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for __ZNK9vec_usage4dumpEP12mem_locationR9mem_usage: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for __ZL23verify_speculative_callP11cgraph_nodeP6gimplejP11cgraph_edge.cold: stack size is large but stack subq instruction not found
ld: warning: could not create compact unwind for __ZL28determine_group_iv_cost_condP11ivopts_dataP8iv_groupP7iv_cand: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for __ZL28determine_group_iv_cost_condP11ivopts_dataP8iv_groupP7iv_cand.cold: stack size is large but stack subq instruction not found
ld: warning: could not create compact unwind for __ZL33gimple_fold_builtin_clear_paddingP20gimple_stmt_iterator.cold: stack size is large but stack subq instruction not found
ld: warning: could not create compact unwind for __ZL22estimate_local_effectsP11cgraph_node.cold: stack size is large but stack subq instruction not found
ld: warning: could not create compact unwind for __ZL27decide_whether_version_nodeP11cgraph_node.cold: stack size is large but stack subq instruction not found
ld: warning: could not create compact unwind for __Z12find_reloadsP8rtx_insniiiPs: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for __Z12find_reloadsP8rtx_insniiiPs.cold: stack size is large but stack subq instruction not found
ld: warning: could not create compact unwind for __ZN12pass_walloca7executeEP8function.cold: stack size is large but stack subq instruction not found
ld: warning: could not create compact unwind for __Z35ipa_merge_fn_summary_after_inliningP11cgraph_edge: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for __Z35ipa_merge_fn_summary_after_inliningP11cgraph_edge.cold: stack size is large but stack subq instruction not found
ld: warning: could not create compact unwind for __ZN16ipa_fn_summary_t9duplicateEP11cgraph_nodeS1_P14ipa_fn_summaryS3_: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for __ZN16ipa_fn_summary_t9duplicateEP11cgraph_nodeS1_P14ipa_fn_summaryS3_.cold: stack size is large but stack subq instruction not found
ld: warning: could not create compact unwind for __ZN12_GLOBAL__N_113pass_backprop7executeEP8function.cold: stack size is large but stack subq instruction not found
ld: warning: could not create compact unwind for __ZN12_GLOBAL__N_113pass_forwprop7executeEP8function: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for __ZN12_GLOBAL__N_113pass_forwprop7executeEP8function.cold: stack size is large but stack subq instruction not found
ld: warning: could not create compact unwind for __Z13powi_as_multsP20gimple_stmt_iteratorjP9tree_nodex: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for __Z21do_estimate_edge_timeP11cgraph_edgeP5sreal.cold: stack size is large but stack subq instruction not found
ld: warning: could not create compact unwind for __Z22do_estimate_edge_hintsP11cgraph_edge.cold: stack size is large but stack subq instruction not found
ld: warning: could not create compact unwind for __ZN6irange6invertEv: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for __ZN6irange6invertEv.cold: stack size is large but stack subq instruction not found
ld: warning: could not create compact unwind for __Z11inline_callP11cgraph_edgebP3vecIS0_7va_heap6vl_ptrEPibPb.cold: stack size is large but stack subq instruction not found
ld: warning: could not create compact unwind for __Z10range_castR6irangeP9tree_node.cold: stack size is large but stack subq instruction not found
ld: warning: could not create compact unwind for __ZNK14range_operator10fold_rangeER6irangeP9tree_nodeRKS0_S5_.part.0: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for __ZNK12operator_abs9op1_rangeER6irangeP9tree_nodeRKS0_S5_.part.0: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for __ZNK13operator_cast9op1_rangeER6irangeP9tree_nodeRKS0_S5_.cold: stack size is large but stack subq instruction not found
ld: warning: could not create compact unwind for __ZNK12operator_div7wi_foldER6irangeP9tree_nodeRK16generic_wide_intI16wide_int_storageES8_S8_S8_: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for __ZNK12operator_div7wi_foldER6irangeP9tree_nodeRK16generic_wide_intI16wide_int_storageES8_S8_S8_.cold: stack size is large but stack subq instruction not found
ld: warning: could not create compact unwind for __ZL19curr_insn_transformb: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for __ZL19curr_insn_transformb.cold: stack size is large but stack subq instruction not found
ld: warning: could not create compact unwind for __ZN21simplify_using_ranges9fold_condEP5gcond.cold: stack size is large but stack subq instruction not found
ld: warning: could not create compact unwind for __ZN13gimple_ranger18range_of_cond_exprER6irangeP7gassign.cold: stack size is large but stack subq instruction not found
ld: warning: could not create compact unwind for __ZN13gimple_ranger25prefill_stmt_dependenciesEP9tree_node: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for __ZN3ana17impl_run_checkersEPNS_6loggerE: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for __ZN12gori_compute15logical_combineER6irange9tree_codeRKS0_RK8tf_rangeS7_.cold: stack size is large but stack subq instruction not found
ld: warning: could not create compact unwind for __ZN12gori_compute24compute_logical_operandsER6irangeP6gimpleRKS0_P9tree_node: stack subq instruction is too different from dwarf stack size
Undefined symbols for architecture x86_64:
  "std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long)", referenced from:
      __ZNK11attr_access15array_as_stringB5cxx11EP9tree_node in attribs.o
      push_parm_decl(c_parm const*, tree_node**) in c-decl.o
  "std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace_aux(unsigned long, unsigned long, unsigned long, char)", referenced from:
      build_attr_access_from_parms(tree_node*, bool) in c-attribs.o
  "std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::resize(unsigned long, char)", referenced from:
      build_attr_access_from_parms(tree_node*, bool) in c-attribs.o
  "std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned long)", referenced from:
      push_parm_decl(c_parm const*, tree_node**) in c-decl.o
      append_access_attr(tree_node**, tree_node*, char const*, char const*, tree_node*) in c-attribs.o
  "std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_mutate(unsigned long, unsigned long, char const*, unsigned long)", referenced from:
      push_parm_decl(c_parm const*, tree_node**) in c-decl.o
      build_attr_access_from_parms(tree_node*, bool) in c-attribs.o
  "std::_Rb_tree_decrement(std::_Rb_tree_node_base*)", referenced from:
      autofdo::afdo_propagate_edge(bool, std::set<basic_block_def*, std::less<basic_block_def*>, std::allocator<basic_block_def*> >*) in libbackend.a(auto-profile.o)
      std::pair<std::_Rb_tree_iterator<gimple*>, bool> std::_Rb_tree<gimple*, gimple*, std::_Identity<gimple*>, std::less<gimple*>, std::allocator<gimple*> >::_M_insert_unique<gimple*>(gimple*&&) in libbackend.a(auto-profile.o)
      std::_Rb_tree<char const*, std::pair<char const* const, unsigned int>, std::_Select1st<std::pair<char const* const, unsigned int> >, autofdo::string_compare, std::allocator<std::pair<char const* const, unsigned int> > >::_M_get_insert_unique_pos(char const* const&) in libbackend.a(auto-profile.o)
      std::_Rb_tree<char const*, std::pair<char const* const, unsigned int>, std::_Select1st<std::pair<char const* const, unsigned int> >, autofdo::string_compare, std::allocator<std::pair<char const* const, unsigned int> > >::_M_get_insert_hint_unique_pos(std::_Rb_tree_const_iterator<std::pair<char const* const, unsigned int> >, char const* const&) in libbackend.a(auto-profile.o)
      std::_Rb_tree<unsigned int, std::pair<unsigned int const, long long>, std::_Select1st<std::pair<unsigned int const, long long> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, long long> > >::_M_get_insert_unique_pos(unsigned int const&) in libbackend.a(auto-profile.o)
      std::_Rb_tree<unsigned int, std::pair<unsigned int const, long long>, std::_Select1st<std::pair<unsigned int const, long long> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, long long> > >::_M_get_insert_hint_unique_pos(std::_Rb_tree_const_iterator<std::pair<unsigned int const, long long> >, unsigned int const&) in libbackend.a(auto-profile.o)
      (anonymous namespace)::pass_ipa_auto_profile::execute(function*) in libbackend.a(auto-profile.o)
      ...
  "std::_Rb_tree_increment(std::_Rb_tree_node_base const*)", referenced from:
      autofdo::afdo_indirect_call(gimple_stmt_iterator*, std::map<unsigned int, long long, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, long long> > > const&, bool) (.isra.0) in libbackend.a(auto-profile.o)
      autofdo::function_instance::total_annotated_count() const in libbackend.a(auto-profile.o)
      autofdo::autofdo_source_profile::~autofdo_source_profile() in libbackend.a(auto-profile.o)
      autofdo::function_instance::find_icall_target_map(gcall*, std::map<unsigned int, long long, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, long long> > >*) const in libbackend.a(auto-profile.o)
      autofdo::autofdo_source_profile::update_inlined_ind_target(gcall*, autofdo::count_info*) in libbackend.a(auto-profile.o)
  "std::_Rb_tree_increment(std::_Rb_tree_node_base*)", referenced from:
      autofdo::function_instance::~function_instance() in libbackend.a(auto-profile.o)
      std::_Rb_tree<char const*, std::pair<char const* const, unsigned int>, std::_Select1st<std::pair<char const* const, unsigned int> >, autofdo::string_compare, std::allocator<std::pair<char const* const, unsigned int> > >::_M_get_insert_hint_unique_pos(std::_Rb_tree_const_iterator<std::pair<char const* const, unsigned int> >, char const* const&) in libbackend.a(auto-profile.o)
      std::_Rb_tree<unsigned int, std::pair<unsigned int const, long long>, std::_Select1st<std::pair<unsigned int const, long long> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, long long> > >::_M_get_insert_hint_unique_pos(std::_Rb_tree_const_iterator<std::pair<unsigned int const, long long> >, unsigned int const&) in libbackend.a(auto-profile.o)
      std::_Rb_tree<unsigned int, std::pair<unsigned int const, autofdo::count_info>, std::_Select1st<std::pair<unsigned int const, autofdo::count_info> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, autofdo::count_info> > >::_M_get_insert_hint_unique_pos(std::_Rb_tree_const_iterator<std::pair<unsigned int const, autofdo::count_info> >, unsigned int const&) in libbackend.a(auto-profile.o)
      std::_Rb_tree<std::pair<unsigned int, unsigned int>, std::pair<std::pair<unsigned int, unsigned int> const, autofdo::function_instance*>, std::_Select1st<std::pair<std::pair<unsigned int, unsigned int> const, autofdo::function_instance*> >, std::less<std::pair<unsigned int, unsigned int> >, std::allocator<std::pair<std::pair<unsigned int, unsigned int> const, autofdo::function_instance*> > >::_M_get_insert_hint_unique_pos(std::_Rb_tree_const_iterator<std::pair<std::pair<unsigned int, unsigned int> const, autofdo::function_instance*> >, std::pair<unsigned int, unsigned int> const&) in libbackend.a(auto-profile.o)
      std::_Rb_tree<unsigned int, std::pair<unsigned int const, autofdo::function_instance*>, std::_Select1st<std::pair<unsigned int const, autofdo::function_instance*> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, autofdo::function_instance*> > >::_M_get_insert_hint_unique_pos(std::_Rb_tree_const_iterator<std::pair<unsigned int const, autofdo::function_instance*> >, unsigned int const&) in libbackend.a(auto-profile.o)
  "std::__throw_length_error(char const*)", referenced from:
      push_parm_decl(c_parm const*, tree_node**) in c-decl.o
      append_access_attr(tree_node**, tree_node*, char const*, char const*, tree_node*) in c-attribs.o
  "std::__throw_bad_function_call()", referenced from:
      recog_level2(rtl_ssa::insn_change&, std::function<bool (rtl_ssa::insn_change&, unsigned int)>) in libbackend.a(changes.o)
  "std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)", referenced from:
      autofdo::afdo_propagate_edge(bool, std::set<basic_block_def*, std::less<basic_block_def*>, std::allocator<basic_block_def*> >*) in libbackend.a(auto-profile.o)
      std::pair<std::_Rb_tree_iterator<gimple*>, bool> std::_Rb_tree<gimple*, gimple*, std::_Identity<gimple*>, std::less<gimple*>, std::allocator<gimple*> >::_M_insert_unique<gimple*>(gimple*&&) in libbackend.a(auto-profile.o)
      autofdo::string_table::read() (.part.0) in libbackend.a(auto-profile.o)
      std::_Rb_tree_iterator<std::pair<unsigned int const, long long> > std::_Rb_tree<unsigned int, std::pair<unsigned int const, long long>, std::_Select1st<std::pair<unsigned int const, long long> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, long long> > >::_M_emplace_hint_unique<std::piecewise_construct_t const&, std::tuple<unsigned int const&>, std::tuple<> >(std::_Rb_tree_const_iterator<std::pair<unsigned int const, long long> >, std::piecewise_construct_t const&&&, std::tuple<unsigned int const&>&&, std::tuple<>&&) (.isra.0) in libbackend.a(auto-profile.o)
      (anonymous namespace)::pass_ipa_auto_profile::execute(function*) in libbackend.a(auto-profile.o)
      std::_Rb_tree_iterator<std::pair<unsigned int const, autofdo::count_info> > std::_Rb_tree<unsigned int, std::pair<unsigned int const, autofdo::count_info>, std::_Select1st<std::pair<unsigned int const, autofdo::count_info> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, autofdo::count_info> > >::_M_emplace_hint_unique<std::piecewise_construct_t const&, std::tuple<unsigned int const&>, std::tuple<> >(std::_Rb_tree_const_iterator<std::pair<unsigned int const, autofdo::count_info> >, std::piecewise_construct_t const&&&, std::tuple<unsigned int const&>&&, std::tuple<>&&) (.isra.0) in libbackend.a(auto-profile.o)
      autofdo::function_instance::read_function_instance(auto_vec<autofdo::function_instance*, 0ul>*, long long) in libbackend.a(auto-profile.o)
      ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../../gcc-11.3.0/gcc/c/Make-lang.in:87: cc1] Error 1
make[2]: Leaving directory '/sw/src/fink.build/gcc11-11.3.0-1/darwin_objdir/gcc'
make[1]: *** [Makefile:5180: install-gcc] Error 2
make[1]: Leaving directory '/sw/src/fink.build/gcc11-11.3.0-1/darwin_objdir'
make: *** [Makefile:2487: install] Error 2
### execution of /tmp/fink.87cCh failed, exit code 2
### execution of /tmp/fink.vho42 failed, exit code 2
Removing runtime build-lock...
Removing build-lock package...
/sw/bin/dpkg-lockwait -r fink-buildlock-gcc11-11.3.0-1
(Reading database ... 290366 files and directories currently installed.)
Removing fink-buildlock-gcc11-11.3.0-1 ...
Failed: phase installing: gcc11-11.3.0-1 failed

Before reporting any errors, please run "fink selfupdate" and try again.

If you continue to have issues, please check to see if the FAQ on Fink's 
website solves the problem.  If not, ask on one (not both, please) of
these mailing lists:

	The Fink Users List <[email protected]>
	The Fink Beginners List <[email protected]>.

Please try to include the complete error message in your report.  This
generally consists of a compiler line starting with e.g. "gcc" or "g++"
followed by the actual error output from the compiler.

Also include the following system information:
Package manager version: 0.45.6
Distribution version: selfupdate-rsync Mon Jun  6 15:05:05 2022, 10.13, x86_64
Trees: local/main stable/main stable/crypto local/injected
No recognized Xcode.app installed
Xcode command-line tools: 10.1.0.0.1.1539992718
Max. Fink build jobs:  1

_______________________________________________
Fink-users mailing list
[email protected]
List archive:
https://sourceforge.net/p/fink/mailman/fink-users/
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.