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

osx-arm64 packs subset build break #87333

Closed
am11 opened this issue Jun 9, 2023 · 2 comments · Fixed by #87360
Closed

osx-arm64 packs subset build break #87333

am11 opened this issue Jun 9, 2023 · 2 comments · Fixed by #87360

Comments

@am11
Copy link
Member

am11 commented Jun 9, 2023

% cd runtime
% ./build.sh
...
  crossgen2 -> /Users/am11/projects/runtime/artifacts/bin/coreclr/osx.arm64.Debug/crossgen2/crossgen2.dll
  Generating native code
  ld: warning: pointer not aligned at address 0x101E139E7 ('_g_compilerEmbeddedKnobsBlob' + 224 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E139DF ('_g_compilerEmbeddedKnobsBlob' + 216 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E139D7 ('_g_compilerEmbeddedKnobsBlob' + 208 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E139CF ('_g_compilerEmbeddedKnobsBlob' + 200 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E139C7 ('_g_compilerEmbeddedKnobsBlob' + 192 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E139BF ('_g_compilerEmbeddedKnobsBlob' + 184 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E139B7 ('_g_compilerEmbeddedKnobsBlob' + 176 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E139AF ('_g_compilerEmbeddedKnobsBlob' + 168 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E139A7 ('_g_compilerEmbeddedKnobsBlob' + 160 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E1399F ('_g_compilerEmbeddedKnobsBlob' + 152 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E13997 ('_g_compilerEmbeddedKnobsBlob' + 144 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E1398F ('_g_compilerEmbeddedKnobsBlob' + 136 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E13987 ('_g_compilerEmbeddedKnobsBlob' + 128 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E1397F ('_g_compilerEmbeddedKnobsBlob' + 120 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E13977 ('_g_compilerEmbeddedKnobsBlob' + 112 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E1396F ('_g_compilerEmbeddedKnobsBlob' + 104 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E13967 ('_g_compilerEmbeddedKnobsBlob' + 96 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E1395F ('_g_compilerEmbeddedKnobsBlob' + 88 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E13957 ('_g_compilerEmbeddedKnobsBlob' + 80 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E1394F ('_g_compilerEmbeddedKnobsBlob' + 72 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E13947 ('_g_compilerEmbeddedKnobsBlob' + 64 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E1393F ('_g_compilerEmbeddedKnobsBlob' + 56 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E13937 ('_g_compilerEmbeddedKnobsBlob' + 48 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E1392F ('_g_compilerEmbeddedKnobsBlob' + 40 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E13927 ('_g_compilerEmbeddedKnobsBlob' + 32 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E1391F ('_g_compilerEmbeddedKnobsBlob' + 24 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E13917 ('_g_compilerEmbeddedKnobsBlob' + 16 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E1390F ('_g_compilerEmbeddedKnobsBlob' + 8 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E13A17 ('_g_compilerEmbeddedSettingsBlob' + 16 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E13A0F ('_g_compilerEmbeddedSettingsBlob' + 8 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: unaligned pointer(s) for architecture arm64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
/Users/am11/projects/runtime/artifacts/bin/coreclr/osx.arm64.Debug/build/Microsoft.NETCore.Native.targets(361,5): error MSB3073: The command ""/usr/bin/clang" "/Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o" -o "/Users/am11/projects/runtime/artifacts/bin/coreclr/osx.arm64.Debug/crossgen2/native/crossgen2" /Users/am11/projects/runtime/artifacts/bin/coreclr/osx.arm64.Debug/aotsdk/libbootstrapper.a /Users/am11/projects/runtime/artifacts/bin/coreclr/osx.arm64.Debug/aotsdk/libRuntime.ServerGC.a /Users/am11/projects/runtime/artifacts/bin/coreclr/osx.arm64.Debug/aotsdk/libeventpipe-enabled.a /Users/am11/projects/runtime/artifacts/bin/coreclr/osx.arm64.Debug/aotsdk/libstdc++compat.a /Users/am11/projects/runtime/artifacts/bin/microsoft.netcore.app.runtime.osx-arm64/Debug/runtimes/osx-arm64/native/libSystem.Native.a /Users/am11/projects/runtime/artifacts/bin/microsoft.netcore.app.runtime.osx-arm64/Debug/runtimes/osx-arm64/native/libSystem.Globalization.Native.a /Users/am11/projects/runtime/artifacts/bin/microsoft.netcore.app.runtime.osx-arm64/Debug/runtimes/osx-arm64/native/libSystem.IO.Compression.Native.a /Users/am11/projects/runtime/artifacts/bin/microsoft.netcore.app.runtime.osx-arm64/Debug/runtimes/osx-arm64/native/libSystem.Net.Security.Native.a /Users/am11/projects/runtime/artifacts/bin/microsoft.netcore.app.runtime.osx-arm64/Debug/runtimes/osx-arm64/native/libSystem.Security.Cryptography.Native.Apple.a /Users/am11/projects/runtime/artifacts/bin/microsoft.netcore.app.runtime.osx-arm64/Debug/runtimes/osx-arm64/native/libSystem.Security.Cryptography.Native.OpenSsl.a -g -Wl,-rpath,'@executable_path' -ldl -lobjc -lswiftCore -lswiftFoundation -lz -licucore -L/usr/lib/swift -lm -framework CoreFoundation -framework CryptoKit -framework Foundation -framework Security -framework GSS" exited with code 1. [/Users/am11/projects/runtime/src/coreclr/tools/aot/crossgen2/crossgen2.csproj]
...

Regressed in f924653.

I tried changing alignment: 1 to alignment: 4 in RuntimeConfigurationRootProvider, but that didn't help. 😕

% xcodebuild -version 
Xcode 14.2
Build version 14C18
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jun 9, 2023
@ghost
Copy link

ghost commented Jun 9, 2023

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details
$ ./build.sh
...
  crossgen2 -> /Users/am11/projects/runtime/artifacts/bin/coreclr/osx.arm64.Debug/crossgen2/crossgen2.dll
  Generating native code
  ld: warning: pointer not aligned at address 0x101E139E7 ('_g_compilerEmbeddedKnobsBlob' + 224 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E139DF ('_g_compilerEmbeddedKnobsBlob' + 216 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E139D7 ('_g_compilerEmbeddedKnobsBlob' + 208 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E139CF ('_g_compilerEmbeddedKnobsBlob' + 200 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E139C7 ('_g_compilerEmbeddedKnobsBlob' + 192 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E139BF ('_g_compilerEmbeddedKnobsBlob' + 184 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E139B7 ('_g_compilerEmbeddedKnobsBlob' + 176 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E139AF ('_g_compilerEmbeddedKnobsBlob' + 168 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E139A7 ('_g_compilerEmbeddedKnobsBlob' + 160 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E1399F ('_g_compilerEmbeddedKnobsBlob' + 152 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E13997 ('_g_compilerEmbeddedKnobsBlob' + 144 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E1398F ('_g_compilerEmbeddedKnobsBlob' + 136 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E13987 ('_g_compilerEmbeddedKnobsBlob' + 128 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E1397F ('_g_compilerEmbeddedKnobsBlob' + 120 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E13977 ('_g_compilerEmbeddedKnobsBlob' + 112 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E1396F ('_g_compilerEmbeddedKnobsBlob' + 104 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E13967 ('_g_compilerEmbeddedKnobsBlob' + 96 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E1395F ('_g_compilerEmbeddedKnobsBlob' + 88 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E13957 ('_g_compilerEmbeddedKnobsBlob' + 80 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E1394F ('_g_compilerEmbeddedKnobsBlob' + 72 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E13947 ('_g_compilerEmbeddedKnobsBlob' + 64 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E1393F ('_g_compilerEmbeddedKnobsBlob' + 56 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E13937 ('_g_compilerEmbeddedKnobsBlob' + 48 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E1392F ('_g_compilerEmbeddedKnobsBlob' + 40 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E13927 ('_g_compilerEmbeddedKnobsBlob' + 32 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E1391F ('_g_compilerEmbeddedKnobsBlob' + 24 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E13917 ('_g_compilerEmbeddedKnobsBlob' + 16 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E1390F ('_g_compilerEmbeddedKnobsBlob' + 8 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E13A17 ('_g_compilerEmbeddedSettingsBlob' + 16 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: warning: pointer not aligned at address 0x101E13A0F ('_g_compilerEmbeddedSettingsBlob' + 8 from /Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o)
  ld: unaligned pointer(s) for architecture arm64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
/Users/am11/projects/runtime/artifacts/bin/coreclr/osx.arm64.Debug/build/Microsoft.NETCore.Native.targets(361,5): error MSB3073: The command ""/usr/bin/clang" "/Users/am11/projects/runtime/artifacts/obj/coreclr/crossgen2/arm64/Debug/native/crossgen2.o" -o "/Users/am11/projects/runtime/artifacts/bin/coreclr/osx.arm64.Debug/crossgen2/native/crossgen2" /Users/am11/projects/runtime/artifacts/bin/coreclr/osx.arm64.Debug/aotsdk/libbootstrapper.a /Users/am11/projects/runtime/artifacts/bin/coreclr/osx.arm64.Debug/aotsdk/libRuntime.ServerGC.a /Users/am11/projects/runtime/artifacts/bin/coreclr/osx.arm64.Debug/aotsdk/libeventpipe-enabled.a /Users/am11/projects/runtime/artifacts/bin/coreclr/osx.arm64.Debug/aotsdk/libstdc++compat.a /Users/am11/projects/runtime/artifacts/bin/microsoft.netcore.app.runtime.osx-arm64/Debug/runtimes/osx-arm64/native/libSystem.Native.a /Users/am11/projects/runtime/artifacts/bin/microsoft.netcore.app.runtime.osx-arm64/Debug/runtimes/osx-arm64/native/libSystem.Globalization.Native.a /Users/am11/projects/runtime/artifacts/bin/microsoft.netcore.app.runtime.osx-arm64/Debug/runtimes/osx-arm64/native/libSystem.IO.Compression.Native.a /Users/am11/projects/runtime/artifacts/bin/microsoft.netcore.app.runtime.osx-arm64/Debug/runtimes/osx-arm64/native/libSystem.Net.Security.Native.a /Users/am11/projects/runtime/artifacts/bin/microsoft.netcore.app.runtime.osx-arm64/Debug/runtimes/osx-arm64/native/libSystem.Security.Cryptography.Native.Apple.a /Users/am11/projects/runtime/artifacts/bin/microsoft.netcore.app.runtime.osx-arm64/Debug/runtimes/osx-arm64/native/libSystem.Security.Cryptography.Native.OpenSsl.a -g -Wl,-rpath,'@executable_path' -ldl -lobjc -lswiftCore -lswiftFoundation -lz -licucore -L/usr/lib/swift -lm -framework CoreFoundation -framework CryptoKit -framework Foundation -framework Security -framework GSS" exited with code 1. [/Users/am11/projects/runtime/src/coreclr/tools/aot/crossgen2/crossgen2.csproj]
...

Regressed in f924653.

I tried changing alignment: 1 to alignment: 4 in RuntimeConfigurationRootProvider, but that didn't help. 😕

% xcodebuild -version 
Xcode 14.2
Build version 14C18
Author: am11
Assignees: -
Labels:

arch-arm64, os-mac-os-x, area-NativeAOT-coreclr

Milestone: -

@MichalStrehovsky
Copy link
Member

I think we just need to call RequireInitialPointerAlignment when generating the blob (on my phone now and done for the week).

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jun 10, 2023
@ghost ghost removed in-pr There is an active PR which will close this issue when it is merged untriaged New issue has not been triaged by the area owner labels Jun 10, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jul 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants