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

x64 libraries build error #34610

Closed
gbalykov opened this issue Apr 6, 2020 · 11 comments · Fixed by #34632
Closed

x64 libraries build error #34610

gbalykov opened this issue Apr 6, 2020 · 11 comments · Fixed by #34632
Labels
area-Infrastructure-libraries untriaged New issue has not been triaged by the area owner

Comments

@gbalykov
Copy link
Member

gbalykov commented Apr 6, 2020

If I try to build with subsets specified for libraries, lots of different errors show up:

./build.sh --clang9 --arch x64 --configuration Release --subsetcategory libraries --subset native-src
error MSB3245: Could not resolve this reference. Could not locate the assembly "System.Collections". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/home/z/Dev/runtime/src/libraries/Microsoft.CSharp/src/Microsoft.CSharp.csproj]

error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) [/home/z/Dev/runtime/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/Microsoft.Extensions.Caching.Abstractions.csproj]

IDistributedCache.cs(74,72): error CS0246: The type or namespace name 'CancellationToken' could not be found (are you missing a using directive or an assembly reference?) [/home/z/Dev/runtime/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/Microsoft.Extensions.Caching.Abstractions.csproj]

etc.

Build without subsets is fine:

./build.sh --clang9 --arch x64 --configuration Release --subsetcategory libraries

Seems that this is related to depprojs and #33553:

<DefaultLibrariesSubsets>depprojs-native-ref-src-pretest-packages</DefaultLibrariesSubsets>

cc @alpencolt @jkotas

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-Interop-coreclr untriaged New issue has not been triaged by the area owner labels Apr 6, 2020
@ghost
Copy link

ghost commented Apr 6, 2020

Tagging @safern, @ViktorHofer as an area owner

@ViktorHofer
Copy link
Member

Make sure that you ran -restore once. Currently deprojs only run for the full subsetCategory. We are planning to remove the depprojs so that the upfront restore isn't necessary anymore.

@safern
Copy link
Member

safern commented Apr 6, 2020

Also, the error is because you're missing to build the ref assemblies which we use to build the src. So after running -restore once you would need to build native-ref-src if you haven't built the ref subset yet.

@gbalykov
Copy link
Member Author

gbalykov commented Apr 7, 2020

Thank you, that helped. So, the current working solution is:

./build.sh --clang9 --arch x64 --configuration Release --subsetcategory libraries --restore
./build.sh --clang9 --arch x64 --configuration Release --subsetcategory libraries --subset native-ref-src --build

@ViktorHofer
Copy link
Member

ViktorHofer commented Apr 7, 2020

You could also just do ./build.sh --arch x64 --configuration Release --subsetcategory libraries. Restore and build are implicit here. Also I don't think you need the --clang9 parameter here. If you are on x64 you don't need to specify --arch as well.

@gbalykov
Copy link
Member Author

gbalykov commented Apr 7, 2020

@ViktorHofer I want to build only specific subsets, e.g. I don't need packages and native in some cases, and src in others

@ViktorHofer
Copy link
Member

Then you are good to go with this: ./build.sh --clang9 --arch x64 --configuration Release --subsetcategory libraries --subset depprojs-native-ref-src Restore and build is incremental here.

@gbalykov
Copy link
Member Author

gbalykov commented Apr 7, 2020

depprojs is not available from the command line and is not listed in the list from --subset --help

@ViktorHofer
Copy link
Member

Oh right. We plan to remove them anyway soon. I'll fix this in the meantime.

@ViktorHofer
Copy link
Member

They are available now on latest master. Closing as I believe this issue is now fixed.

@gbalykov
Copy link
Member Author

gbalykov commented Apr 7, 2020

Thank you

@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Infrastructure-libraries untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants