Skip to content

.NET crashes when compiled with clang 21.1 on Fedora 43 #119706

Closed

Description

@tmds

Our Fedora 43 CI shows some issues when trying to compile runtime repo with clang 21.1

  /home/tester/workdir/runtime/src/native/libs/System.Net.Security.Native/pal_gssapi.c:247:11: error: implicit conversion when initializing 'char *' with an expression of type 'void *' is not permitted in C++ [-Werror,-Wimplicit-void-ptr-cast]
    247 |     char* ptrSlash = memchr(inputName, '/', inputNameLen);
        |           ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /home/tester/workdir/runtime/src/native/libs/System.Native/pal_networking.c:396:17: error: jump from this goto statement to its label is incompatible with C++ [-Werror,-Wjump-misses-init]
    396 |                 goto cleanup;
        |                 ^
  /home/tester/workdir/runtime/src/native/libs/System.Native/pal_networking.c:411:10: note: jump bypasses variable initialization
    411 |     bool includeIPv6Loopback = true;
        |          ^
  /home/tester/workdir/runtime/src/native/libs/System.Native/pal_networking.c:410:10: note: jump bypasses variable initialization
    410 |     bool includeIPv4Loopback = true;
        |          ^
  /home/tester/workdir/runtime/src/native/libs/System.Native/pal_networking.c:1518:34: error: implicit conversion when assigning to 'uint8_t *' (aka 'unsigned char *') from type 'void *' is not permitted in C++ [-Werror,-Wimplicit-void-ptr-cast]
   1518 |     messageHeader->ControlBuffer = (void*)buffer;
        |                                  ^ ~~~~~~~~~~~~~

cc @jkotas @omajid

Activity

  1. added
    needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners
    on Sep 15, 2025
  2. added and removed
    needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners
    on Sep 15, 2025
  3. dotnet-policy-service commented on Sep 15, 2025

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
    See info in area-owners.md if you want to be subscribed.

  4. tmds commented on Sep 15, 2025

    @tmds
    MemberAuthor

    From https://releases.llvm.org/21.1.0/tools/clang/docs/ReleaseNotes.html, the C compiler is now emitting some warnings for C++ incompatibilities (-Wc++-compat), like -Wimplicit-void-ptr-cast and -Wjump-misses-init.

    When I ignore those with -Wno-c++-compat, then it issues one more error for:

    static const CorDebugUserState kInvalidUserState = CorDebugUserState(-1);

      /root/runtime/src/coreclr/debug/di/rspriv.h:6380:36: error: in-class initializer for static data member is not a constant expression
       6380 |     static const CorDebugUserState kInvalidUserState = CorDebugUserState(-1);
            |                                    ^                   ~~~~~~~~~~~~~~~~~~~~~
      /root/runtime/src/coreclr/debug/di/rspriv.h:6380:56: note: integer value -1 is outside the valid range of values [0, 511] for the enumeration type 'CorDebugUserState'
       6380 |     static const CorDebugUserState kInvalidUserState = CorDebugUserState(-1);
            |                                                        
    
  5. omajid commented on Sep 15, 2025

    @omajid
    Member

    Duplicate of #116997 ?

  6. tmds commented on Sep 15, 2025

    @tmds
    MemberAuthor

    Yes. It might have been reported for an older clang. I didn't run into the CorDebugUserState error until after addressing the 21.1 c++-compat warnings.

    These are the changes I made to deal with the compiler errors:

    diff --git a/eng/native/configurecompiler.cmake b/eng/native/configurecompiler.cmake
    index d54d9b6803b..9438cb5af7e 100644
    --- a/eng/native/configurecompiler.cmake
    +++ b/eng/native/configurecompiler.cmake
    @@ -574,6 +574,7 @@ if (CLR_CMAKE_HOST_UNIX OR CLR_CMAKE_HOST_WASI)
       add_compile_options(-Wno-unused-function)
       add_compile_options(-Wno-tautological-compare)
       add_compile_options(-Wno-unknown-pragmas)
    +  add_compile_options(-Wno-c++-compat)
     
       # Explicitly enabled warnings
       check_c_compiler_flag(-Wimplicit-fallthrough COMPILER_SUPPORTS_W_IMPLICIT_FALLTHROUGH)
    diff --git a/src/coreclr/pal/prebuilt/inc/cordebug.h b/src/coreclr/pal/prebuilt/inc/cordebug.h
    index 78b86c69ee9..1672d602d99 100644
    --- a/src/coreclr/pal/prebuilt/inc/cordebug.h
    +++ b/src/coreclr/pal/prebuilt/inc/cordebug.h
    @@ -10042,6 +10042,7 @@ EXTERN_C const IID IID_ICorDebugRegisterSet2;
     typedef
     enum CorDebugUserState
         {
    +        CORDEBUG_INVALID = -1,
             USER_STOP_REQUESTED = 0x1,
             USER_SUSPEND_REQUESTED  = 0x2,
             USER_BACKGROUND = 0x4,
  7. hamarb123 commented on Oct 7, 2025

    @hamarb123
    Contributor

    I ran into this when trying to compile #117405 locally the other day btw - only just found this issue with the solution - would be nice if it was in normal dotnet/runtime so it can be compiled on macOS when the llvm homebrew package is installed :)

  8. tmds commented on Oct 7, 2025

    @tmds
    MemberAuthor

    I put it here as a patch tot help people unblock themselves. I think the actual fix might be a bit more refined.

  9. jkotas commented on Oct 7, 2025

    @jkotas
    Member

    I think the actual fix might be a bit more refined.

    Yeah, I think we want to add the casts to make compilers happy instead of warning disable.

    Are you interested in submitting PR with the fix?

  10. corngood commented on Oct 7, 2025

    @corngood
    Contributor

    We hit this in nixpkgs for the darwin runtime/sdk, presumably after a clang update (NixOS/nixpkgs#449614).

    Applying the CORDEBUG_INVALID change above fixes the build, but for whatever reason I didn't have to add -Wno-c++-compat.

    I'm getting intermittent segfaults from the runtime, for example when running dotnet new console. I'm not sure if this is related. Has anyone been able to test a runtime built with clang-21? I'll try to verify that it's clang version related, but I don't have root access on the darwin machine I'm testing, so my debugging options are a little limited.

  11. omajid commented on Oct 10, 2025

    @omajid
    Member

    I'm getting intermittent segfaults from the runtime, for example when running dotnet new console. I'm not sure if this is related. Has anyone been able to test a runtime built with clang-21

    Same here. Any runtime (8.0, 9.0, 10.0) built with clang-21 (or something else new enough in Fedora 34 and later) is failing with consistent segfaults when running dotnet new console.

    Segfault seems to be related to the first-run setup too, because I need to rm -rf some stuff to reproduce it with a follow-on dotnet console new. Full test case for me:

    rm -rf *.csproj  obj/ *.cs  ~/.nuget/ ~/.local/share/NuGet/ ~/.dotnet/ ~/.templateengine/
    dotnet new console
    
  12. added a commit that references this issue on Oct 12, 2025
  13. 43 remaining items

  14. tmds commented on Oct 28, 2025

    @tmds
    MemberAuthor

    I'll also let the CI do builds for vmr .NET 10 branch + #120775, and check it no longer crashes.

    No more crashes with these changes. 🎉 🎉

    @AaronRobinsonMSFT when the changes are completed for .NET 10, could you also backport them to .NET 8 and .NET 9? These versions are also crashing when compiled with clang 21.1 on Fedora 43.

  15. AaronRobinsonMSFT commented on Oct 28, 2025

    @AaronRobinsonMSFT
    Member

    @tmds That is great to hear! Thank you for confirming.

    [...] when the changes are completed for .NET 10, could you also backport them to .NET 8 and .NET 9?

    This is more complicated. I'm going to need to defer to @jkotas or @jeffschwMSFT on doing that. I can put up a PR, but I'm dubious these changes meet the bar for servicing either of those releases.

  16. tmds commented on Nov 3, 2025

    @tmds
    MemberAuthor

    @AaronRobinsonMSFT @jkotas now that dotnet/runtime changes are in vmr our regular suite of tests is running against the Fedora 43 .NET build. One test is failing. It checks sos debugging with lldb. The test hangs when executing some sos command, and the sos command that hangs seems to differ from run to run. I guess it might be fixed by dotnet/diagnostics#5618, which isn't in the vmr yet. I'm going to check again when that is merged (dotnet/dotnet#3172).

  17. jkotas commented on Nov 3, 2025

    @jkotas
    Member

    I guess it might be fixed by dotnet/diagnostics#5618, which isn't in the vmr yet

    vmr is not building sos.

  18. tmds commented on Nov 3, 2025

    @tmds
    MemberAuthor

    I guess there may be something in dotnet/diagnostics which sos relies on?

    It could also be a regression in how llvm 21 lldb and sos interact.

    If dotnet/dotnet#3172 doesn't change the behavior, I'll create an issue for it.

  19. reopened this on Nov 3, 2025
  20. AaronRobinsonMSFT commented on Jan 14, 2026

    @AaronRobinsonMSFT
    Member

    This should be handled now. @tmds I'm closing this again. Please let me know if there are still issues here.

  21. locked and limited conversation to collaborators on Feb 14, 2026
  22. AaronRobinsonMSFT commented on Mar 27, 2026

    @AaronRobinsonMSFT
    Member

    I can't even build. Without add_compile_options(-Wno-c++-compat) I get errors still:

      /opt/homebrew/opt/icu4c/include/unicode/ptypes.h:62:26: error: identifier 'char16_t' conflicts with a C++ keyword [-Werror,-Wc++-keyword]
         62 |        In file included from /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Globalization.Native/pal_common.c:2:
      In file included from /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Globalization.Native/pal_icushim_internal.h:29:
      In file included from /opt/homebrew/opt/icu4c/include/unicode/ucurr.h:12:
      In file included from /opt/homebrew/opt/icu4c/include/unicode/utypes.h:38:
      In file included from /opt/homebrew/opt/icu4c/include/unicode/umachine.h typedef uint16_t char16_t;
            |                          ^
      In file included from /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Globalization.Native/pal_idna.c:7:
      In file included from /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Globalization.Native/pal_icushim_internal.h:29:
      In file included from /opt/homebrew/opt/icu4c/include/unicode/ucurr.h:12:
      In file included from /opt/homebrew/opt/icu4c/include/unicode/utypes.h:38:
      /opt/homebrew/opt/icu4c/include/unicode/umachine.h:378:13: error: identifier 'char16_t' conflicts with a C++ keyword [-Werror,-Wc++-keyword]
        378 |     typedef char16_t UChar;
            |             ^
      :46:
      /opt/homebrew/opt/icu4c/include/unicode/ptypes.h:62:26: error: identifier 'char16_t' conflicts with a C++ keyword [-Werror,-Wc++-keyword]
         62 |         typedef uint16_t char16_t;
            |                          ^
      In file included from /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Globalization.Native/pal_common.c:2:
      In file included from /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Globalization.Native/pal_icushim_internal.h:29:
      In file included from /opt/homebrew/opt/icu4c/include/unicode/ucurr.h:12:
      In file included from /opt/homebrew/opt/icu4c/include/unicode/utypes.h:38:
      /opt/homebrew/opt/icu4c/include/unicode/umachine.h:378:13: error: identifier 'char16_t' conflicts with a C++ keyword [-Werror,-Wc++-keyword]
        378 |     typedef char16_t UChar;
            |             ^
      In file included from /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Globalization.Native/pal_calendarData.c:8:
      In file included from /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Globalization.Native/pal_locale_internal.h:6:
      In file included from /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Globalization.Native/pal_icushim_internal.h:29:
      In file included from /opt/homebrew/opt/icu4c/include/unicode/ucurr.h:12:
      In file included from /opt/homebrew/opt/icu4c/include/unicode/utypes.h:38:
      In file included from /opt/homebrew/opt/icu4c/include/unicode/umachine.h:46:
      /opt/homebrew/opt/icu4c/include/unicode/ptypes.h:62:26: error: identifier 'char16_t' conflicts with a C++ keyword [-Werror,-Wc++-keyword]
         62 |         typedef uint16_t char16_t;
            |                          ^
      In file included from /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Globalization.Native/pal_calendarData.c:8:
      In file included from /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Globalization.Native/pal_locale_internal.h:6:
      In file included from /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Globalization.Native/pal_icushim_internal.h:29:
      In file included from /opt/homebrew/opt/icu4c/include/unicode/ucurr.h:12:
      In file included from /opt/homebrew/opt/icu4c/include/unicode/utypes.h:38:
      /opt/homebrew/opt/icu4c/include/unicode/umachine.h:378:13: error: identifier 'char16_t' conflicts with a C++ keyword [-Werror,-Wc++-keyword]
        378 |     typedef char16_t UChar;
            |             ^
      In file included from /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Globalization.Native/pal_idna.c:7:
      In file included from /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Globalization.Native/pal_icushim_internal.h:47:
      /opt/homebrew/opt/icu4c/include/unicode/ustring.h:1199:8: error: identifier 'wchar_t' conflicts with a C++ keyword [-Werror,-Wc++-keyword]
       1199 | U_CAPI wchar_t* U_EXPORT2
            |        ^
      /opt/homebrew/opt/icu4c/include/unicode/ustring.h:1200:12: error: identifier 'wchar_t' conflicts with a C++ keyword [-Werror,-Wc++-keyword]
       1200 | u_strToWCS(wchar_t *dest, 
            |            ^
      In file included from /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Globalization.Native/pal_common.c:2:
      /opt/homebrew/opt/icu4c/include/unicode/ustring.h:1232:20: error: identifier 'wchar_t' conflicts with a C++ keyword [-Werror,-Wc++-keyword]
       1232 |              const wchar_t *src,
            |                    ^
      In file included from /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Globalization.Native/pal_icushim_internal.h:47:
      /opt/homebrew/opt/icu4c/include/unicode/ustring.h:1199:8: error: identifier 'wchar_t' conflicts with a C++ keyword [-Werror,-Wc++-keyword]
       1199 | U_CAPI wchar_t* U_EXPORT2
            |        ^
      /opt/homebrew/opt/icu4c/include/unicode/ustring.h:1200:12: error: identifier 'wchar_t' conflicts with a C++ keyword [-Werror,-Wc++-keyword]
       1200 | u_strToWCS(wchar_t *dest, 
            |            ^
      /opt/homebrew/opt/icu4c/include/unicode/ustring.h:1232:20: error: identifier 'wchar_t' conflicts with a C++ keyword [-Werror,-Wc++-keyword]
       1232 |              const wchar_t *src,
            |                    ^
      In file included from /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Globalization.Native/pal_calendarData.c:8:
      In file included from /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Globalization.Native/pal_locale_internal.h:6:
      In file included from /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Globalization.Native/pal_icushim_internal.h:47:
      /opt/homebrew/opt/icu4c/include/unicode/ustring.h:1199:8: error: identifier 'wchar_t' conflicts with a C++ keyword [-Werror,-Wc++-keyword]
       1199 | U_CAPI wchar_t* U_EXPORT2
            |        ^
      /opt/homebrew/opt/icu4c/include/unicode/ustring.h:1200:12: error: identifier 'wchar_t' conflicts with a C++ keyword [-Werror,-Wc++-keyword]
       1200 | u_strToWCS(wchar_t *dest, 
            |            ^
      /opt/homebrew/opt/icu4c/include/unicode/ustring.h:1232:20: error: identifier 'wchar_t' conflicts with a C++ keyword [-Werror,-Wc++-keyword]
       1232 |              const wchar_t *src,
            |                    ^
      5 errors generated.
      5 errors generated.
      make[2]: *** [libs-native/System.Globalization.Native/CMakeFiles/System.Globalization.Native-Static.dir/pal_common.c.o] Error 1
      make[2]: *** Waiting for unfinished jobs....
      make[2]: *** [libs-native/System.Globalization.Native/CMakeFiles/System.Globalization.Native-Static.dir/pal_idna.c.o] Error 1
      5 errors generated.
      make[2]: *** [libs-native/System.Globalization.Native/CMakeFiles/System.Globalization.Native-Static.dir/pal_calendarData.c.o] Error 1
      make[1]: *** [libs-native/System.Globalization.Native/CMakeFiles/System.Globalization.Native-Static.dir/all] Error 2
      make[1]: *** Waiting for unfinished jobs....
      [  4%] Building C object libs-native/System.Native/CMakeFiles/System.Native-Static.dir/pal_maphardwaretype.c.o
      /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Native/pal_interfaceaddresses.c:564:14: error: implicit conversion when initializing 'uint8_t *' (aka 'unsigned char *') with an expression of type 'void *' is not permitted in C++ [-Werror,-Wimplicit-void-ptr-cast]
        564 |     uint8_t* buffer = malloc(byteCount);
            |              ^        ~~~~~~~~~~~~~~~~~
      /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Native/pal_interfaceaddresses.c:590:16: error: implicit conversion when assigning to 'uint8_t *' (aka 'unsigned char *') from type 'void *' is not permitted in C++ [-Werror,-Wimplicit-void-ptr-cast]
        590 |         buffer = malloc(byteCount);
            |                ^ ~~~~~~~~~~~~~~~~~
      [  4%] Generating dummy/eventprovdotnetruntime.cpp, dummy/eventprovdotnetruntimerundown.cpp, dummy/eventprovdotnetruntimestress.cpp, dummy/eventprovdotnetruntimeprivate.cpp, dummy/eventprovdotnetruntimemonoprofiler.cpp
      2 errors generated.
      [  5%] Building C object shared_minipal/CMakeFiles/minipal_objects.dir/descriptorlimit.c.o
      make[2]: *** [libs-native/System.Native/CMakeFiles/System.Native-Static.dir/pal_interfaceaddresses.c.o] Error 1
      make[2]: *** Waiting for unfinished jobs....
      [  5%] Building C object libs-native/System.Security.Cryptography.Native.Apple/CMakeFiles/System.Security.Cryptography.Native.Apple-Static.dir/pal_ssl.c.o
      [  5%] Building CXX object pal/src/CMakeFiles/coreclrpal_objects.dir/cruntime/wchar.cpp.o
      [  5%] Building C object /Users/Hamish/Projects/Clones/runtime26/artifacts/obj/external/libunwind/CMakeFiles/libunwind_dac.dir/Users/Hamish/Projects/Clones/runtime26/src/native/external/libunwind/src/mi/init.c.o
      [  5%] Building C object shared_minipal/CMakeFiles/minipal_objects.dir/memorybarrierprocesswide.c.o
      [  5%] Building C object shared_minipal/CMakeFiles/minipal_objects.dir/mutex.c.o
      [  5%] Building CXX object pal/src/CMakeFiles/coreclrpal_objects.dir/debug/debug.cpp.o
      /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Security.Cryptography.Native.Apple/pal_ecc.c:62:17: error: implicit conversion when initializing 'CFNumberRef' (aka 'const struct __CFNumber *') with an expression of type 'const void *' is not permitted in C++ [-Werror,-Wimplicit-void-ptr-cast]
         62 |     CFNumberRef cfSize = CFDictionaryGetValue(attributes, kSecAttrKeySizeInBits);
            |                 ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 error generated.
      make[2]: *** [libs-native/System.Security.Cryptography.Native.Apple/CMakeFiles/System.Security.Cryptography.Native.Apple-Static.dir/pal_ecc.c.o] Error 1
      make[2]: *** Waiting for unfinished jobs....
      [  5%] Building C object /Users/Hamish/Projects/Clones/runtime26/artifacts/obj/external/libunwind/CMakeFiles/libunwind_dac.dir/Users/Hamish/Projects/Clones/runtime26/src/native/external/libunwind/src/mi/flush_cache.c.o
      [  5%] Building C object /Users/Hamish/Projects/Clones/runtime26/artifacts/obj/external/libunwind/CMakeFiles/libunwind_dac.dir/Users/Hamish/Projects/Clones/runtime26/src/native/external/libunwind/src/mi/mempool.c.o
      [  5%] Building C object shared_minipal/CMakeFiles/minipal_objects.dir/guid.c.o
      make[1]: *** [libs-native/System.Native/CMakeFiles/System.Native-Static.dir/all] Error 2
      [  5%] Building CXX object pal/src/CMakeFiles/coreclrpal_objects.dir/exception/seh.cpp.o
      [  5%] Building C object /Users/Hamish/Projects/Clones/runtime26/artifacts/obj/external/libunwind/CMakeFiles/libunwind_dac.dir/Users/Hamish/Projects/Clones/runtime26/src/native/external/libunwind/src/mi/strerror.c.o
      /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Security.Cryptography.Native.Apple/pal_ssl.c:238:55: error: implicit conversion when passing 'void *' to parameter of type 'const UInt8 *' (aka 'const unsigned char *') is not permitted in C++ [-Werror,-Wimplicit-void-ptr-cast]
        238 |     CFStringRef value = CFStringCreateWithBytes(NULL, protocol, length, kCFStringEncodingASCII, 0);
            |                                                       ^~~~~~~~
      /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h:186:72: note: passing argument to parameter 'bytes' here
        186 | CFStringRef CFStringCreateWithBytes(CFAllocatorRef alloc, const UInt8 *bytes, CFIndex numBytes, CFStringEncoding encoding, Boolean isExternalRepresentation);
            |                                                                        ^
      /Users/Hamish/Projects/Clones/runtime26/src/native/libs/System.Security.Cryptography.Native.Apple/pal_ssl.c:297:56: error: implicit conversion when passing 'const void *' to parameter of type 'CFStringRef' (aka 'const struct __CFString *') is not permitted in C++ [-Werror,-Wimplicit-void-ptr-cast]
        297 |             CFStringCreateExternalRepresentation(NULL, CFArrayGetValueAtIndex(protocols, 0), kCFStringEncodingASCII, 0);
            |                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h:339:82: note: passing argument to parameter 'theString' here
        339 | CFDataRef CFStringCreateExternalRepresentation(CFAllocatorRef alloc, CFStringRef theString, CFStringEncoding encoding, UInt8 lossByte); /* May return NULL on conversion error */       
            |                                                                                  ^
      2 errors generated.
    

    With that flag, I still get errors:

      [100%] Linking CXX executable singlefilehost
      ld: warning: ignoring duplicate libraries: '../nativeresources/libnativeresourcestring.a'
      Undefined symbols for architecture arm64:
        "std::__1::__hash_memory(void const*, unsigned long)", referenced from:
            std::__1::pair<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, fx_ver_t const>, void*>*>, bool> std::__1::__hash_table<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, fx_ver_t const>, std::__1::__unordered_map_hasher<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, fx_ver_t const>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, true>, std::__1::__unordered_map_equal<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, fx_ver_t const>, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, true>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, fx_ver_t const>>>::__emplace_unique_key_args<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, fx_ver_t&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, fx_ver_t&) in corehost_init.cpp.o
            std::__1::pair<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, fx_ver_t const>, void*>*>, bool> std::__1::__hash_table<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, fx_ver_t const>, std::__1::__unordered_map_hasher<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, fx_ver_t const>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, true>, std::__1::__unordered_map_equal<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, fx_ver_t const>, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, true>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, fx_ver_t const>>>::__emplace_unique_key_args<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, fx_ver_t const&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, fx_ver_t const&) in corehost_init.cpp.o
            std::__1::__hash_const_iterator<std::__1::__hash_node<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, void*>*> std::__1::__hash_table<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::__unordered_map_hasher<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, true>, std::__1::__unordered_map_equal<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, true>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>>::find<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) const in hostfxr.cpp.o
            std::__1::pair<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, void*>*>, bool> std::__1::__hash_table<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::__unordered_map_hasher<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, true>, std::__1::__unordered_map_equal<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, true>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>>::__emplace_unique_key_args<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>> const&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>> const&) in fx_muxer.cpp.o
            std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, fx_reference_t>, void*>*> std::__1::__hash_table<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, fx_reference_t>, std::__1::__unordered_map_hasher<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, fx_reference_t>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, true>, std::__1::__unordered_map_equal<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, fx_reference_t>, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, true>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, fx_reference_t>>>::find<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) in fx_resolver.cpp.o
            std::__1::pair<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, fx_reference_t>, void*>*>, bool> std::__1::__hash_table<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, fx_reference_t>, std::__1::__unordered_map_hasher<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, fx_reference_t>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, true>, std::__1::__unordered_map_equal<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, fx_reference_t>, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, true>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, fx_reference_t>>>::__emplace_unique_key_args<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, fx_reference_t>>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, fx_reference_t>&&) in fx_resolver.cpp.o
            std::__1::pair<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, fx_reference_t>, void*>*>, bool> std::__1::__hash_table<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, fx_reference_t>, std::__1::__unordered_map_hasher<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, fx_reference_t>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, true>, std::__1::__unordered_map_equal<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, fx_reference_t>, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, true>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, fx_reference_t>>>::__emplace_unique_key_args<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::piecewise_construct_t const&, std::__1::tuple<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&>, std::__1::tuple<>>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::piecewise_construct_t const&, std::__1::tuple<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&>&&, std::__1::tuple<>&&) in fx_resolver.cpp.o
            ...
      ld: symbol(s) not found for architecture arm64
      clang++: error: linker command failed with exit code 1 (use -v to see invocation)
      make[2]: *** [Corehost.Static/singlefilehost] Error 1
      make[1]: *** [Corehost.Static/CMakeFiles/singlefilehost.dir/all] Error 2
      make: *** [all] Error 2
      ~/Projects/Clones/runtime26/src/coreclr
      Failed to build "CoreCLR component".
    

    I'm using

    Homebrew clang version 21.1.0
    Target: arm64-apple-darwin24.6.0
    Thread model: posix
    InstalledDir: /opt/homebrew/Cellar/llvm/21.1.0/bin
    Configuration file: /opt/homebrew/etc/clang/arm64-apple-darwin24.cfg
    

    based on commit 0327b0d or 8a3b850 with the change provided above. Edit: also reproduces on the latest homebrew llvm 21.1.3.

    @hamarb123 Looks like we've just hit all this with the latest update to XCode.

    % clang++ --version            
    Apple clang version 21.0.0 (clang-2100.0.123.102)
    Target: arm64-apple-darwin25.4.0
    Thread model: posix
    InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

    I'll put up a PR shortly.

    /cc @jkotas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions