Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#60908 closed defect (fixed)

update GCC10 to accept MACOSX_DEPLOYMENT_TARGET to be 11.0

Reported by: vdoublie Owned by: Chris Jones <jonesc@…>
Priority: Normal Milestone:
Component: ports Version: 2.6.99
Keywords: Cc: Schamschula (Marius Schamschula)
Port: gcc10

Description

gcc10 fails to build because it is confused by deployment target to be 11.0 hence the configuration is incorrect it fails to find specific library locations.

xgcc: warning: couldn't understand version 11.0

ld: library not found for -lgcc_s.10.4

in the config: because it cannot deal with 11.0 version it falls back to lowest possible OS version 10.4

Attachments (5)

libgcc10_main.log.tgz (1.8 MB) - added by vdoublie 4 years ago.
tgz file of the main log file for the build of libgcc10
libgcc10-main.log.tgz (1.8 MB) - added by vdoublie 4 years ago.
after fix in darwin-c.c and Darwin-driver.c
configures_support_macOS-11.0.diff (10.1 KB) - added by vdoublie 4 years ago.
patches configure files missing cases for macOS 11,0
darwin-c.c.11.0.diff (787 bytes) - added by vdoublie 4 years ago.
darwin-driver.c.11.0.diff (695 bytes) - added by vdoublie 4 years ago.

Change History (21)

Changed 4 years ago by vdoublie

Attachment: libgcc10_main.log.tgz added

tgz file of the main log file for the build of libgcc10

comment:1 Changed 4 years ago by kencu (Ken)

yup. hard coded to assume major version is 10 here <https://github.com/gcc-mirror/gcc/blob/7355a9408b990cdd20db91e2e1ba0b03e801d6a6/gcc/config/darwin-c.c#L695> with fallback to oldest system. maybe there are other places this is done as well.

this is totally an upstream issue, it would seem. I did not notice the gcc bug report about it yet.

Last edited 4 years ago by kencu (Ken) (previous) (diff)

comment:2 Changed 4 years ago by vdoublie

it shows up once user upgrades to 11.0b3 and xc. 12b3 b2's remain 10.16 and all is good

comment:3 Changed 4 years ago by kencu (Ken)

taking a quick look, if you just removed that sanity test it might just work:

if (version_array[MAJOR] != 10)
    goto fail;

Edit: no, that would not be enough. The function needs to be rewritten with major versions other than 10 to be covered.

Last edited 4 years ago by kencu (Ken) (previous) (diff)

comment:4 Changed 4 years ago by mf2k (Frank Schima)

Keywords: macOSX build target removed
Type: updatedefect

comment:5 Changed 4 years ago by vdoublie

The issues are deep than expected. a quick fix in Darwin-c.c and Darwin-driver.c to accept 11.0 help through this. leads to deep issue : see log undefined functions in libcc1plugin.o

Changed 4 years ago by vdoublie

Attachment: libgcc10-main.log.tgz added

after fix in darwin-c.c and Darwin-driver.c

comment:6 Changed 4 years ago by kencu (Ken)

Your best bet here is to find &/or open a gcc bug report to track this, and work on it there. There will be many other people interested, but they won't find this ticket here to work on it with you. Homebrew, Fink, casual users, and MacPorters are all involved.

comment:7 Changed 4 years ago by vdoublie

will do asap

comment:8 Changed 4 years ago by vdoublie

issue is not just gcc10. Many configure files do not contain cases for macOS 11.0* and Xcode 12.0*

patches as attached

Last edited 4 years ago by vdoublie (previous) (diff)

Changed 4 years ago by vdoublie

patches configure files missing cases for macOS 11,0

Changed 4 years ago by vdoublie

Attachment: darwin-c.c.11.0.diff added

Changed 4 years ago by vdoublie

Attachment: darwin-driver.c.11.0.diff added

comment:9 Changed 4 years ago by vdoublie

I wil send the patches to gcc10 dev people

comment:10 Changed 3 years ago by bigmoe

I have reproduced this issue on the public release version of macOS 11.0.1.

Are gcc10 devs aware of this? I couldn't find any reports on their bug tracker.

comment:11 Changed 3 years ago by kencu (Ken)

They are. This has been fixed in a repo run by the Darwin lead for gcc. It is not ready yet for public consumption, but if you're adventuresome, here it is, along with a nascent ARM64 port of gcc:

<https://github.com/iains/gcc-darwin-arm64>

comment:12 Changed 3 years ago by kencu (Ken)

BTW, if you think we should make a new gcc port use that fork for now, or move gcc-devel to use it -- we're ahead of you :>

It just plain doesn't work yet, but there are people working on it.

comment:13 Changed 3 years ago by Schamschula (Marius Schamschula)

Cc: Schamschula added

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

The repo above is not required to fix things for macOS 11 running on Intel. The patches above work fine on this arch so I think I will commit these to at least get gcc10 working on Intel.

Fixing things for Apple Silicon is an entirely different issue, tbh.

comment:15 Changed 3 years ago by Chris Jones <jonesc@…>

Owner: set to Chris Jones <jonesc@…>
Resolution: fixed
Status: newclosed

In 53ad57cd08c5971b5a92df34d84e62589bc006b4/macports-ports (master):

(lib)gcc10: Add patches to support building against 11.0 SDK
Closes: #60908

comment:16 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Has duplicates #61399, #61456.

Note: See TracTickets for help on using tickets.