runtime: Build failing on tip : "./build.sh --subsetCategory CoreCLR -c Release -arch x64"

  error: Could not read profile /home/stmaclea/.nuget/packages/optimization.linux-x64.pgo.coreclr/99.99.99-master-20200228.3/data/clrjit.profdata: Unsupported instrumentation profile format version
  [ 75%] Building CXX object src/utilcode/CMakeFiles/utilcode_dac.dir/configuration.cpp.o
  [ 76%] Building CXX object src/utilcode/CMakeFiles/utilcode_dac.dir/collections.cpp.o
  1 error generated.
  make[2]: *** [src/jit/standalone/CMakeFiles/clrjit.dir/__/alloc.cpp.o] Error 1
  make[1]: *** [src/jit/standalone/CMakeFiles/clrjit.dir/all] Error 2
  src/jit/standalone/CMakeFiles/clrjit.dir/build.make:79: recipe for target 'src/jit/standalone/CMakeFiles/clrjit.dir/__/alloc.cpp.o' failed
  CMakeFiles/Makefile2:2423: recipe for target 'src/jit/standalone/CMakeFiles/clrjit.dir/all' failed
  make[1]: *** Waiting for unfinished jobs....

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 34 (34 by maintainers)

Commits related to this issue

Most upvoted comments

Looks like we already have a check to skip PGO if clang is older than 16, that needs to be bumped: https://github.com/dotnet/runtime/blob/6a23f1caa3ed2baeda3d9962d2ffb983bf996bef/src/coreclr/pgosupport.cmake#L55

Would be nice if the PGO package could record the clang version so we don’t need to manually keep it in sync.

would upgrading clang to 20 fix this locally? (I already do the workaround but would prefer permanent fix)

Yup, it would match the CI environment which appears to be working. On Ubuntu/Debian, one quick way to upgrade llvm toolchian is curl -sSL https://apt.llvm.org/llvm.sh | bash -s - 20 all. build.sh has mechanism to pick the latest clang, if multiple installations are found (just delete artifacts/ dir after installing the new toolchain).

I honestly believe that what we are doing is the right thing. In this case it even feels like deleting the cached version of the optimization package is enough.

Why?

I see several things we are doing wrong:

  • The build is not reproducible.
  • The build depending on global machine state.
  • The dependency is undocumented.
  • The --clean operation doesn’t clean everything and there is no --deep-clean option
  • The dev build is different from the CI build, The dev experience is effectively untested by CI.

Clean hasn’t worked in a while or been supported I believe, at least in coreclr. I am not sure why it wasn’t removed.