Undefined symbol to a destructor

368 views
Skip to first unread message

Trung Nguyen

unread,
Jul 24, 2023, 11:58:55 AM7/24/23
to cxx, Mohannad Farrag, Eric Orth, Stefano Duo
Hi folks,

I recently set up a Chromium builder that uses Mainline Clang (clang-r487747). The builder failed to compile due to the following error.

ld.lld: error: undefined symbol: net::HostResolverCache::Key::~Key()
>>> referenced by host_resolver_cache.cc:161 (../../net/dns/host_resolver_cache.cc:161)
>>>               obj/net/dns/dns/host_resolver_cache.o:(net::HostResolverCache::Set(std::__Cr::unique_ptr<net::HostResolverInternalResult, std::__Cr::default_delete<net::HostResolverInternalResult>>, net::NetworkAnonymizationKey const&, net::HostResolverSource, bool))
>>> referenced by pair.h:77 (../../buildtools/third_party/libc++/trunk/include/__utility/pair.h:77)
>>>               obj/net/dns/dns/host_resolver_cache.o:(std::__Cr::pair<net::HostResolverCache::Key const, net::HostResolverCache::Entry>::~pair())
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Full log: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8774699505601571249/+/u/compile/stdout

The HostResolverCache class was introduced one month ago and has passed with the other builders that use Chromium's Clang.

The above issue seems be similar to a bug reported in the past:

Does this ring a bell with anyone?

Thanks,
Trung

Dana Jansens

unread,
Jul 25, 2023, 11:41:51 AM7/25/23
to Trung Nguyen, cxx, Mohannad Farrag, Eric Orth, Stefano Duo
Not for me, but if you want an idea for what to do with it, I would:
- try to narrow down what is different about this builder, if anything
- try to reduce it to a minimal reproduction case for reporting upstream

--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/eac9dcd8-9386-4bdb-9368-9683d2158ff2n%40chromium.org.

Dana Jansens

unread,
Jul 26, 2023, 8:51:09 AM7/26/23
to Trung Nguyen, cxx, Mohannad Farrag, Eric Orth, Stefano Duo
On Wed, Jul 26, 2023 at 7:23 AM Trung Nguyen <t...@google.com> wrote:
The only difference between this builder and the other builders is that it uses Mainline Clang (clang-r487747) while the other builders use Chromium's Clang.
The steps to reproduce this issue can be found in https://crbug.com/1467793. As also mentioned in the bug, if we remove clang_base_path = "//third_party/mainline_clang/linux-amd64" from the GN args, the error disappears.

Chromium clang is roughly HEAD so unless something changed in the last week or so of revisions, I don't know what difference that would make. If that's the case, you could bisect LLVM to see where it broke. The LLVM git revision Chrome is.using is found in //tools/clang/scripts/update.py.

Trung Nguyen

unread,
Jul 26, 2023, 11:20:05 AM7/26/23
to cxx, Dana Jansens, cxx, Mohannad Farrag, Eric Orth, Stefano Duo, Trung Nguyen
The only difference between this builder and the other builders is that it uses Mainline Clang (clang-r487747) while the other builders use Chromium's Clang.
The steps to reproduce this issue can be found in https://crbug.com/1467793. As also mentioned in the bug, if we remove clang_base_path = "//third_party/mainline_clang/linux-amd64" from the GN args, the error disappears.

On Tuesday, July 25, 2023 at 4:41:51 PM UTC+1 Dana Jansens wrote:
Reply all
Reply to author
Forward
0 new messages