Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] Compiling Android v1.3.0.0 on macos: ld: error: undefined symbol xxx #34843

Open
kuyu132 opened this issue Aug 7, 2024 · 3 comments
Open
Labels
android build issue waiting for feedback Waiting for feedback from reporter/others about bug reproducing and status.

Comments

@kuyu132
Copy link

kuyu132 commented Aug 7, 2024

Build issue(s)

ld: error: undefined symbol: InitDataModelHandler()

referenced by CHIPDeviceControllerFactory.cpp:231 (../../src/controller/CHIPDeviceControllerFactory.cpp:231)
libChipController.CHIPDeviceControllerFactory.cpp.o:(chip::Controller::DeviceControllerFactory::InitSystemState(chip::Controller::FactoryInitParams)) in archive lib/libCHIP.a

ld: error: undefined symbol: chip::app::ConcreteAttributePathExists(chip::app::ConcreteAttributePath const&)

referenced by InteractionModelEngine.cpp:488 (../../src/app/InteractionModelEngine.cpp:488)
interaction-model.InteractionModelEngine.cpp.o:(chip::app::InteractionModelEngine::ParseAttributePaths(chip::Access::SubjectDescriptor const&, chip::app::AttributePathIBs::Parser&, bool&, unsigned long&)) in archive lib/libCHIP.a

ld: error: undefined symbol: MatterGetAccessPrivilegeForReadAttribute(unsigned int, unsigned int)

referenced by RequiredPrivilege.h:37 (../../src/app/RequiredPrivilege.h:37)
interaction-model.InteractionModelEngine.cpp.o:(chip::app::InteractionModelEngine::ParseAttributePaths(chip::Access::SubjectDescriptor const&, chip::app::AttributePathIBs::Parser&, bool&, unsigned long&)) in archive lib/libCHIP.a
referenced by RequiredPrivilege.h:37 (../../src/app/RequiredPrivilege.h:37)
interaction-model.InteractionModelEngine.cpp.o:(chip::app::InteractionModelEngine::ParseAttributePaths(chip::Access::SubjectDescriptor const&, chip::app::AttributePathIBs::Parser&, bool&, unsigned long&)) in archive lib/libCHIP.a

ld: error: undefined symbol: emberAfEndpointCount()

referenced by InteractionModelEngine.cpp:632 (../../src/app/InteractionModelEngine.cpp:632)
interaction-model.InteractionModelEngine.cpp.o:(chip::app::InteractionModelEngine::ParseEventPaths(chip::Access::SubjectDescriptor const&, chip::app::EventPathIBs::Parser&, bool&, unsigned long&)) in archive lib/libCHIP.a
referenced by AttributePathExpandIterator.cpp:79 (../../src/app/AttributePathExpandIterator.cpp:79)
libCHIPDataModel.AttributePathExpandIterator.cpp.o:(chip::app::AttributePathExpandIterator::PrepareEndpointIndexRange(chip::app::AttributePathParams const&)) in archive lib/libCHIP.a

ld: error: undefined symbol: emberAfEndpointIndexIsEnabled(unsigned short)

referenced by InteractionModelEngine.cpp:634 (../../src/app/InteractionModelEngine.cpp:634)
interaction-model.InteractionModelEngine.cpp.o:(chip::app::InteractionModelEngine::ParseEventPaths(chip::Access::SubjectDescriptor const&, chip::app::EventPathIBs::Parser&, bool&, unsigned long&)) in archive lib/libCHIP.a
referenced by AttributePathExpandIterator.cpp:200 (../../src/app/AttributePathExpandIterator.cpp:200)
libCHIPDataModel.AttributePathExpandIterator.cpp.o:(chip::app::AttributePathExpandIterator::Next()) in archive lib/libCHIP.a

ld: error: undefined symbol: emberAfEndpointFromIndex(unsigned short)

referenced by InteractionModelEngine.cpp:639 (../../src/app/InteractionModelEngine.cpp:639)
interaction-model.InteractionModelEngine.cpp.o:(chip::app::InteractionModelEngine::ParseEventPaths(chip::Access::SubjectDescriptor const&, chip::app::EventPathIBs::Parser&, bool&, unsigned long&)) in archive lib/libCHIP.a
referenced by AttributePathExpandIterator.cpp:206 (../../src/app/AttributePathExpandIterator.cpp:206)
libCHIPDataModel.AttributePathExpandIterator.cpp.o:(chip::app::AttributePathExpandIterator::Next()) in archive lib/libCHIP.a

