<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/155606>155606</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Error compiling protobuf with llvm 21.1.0: undefined symbol: std::__1::__hash_memory
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          hoyhoy
      </td>
    </tr>
</table>

<pre>
    This just started failing in LLVM 21.1.0.  This worked on every other of clang up until now.

```
/opt/llvm21.1.0/bin/clang++ -m64 -stdlib=libc++ -fno-ms-extensions -U_WIN32 -fsanitize=address -fsanitize-address-use-after-scope -fsanitize-address-use-after-return=always -fno-omit-frame-pointer -fno-optimize-sibling-calls -fsanitize=undefined -fno-sanitize=alignment -fno-sanitize=function -fsanitize=local-bounds -Wno-everything -g -glldb -gcolumn-info -g -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=15.6 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -m64 -fsanitize=address -fsanitize=undefined -fno-sanitize=function -fno-omit-frame-pointer -fsanitize=local-bounds CMakeFiles/protoc.dir/src/google/protobuf/compiler/main.cc.o -o protoc-3.21.12.0  libprotocd.a libprotobufd.a
ld64.lld: error: undefined symbol: std::__1::__hash_memory(void const*, unsigned long)
>>> referenced by /proto3774d1a7ae5e8/b/src/src/google/protobuf/compiler/command_line_interface.cc
>>> libprotocd.a(command_line_interface.cc.o):(symbol unsigned long std::__1::__do_string_hash[abi:ne210100]<char const*>(char const*, char const*)+0x24)
>>> referenced by /proto3774d1a7ae5e8/b/src/src/google/protobuf/compiler/cpp/file.cc
>>> libprotocd.a(file.cc.o):(symbol std::__1::hash<google::protobuf::Descriptor const*>::operator()[abi:ne210100](google::protobuf::Descriptor const*) const+0xe0)
>>> referenced by /proto3774d1a7ae5e8/b/src/src/google/protobuf/compiler/cpp/file.cc
>>> libprotocd.a(file.cc.o):(symbol std::__1::hash<google::protobuf::FileDescriptor const*>::operator()[abi:ne210100](google::protobuf::FileDescriptor const*) const+0xe0)
>>> referenced 2 more times
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/protoc.dir/build.make:102: protoc-3.21.12.0] Error 1
make[2]: Leaving directory '/proto3774d1a7ae5e8/b/build/Debug'
make[1]: *** [CMakeFiles/Makefile2:193: CMakeFiles/protoc.dir/all] Error 2
make[1]: Leaving directory '/proto3774d1a7ae5e8/b/build/Debug'
make: *** [Makefile:136: all] Error 2
```

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzcVlGP4jYQ_jXmZeQocUgIDzzAckhV79pK1_buDTn2hPjWsSPbYaG_vnKAXdi93btWbR8qWSKMxzPffJ4ZD_de7QzighQrUqwnfAitdYvWHlt7nNRWHhe_tsrDl8EH8IG7gBIarrQyO1AG3r___QOwLMmSNAEYVR-su0cJ1gDu0R3BhhYd2AaE5mYHQw-DCUqDsQ8JSZdxlel5pUvCNrYPhG203ncnw4RtamUI24wGCFsRtgLalVOgPkitapKvtarFZacxlnae4iGg8coaD_S37acffsoZ0MZzo4L6A0m-5lI69P5KSM8iOnikvAnoqBe2x7dVHIbBmWhQP_CjPwGwnQq0cbxD2ltlArqzvA-qi3a8qiOJVHCt_S2wwUhslEF5OnINWaud6dCEFzvNYERQ1txa0lZwTWs7GOmBfjKWjncS2nh9NC6tZQ10J6weOkOVaewo5060cKjKbWRZ-aN31gYgbLPse60Ej648YZvPwkpMeN8TtrmzJqAJUbzGPWrboyNs84vmobGui_IPXPz88XPSn0XPND-uf7xS8vIeaNdxYf2B7tHFq6SdikRnRVIC_aQJu6MeI9Ztz0Prt41yPlx2WuQSXc_ltuOHrTI-cK23hnfoz-nzdja8eRNXfL9226_dw90Hfo8bpTEG2zsbrEikigR4Jwjb7Kzd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