Bug 20297 – ld: warning: no platform load command found for macOS
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
Mac OS X
Creation time
2019-10-12T19:25:03Z
Last change time
2024-03-01T23:56:53Z
Keywords
pull
Assigned to
No Owner
Creator
Jacob Carlborg
Comments
Comment #0 by doob — 2019-10-12T19:25:03Z
With Xcode 11 (or on macOS 10.15) linking an executable with an object file built with DMD results in the following warning (one for each object file being linked):
ld: warning: building for macOS, but linking in object file (~/.dvm/compilers/dmd-2.088.0/osx/lib/libphobos2.a(format_5df_c43.o)) built for
The issue is that the linker is looking for a load command in each object file which contains the platform, platform version and SDK version. Clang outputs this load command but the DMD doesn't.
Comment #1 by dlang-bot — 2019-10-12T19:31:28Z
@jacob-carlborg created dlang/dmd pull request #10476 "Fix issue 20297: ld: warning: building for macOS" fixing this issue:
- Fix issue 20297: ld: warning: building for macOS
https://github.com/dlang/dmd/pull/10476
Comment #2 by pro.mathias.lang — 2020-09-10T07:07:00Z
Quoting from April 2nd:
> The warnings don't appear anymore. Apple must have changed something. Not sure if it's still interesting to have these load commands.
Closing as WORKSFORME.
Comment #3 by ibuclaw — 2024-02-20T17:28:36Z
*** Issue 24400 has been marked as a duplicate of this issue. ***
Comment #4 by ibuclaw — 2024-02-20T17:29:16Z
Back in Xcode 15 - see issue 24400.
Comment #5 by dlang-bot — 2024-02-22T09:34:10Z
@ibuclaw created dlang/dmd pull request #16223 "Fix Bugzilla 20297 - Link warning: no platform load command found in object.o, assuming: macOS" fixing this issue:
- Fix Bugzilla 20297 - Link warning: no platform load command found in object.o, assuming: macOS
Co-authored-by: Jacob Carlborg <[email protected]>
https://github.com/dlang/dmd/pull/16223
Comment #6 by dlang-bot — 2024-02-22T12:40:46Z
dlang/dmd pull request #16223 "Fix Bugzilla 20297 - Link warning: no platform load command found in object.o, assuming: macOS" was merged into stable:
- 18bd11759bd4133d8e7f3d7dc2be7034fc2a079c by Iain Buclaw:
Fix Bugzilla 20297 - Link warning: no platform load command found in object.o, assuming: macOS
Co-authored-by: Jacob Carlborg <[email protected]>
https://github.com/dlang/dmd/pull/16223
Comment #7 by dlang-bot — 2024-03-01T23:56:53Z
dlang/dmd pull request #16276 "merge stable" was merged into master:
- b40eb09ff80821a7e95fe989ca0063c5f84d132b by Iain Buclaw:
Fix Bugzilla 20297 - Link warning: no platform load command found in object.o, assuming: macOS
Co-authored-by: Jacob Carlborg <[email protected]>
https://github.com/dlang/dmd/pull/16276