ld: error: undefined symbol: emberAfFindServerCluster(unsigned short, unsigned int)

referenced by InteractionModelEngine.cpp:592 (../../src/app/InteractionModelEngine.cpp:592)
interaction-model.InteractionModelEngine.cpp.o:(chip::app::HasValidEventPathForEndpoint(unsigned short, chip::app::EventPathParams const&, chip::Access::SubjectDescriptor const&)) in archive lib/libCHIP.a

ld: error: undefined symbol: emberAfFindEndpointType(unsigned short)

referenced by InteractionModelEngine.cpp:572 (../../src/app/InteractionModelEngine.cpp:572)
interaction-model.InteractionModelEngine.cpp.o:(chip::app::HasValidEventPathForEndpoint(unsigned short, chip::app::EventPathParams const&, chip::Access::SubjectDescriptor const&)) in archive lib/libCHIP.a

ld: error: undefined symbol: emberAfContainsAttribute(unsigned short, unsigned int, unsigned int)

referenced by InteractionModelEngine.cpp:1550 (../../src/app/InteractionModelEngine.cpp:1550)
interaction-model.InteractionModelEngine.cpp.o:(chip::app::InteractionModelEngine::RemoveDuplicateConcreteAttributePath(chip::SingleLinkedListNodechip::app::AttributePathParams*&)) in archive lib/libCHIP.a

ld: error: undefined symbol: chip::app::DispatchSingleClusterCommand(chip::app::ConcreteCommandPath const&, chip::TLV::TLVReader&, chip::app::CommandHandler*)

referenced by InteractionModelEngine.cpp:1678 (../../src/app/InteractionModelEngine.cpp:1678)
interaction-model.InteractionModelEngine.cpp.o:(chip::app::InteractionModelEngine::DispatchCommand(chip::app::CommandHandler&, chip::app::ConcreteCommandPath const&, chip::TLV::TLVReader&)) in archive lib/libCHIP.a

ld: error: undefined symbol: chip::app::ServerClusterCommandExists(chip::app::ConcreteCommandPath const&)

referenced by InteractionModelEngine.cpp:1683 (../../src/app/InteractionModelEngine.cpp:1683)
interaction-model.InteractionModelEngine.cpp.o:(chip::app::InteractionModelEngine::CommandExists(chip::app::ConcreteCommandPath const&)) in archive lib/libCHIP.a
referenced by InteractionModelEngine.cpp:1683 (../../src/app/InteractionModelEngine.cpp:1683)
interaction-model.InteractionModelEngine.cpp.o:(non-virtual thunk to chip::app::InteractionModelEngine::CommandExists(chip::app::ConcreteCommandPath const&)) in archive lib/libCHIP.a

ld: error: undefined symbol: chip::app::CheckEventSupportStatus(chip::app::ConcreteEventPath const&)

referenced by InteractionModelEngine.cpp:556 (../../src/app/InteractionModelEngine.cpp:556)
interaction-model.InteractionModelEngine.cpp.o:(chip::app::HasValidEventPathForEndpointAndCluster(unsigned short, EmberAfCluster const*, chip::app::EventPathParams const&, chip::Access::SubjectDescriptor const&)) in archive lib/libCHIP.a
referenced by Engine.cpp:328 (../../src/app/reporting/Engine.cpp:328)
interaction-model.Engine.cpp.o:(chip::app::reporting::Engine::CheckAccessDeniedEventPaths(chip::TLV::TLVWriter&, bool&, chip::app::ReadHandler*)) in archive lib/libCHIP.a

ld: error: undefined symbol: MatterGetAccessPrivilegeForReadEvent(unsigned int, unsigned int)

referenced by RequiredPrivilege.h:52 (../../src/app/RequiredPrivilege.h:52)
interaction-model.InteractionModelEngine.cpp.o:(chip::app::HasValidEventPathForEndpointAndCluster(unsigned short, EmberAfCluster const*, chip::app::EventPathParams const&, chip::Access::SubjectDescriptor const&)) in archive lib/libCHIP.a
referenced by RequiredPrivilege.h:52 (../../src/app/RequiredPrivilege.h:52)
libCHIPDataModel.EventManagement.cpp.o:(chip::app::EventManagement::CheckEventContext(chip::app::EventLoadOutContext*, chip::app::EventManagement::EventEnvelopeContext const&)) in archive lib/libCHIP.a
referenced by RequiredPrivilege.h:52 (../../src/app/RequiredPrivilege.h:52)
interaction-model.Engine.cpp.o:(chip::app::reporting::Engine::CheckAccessDeniedEventPaths(chip::TLV::TLVWriter&, bool&, chip::app::ReadHandler*)) in archive lib/libCHIP.a

