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

DllImportGenerator is failing in Mono llvmfullAOT #62372

Closed
agocke opened this issue Dec 3, 2021 · 5 comments · Fixed by #62518 or #62836
Closed

DllImportGenerator is failing in Mono llvmfullAOT #62372

agocke opened this issue Dec 3, 2021 · 5 comments · Fixed by #62518 or #62836
Assignees
Labels
area-Interop-coreclr blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'

Comments

@agocke
Copy link
Member

agocke commented Dec 3, 2021

https://dev.azure.com/dnceng/public/_build/results?buildId=1496054

Build FAILED.

/__w/1/s/src/mono/msbuild/aot-compile.proj(19,9): error MSB3073: The command "/__w/1/s/artifacts/tests/coreclr/Linux.x64.Release/Tests/Core_Root/corerun /__w/1/s/artifacts/tests/coreclr/Linux.x64.Release/Tests/Core_Root/Microsoft.Interop.DllImportGenerator.dll" exited with code 1.
/__w/1/s/src/mono/msbuild/aot-compile.proj(19,9): error MSB3073: The command "/__w/1/s/artifacts/tests/coreclr/Linux.x64.Release/Tests/Core_Root/corerun /__w/1/s/artifacts/tests/coreclr/Linux.x64.Release/Tests/Core_Root/Microsoft.Interop.SourceGeneration.dll" exited with code 1.
    0 Warning(s)
    2 Error(s)
@agocke agocke added the blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' label Dec 3, 2021
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Dec 3, 2021
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@agocke agocke added area-Interop-coreclr and removed untriaged New issue has not been triaged by the area owner labels Dec 3, 2021
@agocke
Copy link
Member Author

agocke commented Dec 4, 2021

@jkoritzinsky Looks like this was somehow caused by 84b55d9

@jkoritzinsky
Copy link
Member

We're probably constructing Core_Root in some way that either overrides OutputPath or OutputItemType for ProjectReferences

@lambdageek
Copy link
Member

@jkoritzinsky we should exclude DllImportGenerator from Core_Root. For the various Mono AOT testing legs, I think we AOT every assembly in Core_Root. The Mono AOT process needs to be able to resolve every assembly reference (using the Core_Root and the individual test - the search path is constructed in src/mono/msbuild/aot-compile.proj although I don't know the details of how this gets used by the runtime tests build script). In this case DllImportGenerator is in Core_Root but the various Roslyn assemblies aren't.

I think the cleanest approach would be to ensure that the DllImportGenerator assembly doesn't end up in Core_Root - after all it's needed only at build-time not run-time. (And I assume Core_Root is not used to build the tests)

@jkoritzinsky
Copy link
Member

@lambdageek I agree with your assessment. These two assemblies should be excluded from Core_Root.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Dec 9, 2021
akoeplinger pushed a commit that referenced this issue Dec 9, 2021
These appear to be failing because Microsoft.CodeAnalysis isn't present, but that's expected
behavior for source generators/analyzers, as they are plugins.

Fixes #62372
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Dec 9, 2021
MichalStrehovsky added a commit to MichalStrehovsky/runtime that referenced this issue Dec 15, 2021
The libraries build infra normally does this automatically but the interop source generator doesn't follow the path convention.

Without this manifestation, the build considers the generator part of framework and it gets binplaced into places where it shouldn't be.

Fixes dotnet#62372.
@ghost ghost added in-pr There is an active PR which will close this issue when it is merged and removed in-pr There is an active PR which will close this issue when it is merged labels Dec 15, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jan 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Interop-coreclr blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'
Projects
None yet
3 participants