#67416 closed defect (fixed)
libgcc12 @12.3.0: build failure on Monterey
Reported by: | hululud | Owned by: | mascguy (Christopher Nielsen) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | monterey | Cc: | Schamschula (Marius Schamschula) |
Port: | gcc12 libgcc12 |
Description
Change History (18)
comment:1 Changed 18 months ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | monterey added |
---|---|
Summary: | (12.3.0) the binary package on macos monterey is not available → libgcc12 @12.3.0: build failure on Monterey |
Type: | enhancement → defect |
comment:2 Changed 18 months ago by Schamschula (Marius Schamschula)
Cc: | Schamschula added |
---|
comment:3 follow-up: 5 Changed 18 months ago by ryandesign (Ryan Carsten Schmidt)
According to this, it is a bug in Xcode 14.0, fixed in 14.1 beta 3 and later. The solutions presented there are to upgrade to Xcode 14.1 or downgrade to 13.4. We have 14.0.1 on the macOS 12 buildbot worker and I don't intend to upgrade because 14.0.1 is the last version that contains the macOS 12 SDK and we want the SDK version to match the OS version because of the problems that not doing that typically causes.
Sounds like this should be added to the port to work around the problem for anyone using Xcode 14.0 or 14.0.1:
PortGroup compiler_blacklist_versions 1.0
compiler.blacklist-append {clang >= 1400 < 1400.0.29.202}
I could downgrade Xcode to 13.4 on the buildbot if that is strongly desired.
comment:4 Changed 18 months ago by mascguy (Christopher Nielsen)
Owner: | set to mascguy |
---|---|
Status: | new → assigned |
comment:5 follow-up: 7 Changed 18 months ago by mascguy (Christopher Nielsen)
Replying to ryandesign:
We have 14.0.1 on the macOS 12 buildbot worker and I don't intend to upgrade because 14.0.1 is the last version that contains the macOS 12 SDK and we want the SDK version to match the OS version because of the problems that not doing that typically causes.
Sounds like this should be added to the port to work around the problem for anyone using Xcode 14.0 or 14.0.1:
PortGroup compiler_blacklist_versions 1.0compiler.blacklist-append {clang >= 1400 < 1400.0.29.202}
Sounds good, I'll fix this afternoon, unless someone beats me to it.
I could downgrade Xcode to 13.4 on the buildbot if that is strongly desired.
My vote would be to leave it 14.0.1. Anyone else?
comment:6 Changed 18 months ago by Christopher Nielsen <mascguy@…>
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:7 follow-up: 8 Changed 18 months ago by mascguy (Christopher Nielsen)
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Replying to mascguy:
Replying to ryandesign:
Sounds like this should be added to the port to work around the problem for anyone using Xcode 14.0 or 14.0.1:
compiler.blacklist-append {clang >= 1400 < 1400.0.29.202}Sounds good, I'll fix this afternoon, unless someone beats me to it.
Unfortunately building with macports-clang-15
doesn't cut the mustard, either:
Does anyone have any other thoughts or ideas...?
comment:8 Changed 18 months ago by mascguy (Christopher Nielsen)
Replying to mascguy:
Unfortunately building with
macports-clang-15
doesn't cut the mustard, either:Does anyone have any other thoughts or ideas...?
Ah, finally downloaded the 48MB logfile, and it's our old friend... a link crash:
0 0x100e08ffa __assert_rtn + 139 1 0x100c3c28d mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 4989 2 0x100c2cf8f mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 207 3 0x100ca39d4 ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 2036 4 0x100ca6fa0 ___ZN2ld4tool10InputFilesC2ER7Options_block_invoke + 48 5 0x7ff816f4a34a _dispatch_client_callout2 + 8 6 0x7ff816f5b8f5 _dispatch_apply_invoke + 213 7 0x7ff816f4a317 _dispatch_client_callout + 8 8 0x7ff816f59c0c _dispatch_root_queue_drain + 673 9 0x7ff816f5a25c _dispatch_worker_thread2 + 160 10 0x7ff8170fdf8a _pthread_wqthread + 256 A linker snapshot was created at: /tmp/libstdc++.6.dylib-2023-05-21-225250.ld-snapshot ld: Assertion failed: (_file->_atomsArrayCount == computedAtomCount && "more atoms allocated than expected"), function parse, file macho_relocatable_file.cpp, line 2061. collect2: error: ld returned 1 exit status
So I suppose we should do the usual thing we now have to do with other ports, and blacklist MacPorts Clang 14 and later. Sigh...
Will commit the fix momentarily.
comment:9 follow-up: 10 Changed 18 months ago by Christopher Nielsen <mascguy@…>
comment:10 Changed 18 months ago by mascguy (Christopher Nielsen)
Replying to Christopher Nielsen <mascguy@…>:
In ee97206841c18bfd6bf054b8fa2c6706b193e0e4/macports-ports (master):
Still seeing a link crash, even with MacPorts-Clang-13:
Are we sure that we don't have an unresolved issue/interaction within our toolchain, that's causing these to become more and more common...?
Otherwise, I'm out of ideas for this evening. Anyone else...
comment:11 Changed 18 months ago by kencu (Ken)
looks like a linker bug. blacklisting a clang range doesn’t affect thr linker.
comment:12 follow-up: 13 Changed 18 months ago by ryandesign (Ryan Carsten Schmidt)
If we have no new linker in MacPorts that we can tell the port to use, then I declare Xcode 14.0 and 14.0.1 unusable and will downgrade the macOS 12 buildbot workers to Xcode 13.4.
comment:13 follow-up: 16 Changed 18 months ago by mascguy (Christopher Nielsen)
Replying to ryandesign:
If we have no new linker in MacPorts that we can tell the port to use, then I declare Xcode 14.0 and 14.0.1 unusable and will downgrade the macOS 12 buildbot workers to Xcode 13.4.
Ryan, you might want to consider installing 13.4.1 specifically. Though perhaps that's what you're intending already, in which case, never mind...
comment:14 Changed 18 months ago by mascguy (Christopher Nielsen)
Update: I've tested on my macOS 12 VM, with Xcode 13.3 and 13.4.1. And libgcc12
builds successfully with both.
comment:15 Changed 18 months ago by neverpanic (Clemens Lang)
Port: | libgcc12 added |
---|
comment:16 Changed 18 months ago by ryandesign (Ryan Carsten Schmidt)
Xcode 13.4.1 and the Xcode 13.4 command line tools are now installed on the macOS 12 builders and builds of gcc12 will be happening soon. I'll also run builds of all the R modules since R depends on gcc12. That should keep things busy for awhile.
Should still fix the code in the gcc12 Portfile so that users who have Xcode 14.0 or 14.0.1 get a proper early error message such as what Ken suggested.
comment:17 Changed 18 months ago by Christopher Nielsen <mascguy@…>
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:18 Changed 18 months ago by ryandesign (Ryan Carsten Schmidt)
Thanks, and I see you've also scheduled builds of ports that depend on gcc12.
Binary packages are not available because the port does not build on Monterey due to a linker crash:
Latest build logs: