<div dir="ltr">So, if I upgrade to macOS Sonoma, and I have to follow the migration process for upgrading macOS and macports, would the process detailed by the OP work but instead of renaming /opt/local and /Applications/Macports I should install ld64, then edit /opt/local/bin/ld to add -ld_classic option before installing gcc12 and reinstalling all my other ports?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 27, 2023 at 8:09 AM Christopher Jones <<a href="mailto:jonesc@hep.phy.cam.ac.uk">jonesc@hep.phy.cam.ac.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>Hi,</div><div><br></div><div>Thanks. We will need to see how widespread problems are due to this, but we might need to. at least temporarily, set this as the default in some central place if it ends up affecting a lot of ports. </div><div><br></div><div>Just to note, a potentially more convenient way to force the legacy linker is via the environment variable</div><div><br></div><div>OTHER_LDFLAGS=-Wl,-ld_classic</div><div><br></div><div>as that can be set, as appropriate, and thus avoids the need to ensure build options get passed.</div><div><br></div><div><div style="display:block"><div style="display:inline-block" role="link"><a style="border-radius:10px;font-family:-apple-system,Helvetica,Arial,sans-serif;display:block;width:300px;overflow:hidden;text-decoration:none" rel="nofollow" href="https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking" dir="ltr" role="button" width="300" target="_blank"><table style="table-layout:fixed;border-collapse:collapse;width:300px;background-color:rgb(229,230,233);font-family:-apple-system,Helvetica,Arial,sans-serif" cellpadding="0" cellspacing="0" border="0" width="300"><tbody><tr><td align="center"><img style="width: 300px; height: 157px;" width="300" height="157" alt="developer-og.jpg" src="cid:C27ED4BA-8C14-41A8-8E15-A4B73A27DAA3"></td></tr><tr><td><table bgcolor="#E5E6E9" cellpadding="0" cellspacing="0" width="300" style="font-family:-apple-system,Helvetica,Arial,sans-serif;table-layout:fixed;background-color:rgb(229,230,233)"><tbody><tr><td style="padding:8px 0px"><div style="max-width:100%;margin:0px 16px;overflow:hidden"><div style="font-weight:500;font-size:12px;overflow:hidden;text-overflow:ellipsis;text-align:left"><a rel="nofollow" href="https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking" style="text-decoration:none" target="_blank"><font color="#272727" style="color:rgba(0,0,0,0.847)">Xcode 15 Release Notes | Apple Developer Documentation</font></a></div><div style="font-weight:400;font-size:11px;overflow:hidden;text-overflow:ellipsis;text-align:left"><a rel="nofollow" href="https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking" style="text-decoration:none" target="_blank"><font color="#808080" style="color:rgba(0,0,0,0.498)">developer.apple.com</font></a></div></div></td></tr></tbody></table></td></tr></tbody></table></a></div></div></div><div><br></div><div>At the moment most issues see isolated to places where gcc, or binaries built with gcc are used. My guess is eventually GCC will have to adapt to support the new linker.</div><div><br></div><div>Chris</div><div><br></div><div><br></div><div><blockquote type="cite"><div>On 25 Sep 2023, at 11:10 pm, CC <<a href="mailto:copious-commotion@cobaltmailbox.com" target="_blank">copious-commotion@cobaltmailbox.com</a>> wrote:</div><br><div><div>Hi -<br><br>Instead of reverting to Xcode 14, I have had success (so far) by forcing the linker to use the "classic" version.  Xcode 15 switched the default to Apple's newer "prime" linker.<br><br>what I did --<br>- start with a clean slate (mv /opt/local /opt/local.0; mv /Applications/MacPorts /Applications/MacPorts.0)<br>- install macports from macports-base repo<br>- "port install ld64" (which should install ld64-xcode)<br>- edit /opt/local/bin/ld to add "-ld_classic" option (see below)<br><br>"libgcc12" was my test port and it worked after I did the above.  I hope this helps others while we wait for someone with more knowledge to dig deeper into issues with the new linker.<span id="m_-8019394713841400580cid:CC17863B-21E0-482A-ABA4-8332E82648D3"><ld.txt></span></div></div></blockquote></div><br></div></blockquote></div>