ld.lld: error: undefined symbol: perfetto::internal::TrackEventInternal::kDefaultTrack
android14 source code build error: ld.lld: error: undefined symbol: perfetto::internal::TrackEventInternal::kDefaultTrack
referenced by track_event_data_source.h:0 (external/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:0) lto.tmp:(void perfetto::internal::TrackEventDataSource<perfetto::skia::TrackEvent, &perfetto::skia::internal::kCategoryRegistry>::TraceForCategory<unsigned int, perfetto::StaticString>(unsigned int, unsigned int const&, perfetto::StaticString const&, perfetto::protos::pbzero::perfetto_pbzero_enum_TrackEvent::Type)) referenced by track_event_data_source.h:0 (external/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:0) lto.tmp:(void perfetto::internal::TrackEventDataSource<perfetto::skia::TrackEvent, &perfetto::skia::internal::kCategoryRegistry>::TraceForCategory<unsigned int, std::nullptr_t>(unsigned int, unsigned int const&, std::nullptr_t const&, perfetto::protos::pbzero::perfetto_pbzero_enum_TrackEvent::Type)) referenced by track_event_data_source.h:0 (external/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:0) lto.tmp:(perfetto::EventContext perfetto::internal::TrackEventDataSource<perfetto::skia::TrackEvent, &perfetto::skia::internal::kCategoryRegistry>::WriteTrackEvent<unsigned int, std::nullptr_t, perfetto::Track, perfetto::TraceTimestamp, void, void>(perfetto::DataSource<perfetto::skia::TrackEvent, perfetto::internal::TrackEventDataSourceTraits>::TraceContext&, unsigned int const&, std::nullptr_t const&, perfetto::protos::pbzero::perfetto_pbzero_enum_TrackEvent::Type, perfetto::Track const&, perfetto::TraceTimestamp const&)) referenced 7 more times
@LalitMaganti, do you think that this could have been caused by https://github.com/google/perfetto/pull/3851?
No I don't believe so. Android 14 was released 2 years ago [1] so I believe this is some issue on whatever source code these folks are compiling not on our side.
Sadly we cannot provide customized support for every OEM/manufacturer and whatever build environment they are using to compile Android and Perfetto as a consequence. The error message linked is also partial and very difficult to understand without more context.
Please provide us more context on what exactly you are doing and why you think it's a Perfetto issue rather some integration issue on your side. Without more info, I think we will have to simply close this bug as not having enough information for us to help.
[1] https://en.wikipedia.org/wiki/Android_14
0001-Crude-DNG-SDK-1-7-1-upgrade.bulletin.patch We encountered compilation errors when merging Google security patches. It works fine without merging, but we have to merge it. How can we solve this?
This should be raised as an issue to whoever asked you to include that security patch through normal Google partner bug channels. As expected this is an integration issue rather than issue with Perfetto and as such the owner of your patch should understand better how to fix it rather than us.
Specifically it seems like the headers from the SDK are being added but the SDK is not being compiled in. Maybe there is some build dependency missing?
In any case as this is not a Perfetto issue will close this bug.