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

[dotnet] Handle lib prefix for P/Invokes for runtime native libraries #11158

Merged
merged 5 commits into from
Apr 10, 2021

Conversation

filipnavara
Copy link
Contributor

Contributes to #11145

@filipnavara filipnavara changed the title [dotnet] Handle prefix for P/Invokes for runtime native libraries [dotnet] Handle lib prefix for P/Invokes for runtime native libraries Apr 7, 2021
@spouliot
Copy link
Contributor

spouliot commented Apr 8, 2021

/azp run

@spouliot spouliot added the community Community contribution ❤ label Apr 8, 2021
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

#if NET
sw.WriteLine ($"\tmono_dllmap_insert (NULL, \"libSystem.Native\", NULL, \"{mono_native_lib}\", NULL);");
sw.WriteLine ($"\tmono_dllmap_insert (NULL, \"libSystem.Security.Cryptography.Native.Apple\", NULL, \"{mono_native_lib}\", NULL);");
sw.WriteLine ($"\tmono_dllmap_insert (NULL, \"libSystem.Net.Security.Native\", NULL, \"{mono_native_lib}\", NULL);");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libSystem.IO.Compression.Native.dylib might be needed too.
It's shipped so it's likely used somewhere in the BCL (have not checked).

That can wait for the removal of the .dylib from the app bundle since it's the only way to test it properly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not needed for "Hello World" but it's needed in general. I hesitate to do more changes here since it's likely going to be replaced by PINVOKE_OVERRIDE callback anyway (unless there are some AOT implications from using dllmap).

@vs-mobiletools-engineering-service2
Copy link
Collaborator

❌ Tests failed on Build ❌

Tests failed on Build.

API diff

✅ API Diff from stable

View API diff

Test results

16 tests failed, 78 tests passed.

Failed tests

  • monotouch-test/Mac [dotnet]/Debug [dotnet]: BuildFailure
  • monotouch-test/iOS Unified 64-bits - simulator/Debug [dotnet]: BuildFailure
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (LinkSdk) [dotnet]: BuildFailure
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (static registrar) [dotnet]: BuildFailure
  • monotouch-test/iOS Unified 64-bits - simulator/Release (all optimizations) [dotnet]: BuildFailure
  • interdependent-binding-projects/iOS Unified 64-bits - simulator/Debug [dotnet]: BuildFailure
  • introspection/iOS Unified 64-bits - simulator/Debug [dotnet]: BuildFailure
  • introspection/tvOS - simulator/Debug [dotnet]: BuildFailure
  • dont link/iOS Unified 64-bits - simulator/Debug [dotnet]: BuildFailure
  • dont link/iOS Unified 64-bits - simulator/Release [dotnet]: BuildFailure
  • link all/iOS Unified 64-bits - simulator/Debug [dotnet]: BuildFailure
  • link all/iOS Unified 64-bits - simulator/Release [dotnet]: BuildFailure
  • link sdk/iOS Unified 64-bits - simulator/Debug [dotnet]: BuildFailure
  • link sdk/iOS Unified 64-bits - simulator/Release [dotnet]: BuildFailure
  • MSBuild tests/Integration: Failed (Execution failed with exit code 32)
  • DotNet tests: Failed (Execution failed with exit code 1)

Pipeline on Agent BOT-0189.Catalina

@filipnavara
Copy link
Contributor Author

filipnavara commented Apr 8, 2021

The tests fail because of dotnet/runtime#47533 and dotnet/runtime#47910. This is expected and I can add a workaround.

@mandel-macaque mandel-macaque added community Community contribution ❤ and removed community Community contribution ❤ labels Apr 8, 2021
@dalexsoto
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 Tests failed catastrophically on Build (no summary found). 🔥

Result file $(TEST_SUMMARY_PATH) not found.

Pipeline on Agent

@spouliot
Copy link
Contributor

spouliot commented Apr 9, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 Tests failed catastrophically on Build (no summary found). 🔥

Result file $(TEST_SUMMARY_PATH) not found.

Pipeline on Agent

@spouliot
Copy link
Contributor

spouliot commented Apr 9, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vs-mobiletools-engineering-service2
Copy link
Collaborator

❌ Tests failed on Build ❌

Tests failed on Build.

API diff

