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?
On Wed, Sep 27, 2023 at 8:09 AM Christopher Jones <jon...@hep.phy.cam.ac.uk> wrote: > Hi, > > 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. > > Just to note, a potentially more convenient way to force the legacy linker > is via the environment variable > > OTHER_LDFLAGS=-Wl,-ld_classic > > as that can be set, as appropriate, and thus avoids the need to ensure > build options get passed. > > [image: developer-og.jpg] > > Xcode 15 Release Notes | Apple Developer Documentation > <https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking> > developer.apple.com > <https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking> > > <https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking> > > 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. > > Chris > > > On 25 Sep 2023, at 11:10 pm, CC <copious-commot...@cobaltmailbox.com> > wrote: > > Hi - > > 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. > > what I did -- > - start with a clean slate (mv /opt/local /opt/local.0; mv > /Applications/MacPorts /Applications/MacPorts.0) > - install macports from macports-base repo > - "port install ld64" (which should install ld64-xcode) > - edit /opt/local/bin/ld to add "-ld_classic" option (see below) > > "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.<ld.txt> > > >