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

"The 'libs' subset must be built before building this project" when subset has been built #36528

Closed
kg opened this issue May 15, 2020 · 3 comments · Fixed by #72560
Closed

"The 'libs' subset must be built before building this project" when subset has been built #36528

kg opened this issue May 15, 2020 · 3 comments · Fixed by #72560
Assignees
Labels
area-Infrastructure-coreclr documentation Documentation bug or enhancement, does not impact product or test code
Milestone

Comments

@kg
Copy link
Member

kg commented May 15, 2020

Description

Attempting to build+run tests on Debian on a git checkout by following documentation but the libs subset is not being picked up after building.

I've run the following successfully:

PATH=~/cmake/bin:$PATH ./build.sh -subset clr+libs -runtimeconfiguration Debug
PATH=~/cmake/bin:$PATH ./build.sh -subset clr+libs -runtimeconfiguration Release

But any time I do PATH=~/cmake/bin:$PATH ./src/coreclr/build-test.sh I get errors about the libs subset:

Starting the Managed Tests Build...
Building step 'Managed tests build (build tests)' testGroupToBuild=1 via "/home/kate/Projects/runtime/eng/common/msbuild.sh"  --warnAsError false /home/kate/Projects/runtime/src/coreclr/tests/build.proj /p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true /p:UsePartialNGENOptimization=false /maxcpucount "/flp:Verbosity=normal;LogFile=/home/kate/Projects/runtime/artifacts/log/Tests_Managed.Linux.x64.Debug.log;Append=false" "/flp1:WarningsOnly;LogFile=/home/kate/Projects/runtime/artifacts/log/Tests_Managed.Linux.x64.Debug.wrn;Append=false" "/flp2:ErrorsOnly;LogFile=/home/kate/Projects/runtime/artifacts/log/Tests_Managed.Linux.x64.Debug.err;Append=false"  /p:TargetArchitecture=x64 /p:Configuration=Debug /p:TargetOS=Linux /nodeReuse:false     "/p:CopyNativeProjectBinaries=true" /p:__SkipPackageRestore=true
  Building Targeting Pack
  external -> 
/home/kate/Projects/runtime/eng/liveBuilds.targets(148,5): error : The 'libs' subset must be built before building this project. Missing artifacts: /home/kate/Projects/runtime/artifacts/bin/ref/microsoft.netcore.app/Release/ [/home/kate/Projects/runtime/src/coreclr/tests/src/Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj]
/home/kate/Projects/runtime/eng/liveBuilds.targets(148,5): error : The 'libs' subset must be built before building this project. Missing artifacts: /home/kate/Projects/runtime/artifacts/bin/ref/microsoft.netcore.app/Release/ [/home/kate/Projects/runtime/src/coreclr/tests/src/CoreMangLib/system/environment/environment_version.csproj]
Attempting to cancel the build...

Build FAILED.

After messing around for a bit it seems like the solution is:

PATH=~/cmake/bin:$PATH ./build.sh -subset clr+libs -runtimeconfiguration Release -c Release

Because that got me past the 'subset must be built' error. But I didn't find this anywhere in the documentation on how to build so it seems like it shouldn't necessarily be required (or the docs are just outdated).

Configuration

Debian Buster (10), Intel x64
git commit 7debfe4

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-Infrastructure-coreclr untriaged New issue has not been triaged by the area owner labels May 15, 2020
@ViktorHofer
Copy link
Member

ViktorHofer commented May 15, 2020

Based on the path in the error message I would say you need to build the libs subset in Release. We should probably refine the error message to include the required configuration.

PATH=~/cmake/bin:$PATH ./build.sh clr+libs -runtimeconfiguration Debug -c Release

or if you want to build everything in Release:

PATH=~/cmake/bin:$PATH ./build.sh clr+libs -c Release

@kg
Copy link
Member Author

kg commented May 15, 2020

OK, that was the answer I arrived at. The docs should probably specify this since as-is none of the instructions for how to build the tests actually work - i.e. https://github.com/dotnet/runtime/blob/master/docs/workflow/building/coreclr/linux-instructions.md which doesn't ever mention needing to explicitly build in release configuration. Some of the other docs I looked at didn't mention this either.

@ViktorHofer
Copy link
Member

cc @jashook @trylek

@jashook jashook removed the untriaged New issue has not been triaged by the area owner label Jul 13, 2020
@jashook jashook added this to the Future milestone Jul 17, 2020
mfkl added a commit to mfkl/runtime that referenced this issue Jul 21, 2020
Specify additional necessary flag in the docs command. Fix dotnet#36528
@trylek trylek modified the milestones: Future, 6.0.0 Dec 7, 2020
@trylek trylek added the help wanted [up-for-grabs] Good issue for external contributors label Mar 2, 2021
@ivdiazsa ivdiazsa self-assigned this Mar 10, 2021
@ivdiazsa ivdiazsa removed the help wanted [up-for-grabs] Good issue for external contributors label Mar 10, 2021
@hoyosjs hoyosjs added the documentation Documentation bug or enhancement, does not impact product or test code label Jul 22, 2021
@hoyosjs hoyosjs modified the milestones: 6.0.0, 7.0.0 Jul 22, 2021
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jul 20, 2022
@ivdiazsa ivdiazsa moved this to Done in Runtime Infra Jul 21, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jul 21, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Aug 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Infrastructure-coreclr documentation Documentation bug or enhancement, does not impact product or test code
Projects
Archived in project
7 participants