Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ld: warning: no platform load command found in sys-o.a assuming macOS #51562

Closed
IanButterworth opened this issue Oct 3, 2023 · 5 comments · Fixed by #51830
Closed

ld: warning: no platform load command found in sys-o.a assuming macOS #51562

IanButterworth opened this issue Oct 3, 2023 · 5 comments · Fixed by #51830
Labels
system:mac Affects only macOS

Comments

@IanButterworth
Copy link
Member

I assume this is minor given it correctly assumes macOS

Output ──────  22.320461 seconds
    LINK usr/lib/julia/sys.dylib
ld: warning: no platform load command found in '/Users/ian/Documents/GitHub/julia/usr/lib/julia/sys-o.a[2](text#0.o)', assuming: macOS
ld: warning: no platform load command found in '/Users/ian/Documents/GitHub/julia/usr/lib/julia/sys-o.a[3](text#1.o)', assuming: macOS
ld: warning: no platform load command found in '/Users/ian/Documents/GitHub/julia/usr/lib/julia/sys-o.a[4](text#2.o)', assuming: macOS
ld: warning: no platform load command found in '/Users/ian/Documents/GitHub/julia/usr/lib/julia/sys-o.a[5](metadata.o)', assuming: macOS
ld: warning: no platform load command found in '/Users/ian/Documents/GitHub/julia/usr/lib/julia/sys-o.a[6](sysimg.o)', assuming: macOS
    JULIA stdlib/Unicode.release.image

macOS Sonoma

julia> versioninfo()
Julia Version 1.11.0-DEV.593
Commit f2d1276be8 (2023-10-03 12:04 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin23.0.0)
  CPU: 10 × Apple M2 Pro
  WORD_SIZE: 64
  LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
  Threads: 1 on 6 virtual cores
@IanButterworth IanButterworth changed the title ld: warning: no platform load command found in sys-0.a assuming macOS ld: warning: no platform load command found in sys-o.a assuming macOS Oct 3, 2023
@gbaraldi
Copy link
Member

gbaraldi commented Oct 3, 2023

https://projects.blender.org/blender/blender/pulls/110243/files it seems we need to pass a linker flag

@vtjnash
Copy link
Member

vtjnash commented Oct 23, 2023

Apple is about 2 years behind with publishing their usual documentation for this sort of thing (at https://github.com/apple-oss-distributions/ld64), so we may not learn how to fix this for a while

Someone just observed (17 minutes ago) on a forum elsewhere on the internet that this means our target triple is not correct (missing the OS version)
https://discourse.llvm.org/t/expressing-the-darwin-macos-target-build-command-in-llvm-ir/74198/2?u=vtjnash

Which causes this part of LLVM not to function correctly: https://reviews.llvm.org/D29044

@vtjnash
Copy link
Member

vtjnash commented Oct 23, 2023

This is the part of the code that makes that decision, an in particular, it seems that it must not return early or reach the emitVersionMin as that call emits this warning (must be set >= 10.14). But we intentionally destroy this Target information in the aotcompile pass, since 8678b5e

https://github.com/llvm/llvm-project/blob/main/llvm/lib/MC/MCStreamer.cpp#L1351-L1427
https://github.com/llvm/llvm-project/blob/main/llvm/lib/MC/MCStreamer.cpp#L1306

@gbaraldi
Copy link
Member

Can we add the version there?

@vtjnash
Copy link
Member

vtjnash commented Oct 23, 2023

Yeah, we are explicitly using a platform there whose last released version was 10.4. I think we need the string "darwin18" (or later) to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
system:mac Affects only macOS
Projects
None yet
4 participants