Re: Failed: phase compiling: gcc9-9.4.0-1 failed
Hanspeter Niederstrasser <[email protected]>
| Newsgroups | gmane.os.apple.fink.beginners |
|---|---|
| Organization | Snaggled Works |
| Message-ID | <[email protected]> |
On 8/10/21 5:27 AM, Chris Schram via Fink-beginners wrote: > On 2021-08-09, Hanspeter Niederstrasser <[email protected]> wrote: >> On 7/7/21 11:59 PM, Chris Schram via Fink-beginners wrote: >>> [while trying to build kshisen4-mac] >>> > [old log file omitted] >> >> Chris, is this still an issue? I was getting a similar error on 10.15 >> (and with gcc10), but then it started building again. >> >> Hanspeter >> >> _______________________________________________ >> Fink-beginners mailing list >> [email protected] >> List archive: >> https://sourceforge.net/p/fink/mailman/fink-users/ >> Subscription management: >> https://lists.sourceforge.net/lists/listinfo/fink-beginners >> > Yes, this the killer failure I get when trying to build kshisen4-mac. Here is a more recent log that still fails on gcc9: > > /bin/sh ../libtool --tag CXX --mode=link /opt/sw/src/fink.build/gcc9-9.4.0-1/darwin_objdir/./gcc/xgcc -shared-libgcc -B/opt/sw/src/fink.build/gcc9-9.4.0-1/darwin_objdir/./gcc -nostdinc++ -L/opt/sw/src/fink.build/gcc9-9.4.0-1/darwin_objdir/x86_64-apple-darwin20.6.0/libstdc++-v3/src -L/opt/sw/src/fink.build/gcc9-9.4.0-1/darwin_objdir/x86_64-apple-darwin20.6.0/libstdc++-v3/src/.libs -L/opt/sw/src/fink.build/gcc9-9.4.0-1/darwin_objdir/x86_64-apple-darwin20.6.0/libstdc++-v3/libsupc++/.libs -B/opt/sw/lib/gcc9/x86_64-apple-darwin20.6.0/bin/ -B/opt/sw/lib/gcc9/x86_64-apple-darwin20.6.0/lib/ -isystem /opt/sw/lib/gcc9/x86_64-apple-darwin20.6.0/include -isystem /opt/sw/lib/gcc9/x86_64-apple-darwin20.6.0/sys-include -fno-checking -std=gnu++98 -fno-common -DPIC -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=libstdc++.la -o libstdc++.la -version-info 6:28:0 -Wl,-exported_symbols_list,libstdc++-symbols.explist -lm -rpath /opt/sw/lib/gcc9/lib compatibility.lo compatibility-debug_list.lo compatibility-debug_list-2.lo compatibility-c++0x.lo compatibility-atomic-c++0x.lo compatibility-thread-c++0x.lo compatibility-chrono.lo compatibility-condvar.lo ../libsupc++/libsupc++convenience.la ../src/c++98/libc++98convenience.la ../src/c++11/libc++11convenience.la ../src/c++17/libc++17convenience.la > libtool: link: (cd .libs/libstdc++.lax/libsupc++convenience.a && ar x "/opt/sw/src/fink.build/gcc9-9.4.0-1/darwin_objdir/x86_64-apple-darwin20.6.0/libstdc++-v3/src/../libsupc++/.libs/libsupc++convenience.a") > libtool: link: (cd .libs/libstdc++.lax/libc++98convenience.a && ar x "/opt/sw/src/fink.build/gcc9-9.4.0-1/darwin_objdir/x86_64-apple-darwin20.6.0/libstdc++-v3/src/../src/c++98/.libs/libc++98convenience.a") > libtool: link: (cd .libs/libstdc++.lax/libc++11convenience.a && ar x "/opt/sw/src/fink.build/gcc9-9.4.0-1/darwin_objdir/x86_64-apple-darwin20.6.0/libstdc++-v3/src/../src/c++11/.libs/libc++11convenience.a") > libtool: link: (cd .libs/libstdc++.lax/libc++17convenience.a && ar x "/opt/sw/src/fink.build/gcc9-9.4.0-1/darwin_objdir/x86_64-apple-darwin20.6.0/libstdc++-v3/src/../src/c++17/.libs/libc++17convenience.a") > libtool: link: /opt/sw/src/fink.build/gcc9-9.4.0-1/darwin_objdir/./gcc/xgcc -shared-libgcc -B/opt/sw/src/fink.build/gcc9-9.4.0-1/darwin_objdir/./gcc -nostdinc++ -L/opt/sw/src/fink.build/gcc9-9.4.0-1/darwin_objdir/x86_64-apple-darwin20.6.0/libstdc++-v3/src -L/opt/sw/src/fink.build/gcc9-9.4.0-1/darwin_objdir/x86_64-apple-darwin20.6.0/libstdc++-v3/src/.libs -L/opt/sw/src/fink.build/gcc9-9.4.0-1/darwin_objdir/x86_64-apple-darwin20.6.0/libstdc++-v3/libsupc++/.libs -B/opt/sw/lib/gcc9/x86_64-apple-darwin20.6.0/bin/ -B/opt/sw/lib/gcc9/x86_64-apple-darwin20.6.0/lib/ -isystem /opt/sw/lib/gcc9/x86_64-apple-darwin20.6.0/include -isystem /opt/sw/lib/gcc9/x86_64-apple-darwin20.6.0/sys-include -fno-checking -dynamiclib -o .libs/libstdc++.6.dylib .libs/compatibility.o .libs/compatibility-debug_list.o .libs/compatibility-debug_list-2.o .libs/compatibility-c++0x.o .libs/compatibility-atomic-c++0x.o .libs/compatibility-thread-c++0x.o .libs/compatibility-chrono.o .libs/compatibility-condvar.o .libs/libstdc++.lax/libsupc++convenience.a/array_type_info.o .libs/libstdc++.lax/libsupc++convenience.a/atexit_arm.o .libs/libstdc++.lax/libsupc++convenience.a/atexit_thread.o .libs/libstdc++.lax/libsupc++convenience.a/bad_alloc.o .libs/libstdc++.lax/libsupc++convenience.a/bad_array_length.o .libs/libstdc++.lax/libsupc++convenience.a/bad_array_new.o .libs/libstdc++.lax/libsupc++convenience.a/bad_cast.o .libs/libstdc++.lax/libsupc++convenience.a/bad_typeid.o .libs/libstdc++.lax/libsupc++convenience.a/class_type_info.o .libs/libstdc++.lax/libsupc++convenience.a/cp-demangle.o .libs/libstdc++.lax/libsupc++convenience.a/del_op.o .libs/libstdc++.lax/libsupc++convenience.a/del_opa.o .libs/libstdc++.lax/libsupc++convenience.a/del_opant.o .libs/libstdc++.lax/libsupc++convenience.a/del_opnt.o .libs/libstdc++.lax/libsupc++convenience.a/del_ops.o .libs/libstdc++.lax/libsupc++convenience.a/del_opsa.o .libs/libstdc++.lax/libsupc++convenience.a/del_opv.o .libs/libstdc++.lax/libsupc++convenience.a/del_opva.o .libs/libstdc++.lax/libsupc++convenience.a/del_opvant.o .libs/libstdc++.lax/libsupc++convenience.a/del_opvnt.o .libs/libstdc++.lax/libsupc++convenience.a/del_opvs.o .libs/libstdc++.lax/libsupc++convenience.a/del_opvsa.o .libs/libstdc++.lax/libsupc++convenience.a/dyncast.o .libs/libstdc++.lax/libsupc++convenience.a/eh_alloc.o .libs/libstdc++.lax/libsupc++convenience.a/eh_arm.o .libs/libstdc++.lax/libsupc++convenience.a/eh_aux_runtime.o .libs/libstdc++.lax/libsupc++convenience.a/eh_call.o .libs/libstdc++.lax/libsupc++convenience.a/eh_catch.o .libs/libstdc++.lax/libsupc++convenience.a/eh_exception.o .libs/libstdc++.lax/libsupc++convenience.a/eh_globals.o .libs/libstdc++.lax/libsupc++convenience.a/eh_personality.o .libs/libstdc++.lax/libsupc++convenience.a/eh_ptr.o .libs/libstdc++.lax/libsupc++convenience.a/eh_term_handler.o .libs/libstdc++.lax/libsupc++convenience.a/eh_terminate.o .libs/libstdc++.lax/libsupc++convenience.a/eh_throw.o .libs/libstdc++.lax/libsupc++convenience.a/eh_tm.o .libs/libstdc++.lax/libsupc++convenience.a/eh_type.o .libs/libstdc++.lax/libsupc++convenience.a/eh_unex_handler.o .libs/libstdc++.lax/libsupc++convenience.a/enum_type_info.o .libs/libstdc++.lax/libsupc++convenience.a/function_type_info.o .libs/libstdc++.lax/libsupc++convenience.a/fundamental_type_info.o .libs/libstdc++.lax/libsupc++convenience.a/guard.o .libs/libstdc++.lax/libsupc++convenience.a/guard_error.o .libs/libstdc++.lax/libsupc++convenience.a/hash_bytes.o .libs/libstdc++.lax/libsupc++convenience.a/nested_exception.o .libs/libstdc++.lax/libsupc++convenience.a/new_handler.o .libs/libstdc++.lax/libsupc++convenience.a/new_op.o .libs/libstdc++.lax/libsupc++convenience.a/new_opa.o .libs/libstdc++.lax/libsupc++convenience.a/new_opant.o .libs/libstdc++.lax/libsupc++convenience.a/new_opnt.o .libs/libstdc++.lax/libsupc++convenience.a/new_opv.o .libs/libstdc++.lax/libsupc++convenience.a/new_opva.o .libs/libstdc++.lax/libsupc++convenience.a/new_opvant.o .libs/libstdc++.lax/libsupc++convenience.a/new_opvnt.o .libs/libstdc++.lax/libsupc++convenience.a/pbase_type_info.o .libs/libstdc++.lax/libsupc++convenience.a/pmem_type_info.o .libs/libstdc++.lax/libsupc++convenience.a/pointer_type_info.o .libs/libstdc++.lax/libsupc++convenience.a/pure.o .libs/libstdc++.lax/libsupc++convenience.a/si_class_type_info.o .libs/libstdc++.lax/libsupc++convenience.a/tinfo.o .libs/libstdc++.lax/libsupc++convenience.a/tinfo2.o .libs/libstdc++.lax/libsupc++convenience.a/vec.o .libs/libstdc++.lax/libsupc++convenience.a/vmi_class_type_info.o .libs/libstdc++.lax/libsupc++convenience.a/vterminate.o .libs/libstdc++.lax/libc++98convenience.a/allocator-inst.o .libs/libstdc++.lax/libc++98convenience.a/atomicity.o .libs/libstdc++.lax/libc++98convenience.a/basic_file.o .libs/libstdc++.lax/libc++98convenience.a/bitmap_allocator.o .libs/libstdc++.lax/libc++98convenience.a/c++locale.o .libs/libstdc++.lax/libc++98convenience.a/codecvt.o .libs/libstdc++.lax/libc++98convenience.a/codecvt_members.o .libs/libstdc++.lax/libc++98convenience.a/collate_members.o .libs/libstdc++.lax/libc++98convenience.a/collate_members_cow.o .libs/libstdc++.lax/libc++98convenience.a/complex_io.o .libs/libstdc++.lax/libc++98convenience.a/concept-inst.o .libs/libstdc++.lax/libc++98convenience.a/cow-istream-string.o .libs/libstdc++.lax/libc++98convenience.a/ext-inst.o .libs/libstdc++.lax/libc++98convenience.a/globals_io.o .libs/libstdc++.lax/libc++98convenience.a/hash_tr1.o .libs/libstdc++.lax/libc++98convenience.a/hashtable_tr1.o .libs/libstdc++.lax/libc++98convenience.a/ios_failure.o .libs/libstdc++.lax/libc++98convenience.a/ios_init.o .libs/libstdc++.lax/libc++98convenience.a/ios_locale.o .libs/libstdc++.lax/libc++98convenience.a/istream-string.o .libs/libstdc++.lax/libc++98convenience.a/istream.o .libs/libstdc++.lax/libc++98convenience.a/list-aux-2.o .libs/libstdc++.lax/libc++98convenience.a/list-aux.o .libs/libstdc++.lax/libc++98convenience.a/list.o .libs/libstdc++.lax/libc++98convenience.a/list_associated-2.o .libs/libstdc++.lax/libc++98convenience.a/list_associated.o .libs/libstdc++.lax/libc++98convenience.a/locale.o .libs/libstdc++.lax/libc++98convenience.a/locale_facets.o .libs/libstdc++.lax/libc++98convenience.a/locale_init.o .libs/libstdc++.lax/libc++98convenience.a/localename.o .libs/libstdc++.lax/libc++98convenience.a/math_stubs_float.o .libs/libstdc++.lax/libc++98convenience.a/math_stubs_long_double.o .libs/libstdc++.lax/libc++98convenience.a/messages_members.o .libs/libstdc++.lax/libc++98convenience.a/messages_members_cow.o .libs/libstdc++.lax/libc++98convenience.a/misc-inst.o .libs/libstdc++.lax/libc++98convenience.a/monetary_members.o .libs/libstdc++.lax/libc++98convenience.a/monetary_members_cow.o .libs/libstdc++.lax/libc++98convenience.a/mt_allocator.o .libs/libstdc++.lax/libc++98convenience.a/numeric_members.o .libs/libstdc++.lax/libc++98convenience.a/numeric_members_cow.o .libs/libstdc++.lax/libc++98convenience.a/parallel_settings.o .libs/libstdc++.lax/libc++98convenience.a/pool_allocator.o .libs/libstdc++.lax/libc++98convenience.a/stdexcept.o .libs/libstdc++.lax/libc++98convenience.a/streambuf.o .libs/libstdc++.lax/libc++98convenience.a/strstream.o .libs/libstdc++.lax/libc++98convenience.a/time_members.o .libs/libstdc++.lax/libc++98convenience.a/tree.o .libs/libstdc++.lax/libc++98convenience.a/valarray.o .libs/libstdc++.lax/libc++11convenience.a/chrono.o .libs/libstdc++.lax/libc++11convenience.a/codecvt.o .libs/libstdc++.lax/libc++11convenience.a/condition_variable.o .libs/libstdc++.lax/libc++11convenience.a/cow-fstream-inst.o .libs/libstdc++.lax/libc++11convenience.a/cow-locale_init.o .libs/libstdc++.lax/libc++11convenience.a/cow-shim_facets.o .libs/libstdc++.lax/libc++11convenience.a/cow-sstream-inst.o .libs/libstdc++.lax/libc++11convenience.a/cow-stdexcept.o .libs/libstdc++.lax/libc++11convenience.a/cow-string-inst.o .libs/libstdc++.lax/libc++11convenience.a/cow-string-io-inst.o .libs/libstdc++.lax/libc++11convenience.a/cow-wstring-inst.o .libs/libstdc++.lax/libc++11convenience.a/cow-wstring-io-inst.o .libs/libstdc++.lax/libc++11convenience.a/ctype.o .libs/libstdc++.lax/libc++11convenience.a/ctype_configure_char.o .libs/libstdc++.lax/libc++11convenience.a/ctype_members.o .libs/libstdc++.lax/libc++11convenience.a/cxx11-hash_tr1.o .libs/libstdc++.lax/libc++11convenience.a/cxx11-ios_failure.o .libs/libstdc++.lax/libc++11convenience.a/cxx11-locale-inst.o .libs/libstdc++.lax/libc++11convenience.a/cxx11-shim_facets.o .libs/libstdc++.lax/libc++11convenience.a/cxx11-stdexcept.o .libs/libstdc++.lax/libc++11convenience.a/cxx11-wlocale-inst.o .libs/libstdc++.lax/libc++11convenience.a/debug.o .libs/libstdc++.lax/libc++11convenience.a/ext11-inst.o .libs/libstdc++.lax/libc++11convenience.a/fstream-inst.o .libs/libstdc++.lax/libc++11convenience.a/functexcept.o .libs/libstdc++.lax/libc++11convenience.a/functional.o .libs/libstdc++.lax/libc++11convenience.a/futex.o .libs/libstdc++.lax/libc++11convenience.a/future.o .libs/libstdc++.lax/libc++11convenience.a/hash_c++0x.o .libs/libstdc++.lax/libc++11convenience.a/hashtable_c++0x.o .libs/libstdc++.lax/libc++11convenience.a/ios-inst.o .libs/libstdc++.lax/libc++11convenience.a/ios.o .libs/libstdc++.lax/libc++11convenience.a/iostream-inst.o .libs/libstdc++.lax/libc++11convenience.a/istream-inst.o .libs/libstdc++.lax/libc++11convenience.a/limits.o .libs/libstdc++.lax/libc++11convenience.a/locale-inst.o .libs/libstdc++.lax/libc++11convenience.a/mutex.o .libs/libstdc++.lax/libc++11convenience.a/ostream-inst.o .libs/libstdc++.lax/libc++11convenience.a/placeholders.o .libs/libstdc++.lax/libc++11convenience.a/random.o .libs/libstdc++.lax/libc++11convenience.a/regex.o .libs/libstdc++.lax/libc++11convenience.a/shared_ptr.o .libs/libstdc++.lax/libc++11convenience.a/snprintf_lite.o .libs/libstdc++.lax/libc++11convenience.a/sso_string.o .libs/libstdc++.lax/libc++11convenience.a/sstream-inst.o .libs/libstdc++.lax/libc++11convenience.a/streambuf-inst.o .libs/libstdc++.lax/libc++11convenience.a/string-inst.o .libs/libstdc++.lax/libc++11convenience.a/string-io-inst.o .libs/libstdc++.lax/libc++11convenience.a/system_error.o .libs/libstdc++.lax/libc++11convenience.a/thread.o .libs/libstdc++.lax/libc++11convenience.a/wlocale-inst.o .libs/libstdc++.lax/libc++11convenience.a/wstring-inst.o .libs/libstdc++.lax/libc++11convenience.a/wstring-io-inst.o .libs/libstdc++.lax/libc++17convenience.a/cow-fs_dir.o .libs/libstdc++.lax/libc++17convenience.a/cow-fs_ops.o .libs/libstdc++.lax/libc++17convenience.a/cow-fs_path.o .libs/libstdc++.lax/libc++17convenience.a/cow-string-inst.o .libs/libstdc++.lax/libc++17convenience.a/fs_dir.o .libs/libstdc++.lax/libc++17convenience.a/fs_ops.o .libs/libstdc++.lax/libc++17convenience.a/fs_path.o .libs/libstdc++.lax/libc++17convenience.a/memory_resource.o .libs/libstdc++.lax/libc++17convenience.a/ostream-inst.o .libs/libstdc++.lax/libc++17convenience.a/string-inst.o -L/opt/sw/src/fink.build/gcc9-9.4.0-1/darwin_objdir/x86_64-apple-darwin20.6.0/libstdc++-v3/libsupc++/.libs -L/opt/sw/src/fink.build/gcc9-9.4.0-1/darwin_objdir/x86_64-apple-darwin20.6.0/libstdc++-v3/src -L/opt/sw/src/fink.build/gcc9-9.4.0-1/darwin_objdir/x86_64-apple-darwin20.6.0/libstdc++-v3/src/.libs -lm -Wl,-exported_symbols_list -Wl,libstdc++-symbols.explist -install_name /opt/sw/lib/gcc9/lib/libstdc++.6.dylib -compatibility_version 7 -current_version 7.28 -Wl,-single_module > 0 0x10e5a51cc __assert_rtn + 123 > 1 0x10e5a5879 mach_o::relocatable::CUSection<x86_64>::personalityName(mach_o::relocatable::Parser<x86_64>&, macho_relocation_info<Pointer64<LittleEndian> > const*) (.cold.2) + 0 > 2 0x10e46471f mach_o::relocatable::CUSection<x86_64>::personalityName(mach_o::relocatable::Parser<x86_64>&, macho_relocation_info<Pointer64<LittleEndian> > const*) + 145 > 3 0x10e478e22 mach_o::relocatable::CUSection<x86_64>::parse(mach_o::relocatable::Parser<x86_64>&, unsigned int, mach_o::relocatable::CUSection<x86_64>::Info*) + 356 > 4 0x10e4763b2 mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 778 > 5 0x10e46c19b mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 241 > 6 0x10e4c3fe6 ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 1196 > 0 0x10e5a51cc __assert_rtn + 123 > 7 0x10e4c69c6 ld::tool::InputFiles::parseWorkerThread() + 308 > 1 0x10e5a5879 mach_o::relocatable::CUSection<x86_64>::personalityName(mach_o::relocatable::Parser<x86_64>&, macho_relocation_info<Pointer64<LittleEndian> > const*) (.cold.2) + 0 > 8 0x7fff2034f8fc _pthread_start + 224 > 2 0x10e46471f mach_o::relocatable::CUSection<x86_64>::personalityName(mach_o::relocatable::Parser<x86_64>&, macho_relocation_info<Pointer64<LittleEndian> > const*) + 145 > A linker snapshot was created at: > /tmp/libstdc++.6.dylib-2021-07-10-011410.ld-snapshot > ld: Assertion failed: ((parser.sectionForAddress(personalityAddr)->type() == ld::Section::typeCode) && "personality column in __compact_unwind section is not pointer to function"), function personalityName, file /Library/Caches/com.apple.xbs/Sources/ld64/ld64-650.9/src/ld/parsers/macho_relocatable_file.cpp, line 5395. > collect2: error: ld returned 1 exit status > make[6]: *** [libstdc++.la] Error 1 > make[5]: *** [all-recursive] Error 1 > make[4]: *** [all-recursive] Error 1 > make[3]: *** [all] Error 2 > make[2]: *** [all-stage1-target-libstdc++-v3] Error 2 > make[1]: *** [stage1-bubble] Error 2 > make: *** [bootstrap] Error 2 > ### execution of /tmp/fink.0JLmG failed, exit code 2 > ### execution of /tmp/fink.IvNLt failed, exit code 2 > Removing runtime build-lock... > Removing build-lock package... > /opt/sw/bin/dpkg-lockwait -r fink-buildlock-gcc9-9.4.0-1 > (Reading database ... 251542 files and directories currently installed.) > Removing fink-buildlock-gcc9-9.4.0-1 (2021.08.10-00.43.10) ... > Failed: phase compiling: gcc9-9.4.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.99.git > Distribution version: selfupdate-git Tue Aug 10 00:41:56 2021, 11.3, x86_64 > Trees: local/main stable/main > Xcode.app: 12.5.1 > Xcode command-line tools: 12.5.1.0.1.1623191612 > Max. Fink build jobs: 1 gcc9 was failing for me on 10.15 and 11.3, but now it's working on 10.15 (with no changes) but still not on 11.3. Can you try the attached gcc11 package? Save the 4 files to /opt/sw/fink/dists/local/main/finkinfo/languages (make the dirs if needed). Hanspeter _______________________________________________ Fink-beginners mailing list [email protected] List archive: https://sourceforge.net/p/fink/mailman/fink-users/ Subscription management: https://lists.sourceforge.net/lists/listinfo/fink-beginners
gcc11.info
(text/plain, 10.8 KB)
Info2: <<
Package: gcc11
Version: 11.2.0
Revision: 1
Type: gccver (11)
Source: mirror:gnu:gcc/gcc-%v/gcc-%v.tar.xz
Source-Checksum: SHA256(d08edc536b54c372a1010ff6619dd274c0f1603aa49212ba20f7aa2cda36fa8b)
PatchFile: %n.patch
PatchFile-MD5: bf4bd5d40bff74246c2b445f62d4597f
PatchFile2: %n-apfs.patch
PatchFile2-MD5: 51a56a6c93485084669ebad4a196858a
PatchFile3: %n-build-sysroot.patch
PatchFile3-MD5: 0b24ab7a98bbc57bff2e0429e71b9102
PatchScript: <<
#!/bin/sh -ev
patch -p1 < %{PatchFile}
patch -p1 < %{PatchFile2}
patch -p1 < %{PatchFile3}
# don't update live infodoc dir
find . -name Makefile.in | xargs perl -pi -e 's/install-info --version/false/g'
<<
NoSetCPPFLAGS: True
NoSetLDFLAGS: True
UseMaxBuildJobs: True
Conflicts: <<
gcc46,
gcc47,
gcc48,
gcc49,
gcc5,
gcc6,
gcc7,
gcc8,
gcc9,
gcc10,
gcc11,
gcc12
<<
Replaces: <<
gcc46,
gcc47,
gcc48,
gcc49,
gcc5,
gcc6,
gcc7,
gcc8,
gcc9,
gcc10,
gcc11,
gcc12
<<
Depends: <<
%N-compiler (= %v-%r)
<<
BuildDepends: <<
fink (>= 0.32),
fink-package-precedence,
gettext-tools,
gmp5 (>= 6.0.0a-3),
isl22,
libgettext8-dev,
libiconv-dev,
libmpc3 (>= 1.0.3-1),
libmpfr6,
x11-dev
<<
ConfigureParams: <<
--prefix=%p/lib/gcc%type_num[gccver] \
--mandir=%p/share/man \
--infodir=%p/lib/gcc%type_num[gccver]/info \
--enable-languages=c,c++,fortran,lto,objc,obj-c++ \
--with-gmp=%p \
--with-libiconv-prefix=%p \
--with-isl=%p \
--with-mpc=%p \
--with-system-zlib \
--program-suffix=-fsf-%type_num[gccver] \
--disable-multilib \
--enable-stage1-checking \
${USE_SYSROOT} \
--with-pkgversion="Fink %n %v-%r" \
--with-bugurl="https://github.com/fink/fink-distributions/issues"
<<
InfoTest: <<
TestDepends: <<
autogen,
dejagnu,
xcode (<< 4.7) | apple-gdb
<<
TestScript: <<
#!/bin/bash -ev
if [ $UID = 0 ]; then
if [ -e /usr/bin/csrutil && `csrutil status | grep -c disabled` ]; then
cd ../darwin_objdir; make -k check RUNTESTFLAGS="--target_board=unix'{-m64}'" || :
else
echo "The gcc testsuite must be run with SIP disabled or package installed."
exit 0
fi
else
echo "The gcc testsuite must be run as root due to its use of gdb."
exit 0
fi
<<
<<
InfoDocs: gcc.info gfortran.info cpp.info gccinstall.info libgomp.info cppinternals.info gccint.info
CompileScript: <<
#!/bin/bash -ev
set +x
if [ -e /usr/local/lib/libgmp.a ] || [ -e /usr/local/lib/libgmp.dylib ]; then
echo "-----WARNING-----WARNING-----WARNING-----"
echo "You seem to have GMP installed in /usr/local."
echo "This is known to cause %N to fail to build."
echo "Please move aside /usr/local and try again."
echo "-----WARNING-----WARNING-----WARNING-----"
exit 1
else
echo "Good, /usr/local/lib/libgmp* not present."
fi
set -x
ulimit -s `ulimit -s`
mkdir ../darwin_objdir
cd ../darwin_objdir
# build doesn't play well with GNU-make
# unsupported option '-static-libgcc'
export MAKE=/usr/bin/make
# Only need sysroot on 10.14+ because /usr/include has been removed
OSX_MAJOR_VERSION=`sw_vers -productVersion | cut -d. -f1-2`
if dpkg --compare-versions "$OSX_MAJOR_VERSION" ge "10.14"; then
# Get the unversioned SDK path
SDK_PATH=`dirname $(xcrun --sdk macosx --show-sdk-path)`/MacOSX.sdk
# This should really be --with-build-sysroot but that's not getting propagated through the entire build process.
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79885
export USE_SYSROOT="--with-sysroot=${SDK_PATH}"
fi
# check for incompatible clang ( 6.0 << bad-clang << 7.2)
clangvers=`clang --version | cut -d\ -f4`
$(`dpkg --compare-versions $clangvers '>>' 6.0`) && $(`dpkg --compare-versions $clangvers '<<' 7.2`) && clangcheck='y'
if [ "$clangcheck" = "y" ]; then
../gcc-%v/configure %c --with-build-config=bootstrap-debug
else
../gcc-%v/configure %c
fi
# Use bootstrap-lean to reduce disk usage.
# Note that this causes plugin testsuite failures
# since the plugin headers must come from prev-gcc.
# make bootstrap-lean
make bootstrap
fink-package-precedence --prohibit-bdep=%n .
<<
InstallScript: <<
#!/bin/sh -ev
darwinvers=`uname -r`
cd ../darwin_objdir
make -j 1 install DESTDIR=%d
mkdir -p %i/bin
# Add symlinks to recreate previous naming of executables in %p/bin
# as well as %p/lib/gcc%type_num[gccver]/bin and new -fsf-%type_num[gccver] naming in %p/bin.
binfiles="gcc g++ c++ cpp gcov"
for binfile in $binfiles ; do
ln -s %p/lib/gcc%type_num[gccver]/bin/$binfile-fsf-%type_num[gccver] %i/lib/gcc%type_num[gccver]/bin/$binfile-%type_num[gccver]
ln -s %p/lib/gcc%type_num[gccver]/bin/$binfile-fsf-%type_num[gccver] %i/bin/$binfile-%type_num[gccver]
ln -s %p/lib/gcc%type_num[gccver]/bin/$binfile-fsf-%type_num[gccver] %i/bin/$binfile-fsf-%type_num[gccver]
done
binfiles="gfortran"
for binfile in $binfiles ; do
ln -s %p/lib/gcc%type_num[gccver]/bin/$binfile-fsf-%type_num[gccver] %i/lib/gcc%type_num[gccver]/bin/$binfile
ln -s %p/lib/gcc%type_num[gccver]/bin/$binfile-fsf-%type_num[gccver] %i/bin/$binfile
ln -s %p/lib/gcc%type_num[gccver]/bin/$binfile-fsf-%type_num[gccver] %i/bin/$binfile-fsf-%type_num[gccver]
done
# Remove unsupported executables
binfiles="gcc-ar gcc-nm gcc-ranlib"
for binfile in $binfiles ; do
rm -f %i/lib/gcc%type_num[gccver]/bin/$binfile-fsf-%type_num[gccver] %i/lib/gcc%type_num[gccver]/bin/%m-apple-darwin`uname -r`-$binfile-fsf-%type_num[gccver]
done
# Add symlinks for manpages under old names.
man1files="cpp g++ gcc gcov"
for man1file in $man1files ; do
ln -s $man1file-fsf-%type_num[gccver].1 %i/share/man/man1/$man1file-%type_num[gccver].1
done
man1files="gfortran"
for man1file in $man1files ; do
ln -s $man1file-fsf-%type_num[gccver].1 %i/share/man/man1/$man1file.1
done
# Rename manpages with -fsf-%type_num[gccver] suffix and create symlinks to old names.
man7files="fsf-funding gfdl gpl"
for man7file in $man7files ; do
mv %i/share/man/man7/$man7file.7 %i/share/man/man7/$man7file-fsf-%type_num[gccver].7
ln -s $man7file-fsf-%type_num[gccver].7 %i/share/man/man7/$man7file.7
done
# Add dir for installed info files, and link them to %i/share/info.
# the %i/lib/gcc%type_num[gccver]/info/* files will go into the -compiler package
# and the files in %i/share/info go into the main package, this allows
# the info files for specific compiler versions to be accessed with
# e.g. `info -d /fink_install_dir/lib/gcc%type_num[gccver]/info gcc', but the "main" info files will
# be available for the install gccXX package in %p/share/info, as usual
install -d -m 755 %i/share/info
for infofile in $(find %i/lib/gcc%type_num[gccver]/info -name '*.info*'); do
infobase=$(basename $infofile)
case $infofile in
*info) /usr/bin/install-info --infodir=%i/lib/gcc%type_num[gccver]/info ${infofile} ;;
esac
ln -s %p/lib/gcc%type_num[gccver]/info/$infobase %i/share/info/$infobase
done
cp %b/gcc/config/darwin-sections.def %i/lib/gcc%type_num[gccver]/lib/gcc/%m-apple-darwin${darwinvers}/%v/plugin/include/config
# remove build path from .la files
perl -pi -e "s, \-L[^ ']*/%n-%v-%r/darwin_objdir/[^ ']*,,g" `find %i/lib/gcc%type_num[gccver]/lib -name '*.la'`
perl -pi -e "s, /[^ ']*/%n-%v-%r/darwin_objdir/[^ ']*,,g" `find %i/lib/gcc%type_num[gccver]/lib -name 'libasan.la'`
perl -pi -e "s, /[^ ']*/%n-%v-%r/darwin_objdir/[^ ']*,,g" `find %i/lib/gcc%type_num[gccver]/lib -name 'libubsan.la'`
<<
SplitOff: <<
Package: %N-shlibs
Replaces: <<
gcc4 (<= 20050130-4),
gfortran-shlibs
<<
Provides: <<
gfortran-shlibs
<<
Description: Shared libraries for %N
DocFiles: gcc/COPYING gcc/COPYING.LIB
Files: <<
lib/gcc%type_num[gccver]/lib/libgfortran.5*.dylib
lib/gcc%type_num[gccver]/lib/libstdc++.6*.dylib
lib/gcc%type_num[gccver]/lib/libgcc_s.1*.dylib
lib/gcc%type_num[gccver]/lib/libgcc_ext.1*.dylib
lib/gcc%type_num[gccver]/lib/libitm.1*.dylib
lib/gcc%type_num[gccver]/lib/libssp.0*.dylib
lib/gcc%type_num[gccver]/lib/libobjc-gnu.4*.dylib
lib/gcc%type_num[gccver]/lib/libgomp.1*.dylib
lib/gcc%type_num[gccver]/lib/libquadmath.0*.dylib
lib/gcc%type_num[gccver]/lib/libatomic.1*.dylib
lib/gcc%type_num[gccver]/lib/libasan.6*.dylib
lib/gcc%type_num[gccver]/lib/libubsan.1*.dylib
<<
Shlibs: <<
%p/lib/gcc%type_num[gccver]/lib/libgfortran.5.dylib 6.0.0 %n (>= 10.1.0-1)
%p/lib/gcc%type_num[gccver]/lib/libstdc++.6.dylib 7.0.0 %n (>= 10.1.0-1)
%p/lib/gcc%type_num[gccver]/lib/libgcc_s.1.dylib 1.0.0 %n (>= 10.1.0-1)
%p/lib/gcc%type_num[gccver]/lib/libitm.1.dylib 2.0.0 %n (>= 10.1.0-1)
%p/lib/gcc%type_num[gccver]/lib/libssp.0.dylib 1.0.0 %n (>= 10.1.0-1)
%p/lib/gcc%type_num[gccver]/lib/libobjc-gnu.4.dylib 5.0.0 %n (>= 10.1.0-1)
%p/lib/gcc%type_num[gccver]/lib/libgomp.1.dylib 2.0.0 %n (>= 10.1.0-1)
%p/lib/gcc%type_num[gccver]/lib/libquadmath.0.dylib 1.0.0 %n (>= 10.1.0-1)
%p/lib/gcc%type_num[gccver]/lib/libatomic.1.dylib 4.0.0 %n (>= 10.1.0-1)
%p/lib/gcc%type_num[gccver]/lib/libasan.6.dylib 7.0.0 %n (>= 10.1.0-1)
%p/lib/gcc%type_num[gccver]/lib/libubsan.1.dylib 2.0.0 %n (>= 10.1.0-1)
<<
<<
SplitOff2: <<
Package: %N-compiler
Depends: <<
gmp5-shlibs (>= 6.0.0a-3),
isl22-shlibs,
libgettext8-shlibs,
libgmpxx5-shlibs (>= 6.0.0a-3),
libiconv,
libmpc3-shlibs (>= 1.0.3-1),
libmpfr6-shlibs,
%N-shlibs (= %v-%r)
<<
BuildDependsOnly: False
Description: Compiler Binaries for gcc%type_num[gccver]
DocFiles: gcc/COPYING gcc/COPYING.LIB
Files: <<
bin/*-fsf-%type_num[gccver]
lib/gcc%type_num[gccver]
share/man/man1/*-fsf-%type_num[gccver].1
share/man/man7/*-fsf-%type_num[gccver].7
<<
<<
License: GPL
Description: GNU Compiler Collection Version %type_num[gccver]
DescDetail: <<
GCC, the GNU Compiler Collection, includes front ends for
C, C++, Objective-C, Objective-C++, Fortran and Ada.
.
C, C++, Objective C and Fortran are included in this package.
.
The C and C++ compilers are named gcc-10 and g++-10 to avoid
conflicts with gcc and g++ installed by the Apple Developer Tools
<<
DescPackaging: <<
Build with -fsf-%type_num[gccver] suffix and place non-overlapping files into new gcc%type_num[gccver]-compiler
package which can co-exist with other gccXX-compiler packages. Overlapping files
are left in main gcc%type_num[gccver] package which still conflicts with other gccXX packages.
Add apfs patch to suppress https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797
by adding ".NOTPARALLEL: install-headers" to libstdc++-v3/include/Makefile.in.
macOS10.14 no longer supports building 32bit libraries, so must disable multilib.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87030
We use --with-sysroot to find the hidden system-headers in case /usr/include is not
populated. Ideally want --with-build-sysroot because we only need the headers to build
gcc and that should not impact the end product, but then anything using gccX will
need to add it's own -isysroot flag.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79885
<<
Homepage: http://gcc.gnu.org/
Maintainer: None <[email protected]>
<<
gcc11.patch
(text/plain, 1.2 KB)
diff -ruN gcc-11.2.0-orig/gcc/config/darwin.h gcc-11.2.0/gcc/config/darwin.h
--- gcc-11.2.0-orig/gcc/config/darwin.h 2021-07-28 01:55:07.000000000 -0500
+++ gcc-11.2.0/gcc/config/darwin.h 2021-08-07 12:05:25.000000000 -0500
@@ -1081,9 +1081,8 @@
darwin_driver_init (&decoded_options_count, &decoded_options)
#endif
-/* The Apple assembler and linker do not support constructor priorities. */
-#undef SUPPORTS_INIT_PRIORITY
-#define SUPPORTS_INIT_PRIORITY 0
+/* While the Apple assembler and linker do not support constructor priorities,
+ intra-module priority support is available through sort_cdtor_records. */
#undef STACK_CHECK_STATIC_BUILTIN
#define STACK_CHECK_STATIC_BUILTIN 1
diff -ruN gcc-11.2.0-orig/gcc/testsuite/g++.dg/special/conpr-3.C gcc-11.2.0/gcc/testsuite/g++.dg/special/conpr-3.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/special/conpr-3.C 2021-07-28 01:55:07.000000000 -0500
+++ gcc-11.2.0/gcc/testsuite/g++.dg/special/conpr-3.C 2021-08-07 12:05:25.000000000 -0500
@@ -1,5 +1,6 @@
/* { dg-do run { target init_priority } } */
/* { dg-additional-sources "conpr-3a.cc conpr-3b.cc" } */
+/* { dg-shouldfail "No inter-module priority support" { *-apple-darwin* } } */
#include <stdlib.h>
gcc11-build-sysroot.patch
(text/plain, 3.3 KB)
diff -ruN gcc-10.1.0-orig/Makefile.in gcc-10.1.0/Makefile.in --- gcc-10.1.0-orig/Makefile.in 2020-05-07 05:49:58.000000000 -0500 +++ gcc-10.1.0/Makefile.in 2020-05-09 13:27:34.000000000 -0500 @@ -234,6 +234,7 @@ @endif gcc-bootstrap $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); + POSTSTAGE1_CXX_EXPORT = \ CXX='$(CXX)'; export CXX; \ CXX_FOR_BUILD='$(CXX_FOR_BUILD)'; export CXX_FOR_BUILD; @@ -248,11 +249,13 @@ `if $(LEAN); then echo ' -isystem '; else echo ' -I'; fi`$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include \ `if $(LEAN); then echo ' -isystem '; else echo ' -I'; fi`$$s/libstdc++-v3/libsupc++ \ -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \ - -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs"; \ - export CXX; \ + -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs \ + $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS "; export CXX; \ CXX_FOR_BUILD="$$CXX"; export CXX_FOR_BUILD; @endif target-libstdc++-v3-bootstrap +POSTSTAGE1_LDFLAGS += $(SYSROOT_CFLAGS_FOR_TARGET) + # Similar, for later GCC stages. POSTSTAGE1_HOST_EXPORTS = \ $(HOST_EXPORTS) \ @@ -616,8 +619,6 @@ CFLAGS_FOR_TARGET = @CFLAGS_FOR_TARGET@ CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@ -LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) -LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates LDFLAGS_FOR_TARGET = @LDFLAGS_FOR_TARGET@ GOCFLAGS_FOR_TARGET = -O2 -g GDCFLAGS_FOR_TARGET = -O2 -g @@ -627,6 +628,12 @@ DEBUG_PREFIX_CFLAGS_FOR_TARGET = @DEBUG_PREFIX_CFLAGS_FOR_TARGET@ XGCC_FLAGS_FOR_TARGET = $(FLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET) +LDFLAGS_FOR_TARGET += $(SYSROOT_CFLAGS_FOR_TARGET) +CFLAGS_FOR_TARGET += $(SYSROOT_CFLAGS_FOR_TARGET) +CXXFLAGS_FOR_TARGET += $(SYSROOT_CFLAGS_FOR_TARGET) +CPPFLAGS_FOR_TARGET += $(SYSROOT_CFLAGS_FOR_TARGET) +LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) +LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates # ------------------------------------ # Miscellaneous targets and flag lists diff -ruN gcc-10.1.0-orig/gcc/Makefile.in gcc-10.1.0/gcc/Makefile.in --- gcc-10.1.0-orig/gcc/Makefile.in 2020-05-07 05:49:59.000000000 -0500 +++ gcc-10.1.0/gcc/Makefile.in 2020-05-09 13:27:34.000000000 -0500 @@ -3968,7 +3968,7 @@ @echo "set HOSTCXXFLAGS \"$(CXXFLAGS)\"" >> ./site.tmp # TEST_ALWAYS_FLAGS are flags that should be passed to every compilation. # They are passed first to allow individual tests to override them. - @echo "set TEST_ALWAYS_FLAGS \"$(SYSROOT_CFLAGS_FOR_TARGET)\"" >> ./site.tmp + @echo "set TEST_ALWAYS_FLAGS \"\"" >> ./site.tmp # When running the tests we set GCC_EXEC_PREFIX to the install tree so that # files that have already been installed there will be found. The -B option # overrides it, so use of GCC_EXEC_PREFIX will not result in using GCC files diff -ruN gcc-10.1.0-orig/gcc/ada/gcc-interface/Makefile.in gcc-10.1.0/gcc/ada/gcc-interface/Makefile.in --- gcc-10.1.0-orig/gcc/ada/gcc-interface/Makefile.in 2020-05-07 05:49:59.000000000 -0500 +++ gcc-10.1.0/gcc/ada/gcc-interface/Makefile.in 2020-05-09 13:27:34.000000000 -0500 @@ -376,6 +376,7 @@ "GNATLINK=$(GNATLINK)" \ "GNATBIND=$(GNATBIND)" +GCC_LINK_FLAGS += $(SYSROOT_CFLAGS_FOR_TARGET) GCC_LINK=$(CXX) $(GCC_LINK_FLAGS) $(LDFLAGS) # Build directory for the tools. Let's copy the target-dependent
gcc11-apfs.patch
(text/plain, 699 B)
diff -ruN gcc-10.1.0-orig/libstdc++-v3/include/Makefile.in gcc-10.1.0/libstdc++-v3/include/Makefile.in --- gcc-10.1.0-orig/libstdc++-v3/include/Makefile.in 2020-05-07 05:50:02.000000000 -0500 +++ gcc-10.1.0/libstdc++-v3/include/Makefile.in 2020-05-09 13:25:43.000000000 -0500 @@ -1851,6 +1851,8 @@ @GLIBCXX_HOSTED_TRUE@install-data-local: install-headers @GLIBCXX_HOSTED_FALSE@install-data-local: install-freestanding-headers +.NOTPARALLEL: install-headers + # This is a subset of the full install-headers rule. We only need <ciso646>, # <cstddef>, <cfloat>, <limits>, <climits>, <version>, <cstdint>, <cstdlib>, # <new>, <typeinfo>, <exception>, <initializer_list>, <cstdalign>, <cstdarg>,