dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.42k stars 4.75k forks source link

build error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs #108823

Open successgo opened 1 month ago

successgo commented 1 month ago

Description

Hi, I'm trying to build dotnet runtime v8.0.10 but got the below error:

...
  [ 19%] Building CXX object md/compiler/CMakeFiles/mdcompiler_dac.dir/regmeta_emit.cpp.o
  [ 19%] Built target mdruntime_dac
  [ 19%] Building CXX object md/compiler/CMakeFiles/mdcompiler_dac.dir/regmeta_import.cpp.o
  [ 19%] Building CXX object md/compiler/CMakeFiles/mdcompiler_dac.dir/regmeta_imetadatatables.cpp.o
  <instantiation>:2:1: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
  _ExceptionHijackEnd:
  ^
  /Users/gdc/Sandbox/dotnet-runtime-8.0.10/src/coreclr/debug/ee/arm64/dbghelpers.S:45:1: note: while in macro instantiation
  PATCH_LABEL ExceptionHijackEnd
  ^
  <instantiation>:9:9: error: previous .cfi_startproc was here
          .cfi_startproc
          ^
  /Users/gdc/Sandbox/dotnet-runtime-8.0.10/src/coreclr/debug/ee/arm64/dbghelpers.S:45:1: note: while in macro instantiation
  PATCH_LABEL ExceptionHijackEnd
  ^
  make[2]: *** [debug/ee/wks/CMakeFiles/cordbee_wks_obj.dir/__/arm64/dbghelpers.S.o] Error 1
  make[2]: *** Waiting for unfinished jobs....
  [ 19%] Building CXX object md/compiler/CMakeFiles/mdcompiler_dac.dir/regmeta_vm.cpp.o
  [ 19%] Built target unwinder_wks_obj
  make[1]: *** [debug/ee/wks/CMakeFiles/cordbee_wks_obj.dir/all] Error 2
  [ 19%] Linking CXX static library libmdcompiler_dac.a
  [ 19%] Building CXX object dlls/mscorrc/CMakeFiles/mscorrc_obj.dir/mscorrc.cpp.o
  [ 19%] Built target mscorrc_obj
  [ 19%] Built target mdcompiler_dac
  make: *** [all] Error 2
  ~/Sandbox/dotnet-runtime-8.0.10/src/coreclr
  Failed to build "CoreCLR component".
/Users/gdc/Sandbox/dotnet-runtime-8.0.10/src/coreclr/runtime.proj(94,5): error MSB3073: The command ""/Users/gdc/Sandbox/dotnet-runtime-8.0.10/src/coreclr/build-runtime.sh" -arm64 -debug -os osx -outputrid osx-arm64" exited with code 2.

Build FAILED.

/Users/gdc/Sandbox/dotnet-runtime-8.0.10/src/coreclr/runtime.proj(94,5): error MSB3073: The command ""/Users/gdc/Sandbox/dotnet-runtime-8.0.10/src/coreclr/build-runtime.sh" -arm64 -debug -os osx -outputrid osx-arm64" exited with code 2.
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:16.75
Build failed with exit code 1. Check errors above.

And the clang version is:

~/Sandbox/dotnet-runtime-8.0.10
$ clang --version
Homebrew clang version 19.1.1
Target: arm64-apple-darwin24.0.0
Thread model: posix
InstalledDir: /opt/homebrew/Cellar/llvm/19.1.1/bin

Reproduction Steps

Download dotnet-runtime-8.0.10.zip and run ./build.sh.

Expected behavior

Build success.

Actual behavior

Got the error above.

Regression?

No response

Known Workarounds

No response

Configuration

OS: macOS 15.0.1 Arch: arm64 (m3 macbook air)

Other information

No response

dotnet-policy-service[bot] commented 1 month ago

Tagging subscribers to this area: @hoyosjs See info in area-owners.md if you want to be subscribed.

vcsjones commented 1 month ago

This is the same issue as https://github.com/dotnet/runtime/issues/104105 which was addressed in main for .NET 9, but has not been back ported to .NET 8.

To build .NET 8 you will need to use the Xcode 15 tools (which unfortunately, Xcode 15 does not officially support Sequoia). I don't know if the fix in https://github.com/dotnet/runtime/pull/106744/files would meet the servicing bar.

/cc @filipnavara and @jkotas

filipnavara commented 1 month ago

There was a request from Unity people to backport the build fix (https://github.com/dotnet/runtime/pull/106800). They probably have it in their fork now. I’d be up for creating the PR if there’s a will to push it through servicing.

VSadov commented 3 days ago

I can confirm. After updating to Sequoia the 8.0 branch no longer builds.