-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Enable ComWrappers API for cross-platform #54838
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
Enable ComWrappers API for cross-platform #54838
Conversation
Some of the build failures are from: runtime/src/coreclr/vm/gcenv.ee.cpp Lines 358 to 360 in 685eda6
I think we can just remove the above entirely. |
Ok I'll try to remove it even if I think that FEATURE_OBJCMARSHAL should be defined only for CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_MACCATALYST OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS |
I'm trying to build also WeakReference test prj and after some changes it seems to work; but during the build process there are errors on Managed tests build (see below). Any idea? /runtime/src/tests/Loader/binding/tracing/BinderTracingTest.targets(50,5): error MSB3677: Unable to move file "/runtime/artifacts/tests/coreclr/Linux.x64.Debug/Loader/binding/tracing/BinderTracingTest.Basic/DependentAssemblies/fr-FR/AssemblyToLoad_Subdirectory.resources.dll" to "/runtime/artifacts/tests/coreclr/Linux.x64.Debug/Loader/binding/tracing/BinderTracingTest.Basic//DependentAssemblies/fr-FR/AssemblyToLoad_Subdirectory.resources.dll". Could not find file '/runtime/artifacts/tests/coreclr/Linux.x64.Debug/Loader/binding/tracing/BinderTracingTest.Basic/DependentAssemblies/fr-FR/AssemblyToLoad_Subdirectory.resources.dll'. [/runtime/src/tests/Loader/binding/tracing/BinderTracingTest.Basic.csproj] |
@elinor-fung any ideas about the BinderTracingTest build failure? @alesomas here's a few commands you can work around to managed test build failures in tests other than the ones you are planning to run: You can run You can run As part of each individual test build, the test produces a script to run the test. That script will be located right next to the produced |
I was able to repro the BinderTracingTest build failure locally - occurs for a non-clean build of the test on Linux. I should have a fix today: #55225. Meanwhile, you should be able to just build/run what you need with @jkoritzinsky's instructions. |
@jkoritzinsky using skipmanaged parameter I'm able to bulild native test. Thanks!! |
@jkoritzinsky @elinor-fung I've pushed also WeakReference test project changes; next step is to try fix checks pipelines with errors? Are you reviewing code changes? |
Instead of adding all of the COM support directly to |
Ok I'll move back the code taken from ComHelpers.h and manage it there with conditional inclusion |
The pipeline check error "CoreCLR GCC Product Build Linux x64" has the following errors in the raw log: 2021-07-16T09:01:28.3833894Z /__w/1/s/src/coreclr/interop/comwrappers.hpp:139:25: error: 'constexpr size_t ManagedObjectWrapperRefCountOffset()' was declared 'extern' and later 'static' [-fpermissive] Could we insert -fpermissive compile option in src/coreclr/interop/CMakesLists.txt to fix errors? |
We should be able to just actually fix the errors:
|
src/tests/Interop/COM/ComWrappers/GlobalInstance/GlobalInstance.TrackerSupport.cs
Show resolved
Hide resolved
You can disable the tests on mono with something like what is in
|
It doesn't seem to work |
Apparently the Mono test build job in CI builds with Meanwhile, you can add an exclusion in issues.targets under the Right below this: runtime/src/tests/issues.targets Lines 1183 to 1185 in 2e10087
You can add an exclusion for all the ComWrappers tests - something like: <ExcludeList Include="$(XunitTestBinBase)/Interop/COM/ComWrappers/**">
<Issue>Not supported on Mono</Issue>
</ExcludeList> |
I went through the test failure for While doing that, I also realised that the Turns out we still have a bunch of functionality around setting/getting COM weak reference info that is just under @jkoritzinsky / @AaronRobinsonMSFT - thoughts on treating the |
Okay, this is a quick attempt at getting the COM weak reference info enabled and the test running: elinor-fung@ac73fa9 Didn't try to make it pretty and have only run it against the ComWrappers tests on Linux, but general idea should be there - thoughts, @AaronRobinsonMSFT / @jkoritzinsky? |
After applying @elinor-fung's commits the previous errors are disapperead. Are the new errors due to infrastructure problems? |
@elinor-fung Thanks for helping out here! Sad that we missed these @alesomas I will restart the failing legs. I think these are infrastructure issues. I am going to do another pass looking at @elinor-fung's updates. Looks like we are really close! We should get the issue with the "missing features" filed so we can track that. |
Hi, I created issue #56474 to track the features, I might need some help to make sure that all the desired information is in there. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @alesomas and @b-iotti.
@jkoritzinsky and @elinor-fung, Please give this PR one more look and see if there is anything that is a big concern. I think there are some minor testing clean-up nits that we can handle later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - thanks!
No concerns from me. We can do some small clean-up/style things after this goes in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This pull requests contains changes to enable feature_comwrappers on linux, in order to be able to successfully build the clr subset of dotnet runtime. The next step is to fix the test projects in order to be able to try the product changes.
Fixes #36582