Page 1 of 1

Error on building the Switch example from esp-rainmaker

Posted: Sun Mar 23, 2025 11:29 am
by rodrigopandini
Hi.

I'm getting the error bellow when I try to build the Switch example from esp-rainmaker.
Not sure if is wrong version or something else.
Can someone help me?

Code: Untitled.bsh Select all


/home/myuser/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/esp_wifi/libesp_wifi.a(esp_adapter.c.obj):(.data.g_wifi_osi_funcs+0x150): undefined reference to `__wrap_esp_log_write'
/home/myuser/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/esp_wifi/libesp_wifi.a(esp_adapter.c.obj):(.data.g_wifi_osi_funcs+0x154): undefined reference to `__wrap_esp_log_writev'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

* The terminal process "ninja" terminated with exit code: 1.

Not sure if this can help, but I'm attaching an image that show all information that Arduino IDE provide me about my esp32 device, when I successfully run a simple example for blink led.

Re: Error on building the Switch example from esp-rainmaker

Posted: Sun Mar 23, 2025 5:48 pm
by ahsrabrifat
Check if your CMakeLists.txt includes the logging component:

Code: Select all

idf_component_register(SRCS "main.c"
                       INCLUDE_DIRS "."
                       REQUIRES log)