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] "chip_logging=false" causes build failure #29877

Closed
joochlee opened this issue Oct 20, 2023 · 0 comments · Fixed by #29878
Closed

[Build] "chip_logging=false" causes build failure #29877

joochlee opened this issue Oct 20, 2023 · 0 comments · Fixed by #29878

Comments

@joochlee
Copy link

joochlee commented Oct 20, 2023

Build issue(s)

  1. SDK version : 1.1.0.1
  2. OS: ubuntu 22.04.02
  3. symptom:
  • I tried gn gen out --args='chip_logging=false in chip-tool folder to prevent chip-tool from printing log message. but build failed with following error:
...
...
[594/595] ld ./chip-tool 
FAILED: chip-tool chip-tool.map  
g++ -O0 -fPIC -Werror -Wl,--fatal-warnings -Wl,-z,defs -fdiagnostics-color -Wl,--gc-sections -pie liblogging-stdio.a -Wl,-Map,./chip-tool.map @./chip-tool.rsp -o ./chip-tool 
/usr/bin/ld: chip-tool-utils.a(chip-tool-utils.Commands.cpp.o): in function `Commands::Run(int, char**)': 
/connectedhomeip/examples/chip-tool/out/../commands/common/Commands.cpp:141: undefined reference to `chip::Logging::SetLogFilter(unsigned char)' 
/usr/bin/ld: chip-tool-utils.a(chip-tool-utils.InteractiveCommands.cpp.o): in function `InteractiveServerCommand::RunCommand()': 
/connectedhomeip/examples/chip-tool/out/../commands/interactive/InteractiveCommands.cpp:247: undefined reference to `chip::Logging::SetLogRedirectCallback(void (*)(char const*, unsigned char, char const*, __va_list_tag*))' 
/usr/bin/ld: chip-tool-utils.a(chip-tool-utils.InteractiveCommands.cpp.o): in function `InteractiveStartCommand::RunCommand()': 
/connectedhomeip/examples/chip-tool/out/../commands/interactive/InteractiveCommands.cpp:286: undefined reference to `chip::Logging::SetLogRedirectCallback(void (*)(char const*, unsigned char, char const*, __va_list_tag*))' 
collect2: error: ld returned 1 exit status 
ninja: build stopped: subcommand failed. 
  • Similar error happens when I try gn gen out --args='chip_logging=false in chip root folder.
...
...
[2052/2079] ld tests/TestSessionManager 
[2053/2079] ld -shared obj/src/controller/python/chip/_ChipDeviceCtrl.so 
FAILED: obj/src/controller/python/chip/_ChipDeviceCtrl.so obj/src/controller/python/chip/_ChipDeviceCtrl.map  
g++ -O0 -fPIC -Werror -Wl,--fatal-warnings -Wl,-z,defs -fdiagnostics-color -Wl,--gc-sections -Wl,-Map,obj/src/controller/python/chip/_ChipDeviceCtrl.map @obj/src/controller/python/chip/_ChipDeviceCtrl.so.rsp -o obj/src/controller/python/chip/_ChipDeviceCtrl.so -shared 
/usr/bin/ld: obj/src/controller/python/chip/logging/_ChipDeviceCtrl.LoggingRedirect.cpp.o: in function `pychip_logging_set_callback': 
/home/jclee/Development/Matter/WS_Matter/connectedhomeip/out/../src/controller/python/chip/logging/LoggingRedirect.cpp:48: undefined reference to `chip::Logging::SetLogRedirectCallback(void (*)(char const*, unsigned char, char const*, __va_list_tag*))' 
/usr/bin/ld: /home/jclee/Development/Matter/WS_Matter/connectedhomeip/out/../src/controller/python/chip/logging/LoggingRedirect.cpp:54: undefined reference to `chip::Logging::SetLogRedirectCallback(void (*)(char const*, unsigned char, char const*, __va_list_tag*))' 
collect2: error: ld returned 1 exit status 
[2054/2079] ld tests/TestSessionManagerDispatch 
[2055/2079] c++ obj/examples/chip-tool/chip-tool.main.cpp.o 
[2056/2079] ACTION //:matter_build_venv._install_3p_deps(//third_party/pigweed/repo/pw_build/python_toolchain:python) 
ninja: build stopped: subcommand failed. 

Platform

other

Anything else?

No response

bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Oct 20, 2023
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Oct 21, 2023
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Oct 22, 2023
@mergify mergify bot closed this as completed in #29878 Oct 23, 2023
mergify bot pushed a commit that referenced this issue Oct 23, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in [Build] Build Issues Oct 23, 2023
shripad621git pushed a commit to shripad621git/connectedhomeip that referenced this issue Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant