Xcode 15 issues - my temporary workaround

Carlo Tambuatco oraclmaster at gmail.com
Thu Sep 28 05:00:56 UTC 2023


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 <jonesc at 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-commotion at 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>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20230928/3789117f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: developer-og.jpg
Type: image/jpeg
Size: 39580 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20230928/3789117f/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: developer-og.jpg
Type: image/jpeg
Size: 39580 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20230928/3789117f/attachment-0001.jpg>


More information about the macports-users mailing list