Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#65424 closed defect (fixed)

libgcc10: build fails for Monterey ARM

Reported by: nasim147 Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: monterey Cc: mascguy (Christopher Nielsen), cjones051073 (Chris Jones)
Port: libgcc10

Description (last modified by nasim147)

Hello, I need to install gcc6 on my Mac and the system tries to install its dependencies as well:

sudo port install gcc6                  
--->  Computing dependencies for gcc6
The following dependencies will be installed: 
 libgcc10
 libgcc6
 libgcc7
 libgcc8
 libgcc9
Continue? [Y/n]: Y
--->  Fetching archive for libgcc10
--->  Attempting to fetch libgcc10-10.2.0_5.darwin_21.arm64.tbz2 from https://packages.macports.org/libgcc10
--->  Attempting to fetch libgcc10-10.2.0_5.darwin_21.arm64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/libgcc10
--->  Attempting to fetch libgcc10-10.2.0_5.darwin_21.arm64.tbz2 from https://mse.uk.packages.macports.org/libgcc10
--->  Building libgcc10
Error: Failed to build libgcc10: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc10/libgcc10/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port gcc6 failed

I also linked the Homebrew gcc to the system's gcc: ln -s gcc-11 gcc

gcc --version                           
gcc (Homebrew GCC 11.3.0_2) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

and:

sudo port -n upgrade --force libxml2

but still I get

Error: Failed to build libgcc10: command execution failed

after trying to install gcc6 that is needed for the software I am planning to install.

I heard gcc6 is not going to work on M1 Mac but I think the software needs to work with that since I get this ERROR when trying to install it:

gcc-mp-6: command not found

Is there any solution to this problem?

Thanks

Attachments (4)

main_libgcc6.log (32.5 KB) - added by nasim147 2 years ago.
main_gcc6.log (436.3 KB) - added by nasim147 2 years ago.
main_gcc47.log (1.4 KB) - added by nasim147 2 years ago.
main_gcc48.log (1.4 KB) - added by nasim147 2 years ago.

Download all attachments as: .zip

Change History (8)

Changed 2 years ago by nasim147

Attachment: main_libgcc6.log added

Changed 2 years ago by nasim147

Attachment: main_gcc6.log added

Changed 2 years ago by nasim147

Attachment: main_gcc47.log added

Changed 2 years ago by nasim147

Attachment: main_gcc48.log added

comment:1 Changed 2 years ago by nasim147

Description: modified (diff)

comment:2 Changed 2 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added
Keywords: monterey added; build libgcc gcc6 Monterey 12.4 removed
Port: libgcc10 added
Summary: Failed to build libgcc10: command execution failed on M1 Mac Monterey 12.4libgcc10: build fails for Monterey ARM
Version: 2.7.2

It looks like libgcc10 is also failing on our Monterey ARM buildbot:

checking for arm64-apple-darwin21-gcc...
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc10/libgcc10/work/build/./gcc/xgcc -B/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc10/libgcc10/work/build/./gcc/ -B/opt/local/arm64-apple-darwin21/bin/ -B/opt/local/arm64-apple-darwin21/lib/ -isystem /opt/local/arm64-apple-darwin21/include -isystem /opt/local/arm64-apple-darwin21/sys-include -fno-checking
checking whether the C compiler works... no
configure: error: in `/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc10/libgcc10/work/build/arm64-apple-darwin21/libgomp':
configure: error: C compiler cannot create executables
See `config.log' for more details
make[2]: *** [configure-stage1-target-libgomp] Error 77
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc10/libgcc10/work/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc10/libgcc10/work/build'
make: *** [bootstrap-lean] Error 2

https://build.macports.org/builders/ports-12_arm64-builder/builds/57025

Last edited 2 years ago by mascguy (Christopher Nielsen) (previous) (diff)

comment:3 Changed 2 years ago by cjones051073 (Chris Jones)

Resolution: fixed
Status: newclosed

gcc10 now build fine on apple silicon.

Note though, gcc6 will likely never be available on these platforms. Gcc10 is currently the oldest supported gcc for these cpus.

comment:4 Changed 2 years ago by cjones051073 (Chris Jones)

Cc: cjones051073 added
Note: See TracTickets for help on using tickets.