ld: error: undefined symbol: emberAfGetNthClusterId(unsigned short, unsigned char, bool)

referenced by AttributePathExpandIterator.cpp:220 (../../src/app/AttributePathExpandIterator.cpp:220)
libCHIPDataModel.AttributePathExpandIterator.cpp.o:(chip::app::AttributePathExpandIterator::Next()) in archive lib/libCHIP.a

ld: error: undefined symbol: emberAfGetServerAttributeIdByIndex(unsigned short, unsigned int, unsigned short)

referenced by AttributePathExpandIterator.cpp:230 (../../src/app/AttributePathExpandIterator.cpp:230)
libCHIPDataModel.AttributePathExpandIterator.cpp.o:(chip::app::AttributePathExpandIterator::Next()) in archive lib/libCHIP.a

ld: error: undefined symbol: emberAfIndexFromEndpoint(unsigned short)

referenced by AttributePathExpandIterator.cpp:83 (../../src/app/AttributePathExpandIterator.cpp:83)
libCHIPDataModel.AttributePathExpandIterator.cpp.o:(chip::app::AttributePathExpandIterator::PrepareEndpointIndexRange(chip::app::AttributePathParams const&)) in archive lib/libCHIP.a

ld: error: undefined symbol: emberAfClusterIndex(unsigned short, unsigned int, unsigned char)

referenced by AttributePathExpandIterator.cpp:99 (../../src/app/AttributePathExpandIterator.cpp:99)
libCHIPDataModel.AttributePathExpandIterator.cpp.o:(chip::app::AttributePathExpandIterator::PrepareClusterIndexRange(chip::app::AttributePathParams const&, unsigned short)) in archive lib/libCHIP.a

ld: error: undefined symbol: emberAfClusterCount(unsigned short, bool)

referenced by AttributePathExpandIterator.cpp:95 (../../src/app/AttributePathExpandIterator.cpp:95)
libCHIPDataModel.AttributePathExpandIterator.cpp.o:(chip::app::AttributePathExpandIterator::PrepareClusterIndexRange(chip::app::AttributePathParams const&, unsigned short)) in archive lib/libCHIP.a

ld: error: undefined symbol: emberAfGetServerAttributeIndexByAttributeId(unsigned short, unsigned int, unsigned int)

referenced by AttributePathExpandIterator.cpp:118 (../../src/app/AttributePathExpandIterator.cpp:118)
libCHIPDataModel.AttributePathExpandIterator.cpp.o:(chip::app::AttributePathExpandIterator::PrepareAttributeIndexRange(chip::app::AttributePathParams const&, unsigned short, unsigned int)) in archive lib/libCHIP.a

ld: error: undefined symbol: emberAfGetServerAttributeCount(unsigned short, unsigned int)

referenced by AttributePathExpandIterator.cpp:112 (../../src/app/AttributePathExpandIterator.cpp:112)
libCHIPDataModel.AttributePathExpandIterator.cpp.o:(chip::app::AttributePathExpandIterator::PrepareAttributeIndexRange(chip::app::AttributePathParams const&, unsigned short, unsigned int)) in archive lib/libCHIP.a

ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

Platform

android

Anything else?

No response

@kuyu132
Copy link
Author

kuyu132 commented Aug 7, 2024

In the builds of the project homepage, the Android link is 404. Can the Android SDK of this project be compiled normally?

Android no status

@joonhaengHeo
Copy link
Contributor

I've never seen anything like this before. What build script did you use to build it?

@andy31415
Copy link
Contributor

This may be a custom build. We have updated AttributePathExpandIterator to be split between ember and datamodel provider and the signatures look like that (in #34288). After #36319 the files were joined again.

From what I can tell from the logs, the code behaves as if the CodeGenDataModelProvider is linked in (i.e. it tries to use ember functions such as ConcreteAttributePathExists or emberAfEndpointCount however those are not provided.

Please provide us with information on how to reproduce on master (what command to run to build). I suspect this is some custom code integration that is failing.

@andy31415 andy31415 added waiting for feedback Waiting for feedback from reporter/others about bug reproducing and status. and removed needs triage labels Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android build issue waiting for feedback Waiting for feedback from reporter/others about bug reproducing and status.
Projects
Status: Todo
Status: Todo
Development

No branches or pull requests

4 participants