✅ API Diff from stable

View API diff

Test results

5 tests failed, 93 tests passed.

Failed tests

  • introspection/tvOS - simulator/Debug [dotnet]: BuildFailure
  • introspection/tvOS - simulator/Debug (tvOS 11.4) [dotnet]: BuildFailure
  • introspection/watchOS 32-bits - simulator/Debug (watchOS 5.0): LaunchFailure
  • MSBuild tests/Integration: Failed (Execution failed with exit code 4)
  • DotNet tests: Failed (Execution failed with exit code 1)

Pipeline on Agent XAMBOT-1104.BigSur

@spouliot
Copy link
Contributor

spouliot commented Apr 9, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vs-mobiletools-engineering-service2
Copy link
Collaborator

❌ Tests failed on Build ❌

Tests failed on Build.

API diff

✅ API Diff from stable

View API diff

Test results

19 tests failed, 79 tests passed.

Failed tests

  • monotouch-test/tvOS - simulator/Debug: TimedOut
  • monotouch-test/tvOS - simulator/Debug (LinkSdk): TimedOut
  • monotouch-test/tvOS - simulator/Debug (static registrar): TimedOut
  • monotouch-test/tvOS - simulator/Release (all optimizations): TimedOut
  • fsharp/tvOS - simulator/Debug: TimedOut
  • framework-test/tvOS - simulator/Debug: TimedOut
  • xcframework-test/tvOS - simulator/Debug: TimedOut
  • interdependent-binding-projects/tvOS - simulator/Debug: TimedOut
  • introspection/tvOS - simulator/Debug: TimedOut
  • introspection/tvOS - simulator/Debug [dotnet]: TimedOut
  • introspection/watchOS 32-bits - simulator/Debug (watchOS 5.0): LaunchFailure
  • dont link/tvOS - simulator/Debug: TimedOut
  • dont link/tvOS - simulator/Release: TimedOut
  • link all/tvOS - simulator/Debug: TimedOut
  • link all/tvOS - simulator/Release: TimedOut
  • link sdk/tvOS - simulator/Debug: TimedOut
  • link sdk/tvOS - simulator/Release: TimedOut
  • mono-native-compat/tvOS - simulator/Debug: TimedOut
  • mono-native-unified/tvOS - simulator/Debug: TimedOut

Pipeline on Agent XAMBOT-1110'

@mandel-macaque
Copy link
Member

Something really bad is going on in certain bots.

@filipnavara
Copy link
Contributor Author

JFYI I re-run some of the timed out tests locally and they worked.

@dalexsoto
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vs-mobiletools-engineering-service2
Copy link
Collaborator

❌ Tests failed on Build ❌

Tests failed on Build.

API diff

✅ API Diff from stable

View API diff

Test results

1 tests failed, 97 tests passed.

Failed tests

  • introspection/watchOS 32-bits - simulator/Debug (watchOS 5.0): LaunchFailure

Pipeline on Agent XAMBOT-1104.BigSur

@filipnavara
Copy link
Contributor Author

The last remaining failure (introspection/watchOS 32-bits - simulator/Debug (watchOS 5.0): LaunchFailure) happened on other PRs too (even the empty test one from few days ago) so I consider it unrelated.

@spouliot
Copy link
Contributor

Yes, that's an unrelated CI/xharness issue that we're tracking internally - https://github.com/xamarin/maccore/issues/2411

@spouliot spouliot merged commit 605bc43 into xamarin:main Apr 10, 2021
@filipnavara filipnavara deleted the libprefix branch April 10, 2021 17:04
spouliot pushed a commit to spouliot/xamarin-macios that referenced this pull request Apr 14, 2021
With xamarin#11158 we do not
load symbols from the dylibs - so we do not have to ship them.

This makes the size comparison, between legacy and dotnet, more accurate
since the dylibs were large binaries.

https://gist.github.com/spouliot/9cad974b73b982404421e634f2a3a2b7
spouliot added a commit that referenced this pull request Apr 14, 2021
With #11158 we do not
load symbols from the dylibs - so we do not have to ship them.

This makes the size comparison, between legacy and dotnet, more accurate
since the dylibs were large binaries.

https://gist.github.com/spouliot/9cad974b73b982404421e634f2a3a2b7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution ❤
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants