tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lang/gcc1[34] fails to build on Darwin 24 + Xcode 16



Both lang/gcc13 and lang/gcc14 fail to build on Darwin 24 (MacOS 15) + Xcode 16 (see errors below).  This is a known problem that has been fixed upstream (patches from 2024-09-24 and 2024-09-27; see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116809 for the thread).  

As I understand it, the basic problem is that the legacy library libgcc_s.1 referenced private symbols in the runtime, which have now been removed by Apple and therefore do not resolve.  Those symbols never worked anyway, so there should be no legacy code using them.  The upstream solution is to drop support for libgcc_s.1 for new versions of Darwin.

I propose the attached patches for gcc13 and the more or less identical ones for gcc14.  They are taken straight from the upstream files.

Unless I hear otherwise, I plan to commit these soonish.

Thanks a lot.

Cheers,
Brook

MLIBS=`/Users/brook/Pkgsrc/pkgsrc-current/lang/gcc13/work/build/./gcc/xgcc -B/Users/brook/Pkgsrc/pkgsrc-current/lang/gcc13/work/build/./gcc/ -B/Users/brook/Pkgsrc/pkg-current/gcc13/x86_64-apple-darwin24/bin/ -B/Users/brook/Pkgsrc/pkg-current/gcc13/x86_64-apple-darwin24/lib/ -isystem /Users/brook/Pkgsrc/pkg-current/gcc13/x86_64-apple-darwin24/include -isystem /Users/brook/Pkgsrc/pkg-current/gcc13/x86_64-apple-darwin24/sys-include    --print-multi-lib | sed -e 's/;.*$//'` ; \
for mlib in $MLIBS ; do \
  cp ../${mlib}/libgcc/${mlib}/libgcc_s.dylib  \
    ./libgcc_s.1.1.dylib_T_${mlib} || exit 1 ; \
  arch=`lipo -info libgcc_s.1.1.dylib_T_${mlib} | sed -e 's/.*:\ //'` ; \
  /Users/brook/Pkgsrc/pkgsrc-current/lang/gcc13/work/build/./gcc/xgcc -B/Users/brook/Pkgsrc/pkgsrc-current/lang/gcc13/work/build/./gcc/ -B/Users/brook/Pkgsrc/pkg-current/gcc13/x86_64-apple-darwin24/bin/ -B/Users/brook/Pkgsrc/pkg-current/gcc13/x86_64-apple-darwin24/lib/ -isystem /Users/brook/Pkgsrc/pkg-current/gcc13/x86_64-apple-darwin24/include -isystem /Users/brook/Pkgsrc/pkg-current/gcc13/x86_64-apple-darwin24/sys-include    -arch ${arch} -nodefaultlibs -dynamiclib \
    -o libgcc_s.1.dylib_T_${mlib} \
    -Wl,-reexport_library,libgcc_s.1.1.dylib_T_${mlib} \
    -lSystem \
    -Wl,-reexported_symbols_list,../../../gcc-13.3.0/libgcc/config/darwin-unwind.ver \
    -install_name /Users/brook/Pkgsrc/pkg-current/gcc13/lib/libgcc_s.1.dylib \
    -compatibility_version 1 -current_version 1 ; \
done
ld: warning: search path '/Users/brook/Pkgsrc/pkg-current/gcc13//lib/.' not found
ld: warning: search path '/Users/brook/Pkgsrc/pkg-current/gcc13/lib/.' not found
Undefined symbols for architecture x86_64:
  "___deregister_frame_info", referenced from:
      <initial-undefines>
  "___deregister_frame_info_bases", referenced from:
      <initial-undefines>
  "___register_frame_info", referenced from:
      <initial-undefines>
  "___register_frame_info_bases", referenced from:
      <initial-undefines>
  "___register_frame_info_table", referenced from:
      <initial-undefines>
  "___register_frame_info_table_bases", referenced from:
      <initial-undefines>
  "___register_frame_table", referenced from:
      <initial-undefines>
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
gmake[2]: *** [../../../gcc-13.3.0/libgcc/config/t-slibgcc-darwin:139: libgcc_s.1.dylib] Error 1
gmake[2]: Leaving directory '/Users/brook/Pkgsrc/pkgsrc-current/lang/gcc13/work/build/x86_64-apple-darwin24/libgcc’


Attachment: patch-libgcc_config_i386_t-darwin
Description: Binary data

Attachment: patch-libgcc_config_rs6000_t-darwin
Description: Binary data

Attachment: patch-libgcc_config_t-darwin-libgccs1
Description: Binary data

Attachment: patch-libgcc_config_t-darwin-min-11
Description: Binary data

Attachment: patch-libgcc_config.host
Description: Binary data



Home | Main Index | Thread Index | Old Index