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

Regression on compilation error in 5.0 vs. 5.0-beta1, (IDFGH-8967) #10379

Closed
3 tasks done
eiffel31 opened this issue Dec 15, 2022 · 4 comments
Closed
3 tasks done

Regression on compilation error in 5.0 vs. 5.0-beta1, (IDFGH-8967) #10379

eiffel31 opened this issue Dec 15, 2022 · 4 comments
Labels
Resolution: Won't Do This will not be worked on Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@eiffel31
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

5.0

Operating System used.

Linux

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

None

What is the expected behavior?

The code compiles fine with 5.0-beta1

After installing 5.0, I have a compilation error (see below).

Switching back to 5.0-beta1: compilation does work.

Note that the faulty line in my code comes from example/system/ota/native_ota_example.
This example compiles without problem under 5.0
Maybe the new release is sensitive to include order? Require some more include?

What is the actual behavior?

/home/philippe/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -Iconfig -I../main -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/newlib/platform_include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/freertos/FreeRTOS-Kernel/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/freertos/esp_additions/include/freertos -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/freertos/esp_additions/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_hw_support/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_hw_support/include/soc -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_hw_support/include/soc/esp32 -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_hw_support/port/esp32/. -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_hw_support/port/esp32/private_include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/heap/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/soc/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/soc/esp32/. -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/soc/esp32/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/hal/esp32/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/hal/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/hal/platform_port/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_rom/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_rom/include/esp32 -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_rom/esp32 -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_common/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_system/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_system/port/soc -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_system/port/include/private -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/xtensa/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/xtensa/esp32/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/lwip/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/lwip/include/apps -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/lwip/include/apps/sntp -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/lwip/lwip/src/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/lwip/port/esp32/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/lwip/port/esp32/include/arch -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_ringbuf/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/efuse/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/efuse/esp32/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/driver/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/driver/deprecated -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/driver/esp32/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_pm/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/mbedtls/port/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/mbedtls/mbedtls/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/mbedtls/mbedtls/library -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/mbedtls/esp_crt_bundle/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_app_format/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/bootloader_support/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/bootloader_support/bootloader_flash/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_partition/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/app_update/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/spi_flash/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/pthread/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_timer/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/app_trace/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_event/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/nvs_flash/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_phy/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_phy/esp32/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/vfs/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_netif/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/wpa_supplicant/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/wpa_supplicant/port/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/wpa_supplicant/esp_supplicant/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_wifi/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/unity/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/unity/unity/src -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/cmock/CMock/src -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/console -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/http_parser -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp-tls -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp-tls/esp-tls-crypto -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_adc/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_adc/interface -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_adc/esp32/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_adc/deprecated/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_eth/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_gdbstub/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_gdbstub/xtensa -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_gdbstub/esp32 -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_hid/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/tcp_transport/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_http_client/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_http_server/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_https_ota/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_lcd/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_lcd/interface -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/protobuf-c/protobuf-c -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/protocomm/include/common -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/protocomm/include/security -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/protocomm/include/transports -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_local_ctrl/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/esp_psram/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/espcoredump/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/espcoredump/include/port/xtensa -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/wear_levelling/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/sdmmc/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/fatfs/diskio -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/fatfs/vfs -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/fatfs/src -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/idf_test/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/idf_test/include/esp32 -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/ieee802154/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/json/cJSON -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/mqtt/esp-mqtt/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/perfmon/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/spiffs/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/ulp/ulp_common/include -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/ulp/ulp_common/include/esp32 -I/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/wifi_provisioning/include -I../components/fan/include -I../components/louver/include -I../components/rotation_manager/include -I../components/runner/include -I../components/settings/include -I../components/status_led/include -I../components/wired_remote/include -mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -Og -fmacro-prefix-map=/users/philippe/dev/vitichauffe/booster/rotation=. -fmacro-prefix-map=/users/philippe/dev/espressif/esp32/esp-idf_v5.0=/IDF -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -DconfigENABLE_FREERTOS_DEBUG_OCDAWARE=1 -std=gnu17 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER="v5.0" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS -MD -MT esp-idf/main/CMakeFiles/__idf_main.dir/rotation.c.obj -MF esp-idf/main/CMakeFiles/idf_main.dir/rotation.c.obj.d -o esp-idf/main/CMakeFiles/idf_main.dir/rotation.c.obj -c ../main/rotation.c
In file included from ../main/rotation.c:30:
../main/rotation.c: In function 'ota_task':
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:265:27: error: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
265 | #define LOG_COLOR(COLOR) "\033[0;" COLOR "m"
| ^~~~~~~~~
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:268:27: note: in expansion of macro 'LOG_COLOR'
268 | #define LOG_COLOR_E LOG_COLOR(LOG_COLOR_RED)
| ^~~~~~~~~
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:282:37: note: in expansion of macro 'LOG_COLOR_E'
282 | #define LOG_FORMAT(letter, format) LOG_COLOR
## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n"
| ^~~~~~~~~~
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:410:86: note: in expansion of macro 'LOG_FORMAT'
410 | if (level==ESP_LOG_ERROR ) { esp_log_write(ESP_LOG_ERROR, tag, LOG_FORMAT(E, format), esp_log_timestamp(), tag, ##VA_ARGS); }
| ^~~~~~~~~~
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:432:41: note: in expansion of macro 'ESP_LOG_LEVEL'
432 | if ( LOG_LOCAL_LEVEL >= level ) ESP_LOG_LEVEL(level, tag, format, ##VA_ARGS);
| ^~~~~~~~~~~~~
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:341:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL'
341 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##VA_ARGS)
| ^~~~~~~~~~~~~~~~~~~
../main/rotation.c:429:9: note: in expansion of macro 'ESP_LOGW'
429 | ESP_LOGW(TAG, "Configured OTA boot partition at offset 0x%08x, but running from offset 0x%08x",
| ^~~~~~~~
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:265:27: error: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
265 | #define LOG_COLOR(COLOR) "\033[0;" COLOR "m"
| ^~~~~~~~~
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:268:27: note: in expansion of macro 'LOG_COLOR'
268 | #define LOG_COLOR_E LOG_COLOR(LOG_COLOR_RED)
| ^~~~~~~~~
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:282:37: note: in expansion of macro 'LOG_COLOR_E'
282 | #define LOG_FORMAT(letter, format) LOG_COLOR
## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n"
| ^~~~~~~~~~
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:410:86: note: in expansion of macro 'LOG_FORMAT'
410 | if (level==ESP_LOG_ERROR ) { esp_log_write(ESP_LOG_ERROR, tag, LOG_FORMAT(E, format), esp_log_timestamp(), tag, ##VA_ARGS); }
| ^~~~~~~~~~
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:432:41: note: in expansion of macro 'ESP_LOG_LEVEL'
432 | if ( LOG_LOCAL_LEVEL >= level ) ESP_LOG_LEVEL(level, tag, format, ##VA_ARGS);
| ^~~~~~~~~~~~~
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:341:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL'
341 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##VA_ARGS)
| ^~~~~~~~~~~~~~~~~~~
../main/rotation.c:429:9: note: in expansion of macro 'ESP_LOGW'
429 | ESP_LOGW(TAG, "Configured OTA boot partition at offset 0x%08x, but running from offset 0x%08x",
| ^~~~~~~~
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:265:27: error: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
265 | #define LOG_COLOR(COLOR) "\033[0;" COLOR "m"
| ^~~~~~~~~
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:269:27: note: in expansion of macro 'LOG_COLOR'
269 | #define LOG_COLOR_W LOG_COLOR(LOG_COLOR_BROWN)
| ^~~~~~~~~
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:282:37: note: in expansion of macro 'LOG_COLOR_W'
282 | #define LOG_FORMAT(letter, format) LOG_COLOR
## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n"
| ^~~~~~~~~~
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:411:86: note: in expansion of macro 'LOG_FORMAT'
411 | else if (level==ESP_LOG_WARN ) { esp_log_write(ESP_LOG_WARN, tag, LOG_FORMAT(W, format), esp_log_timestamp(), tag, ##VA_ARGS); }
| ^~~~~~~~~~
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:432:41: note: in expansion of macro 'ESP_LOG_LEVEL'
432 | if ( LOG_LOCAL_LEVEL >= level ) ESP_LOG_LEVEL(level, tag, format, ##VA_ARGS);
| ^~~~~~~~~~~~~
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:341:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL'
341 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##VA_ARGS)
| ^~~~~~~~~~~~~~~~~~~
../main/rotation.c:429:9: note: in expansion of macro 'ESP_LOGW'
429 | ESP_LOGW(TAG, "Configured OTA boot partition at offset 0x%08x, but running from offset 0x%08x",
| ^~~~~~~~
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:265:27: error: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
265 | #define LOG_COLOR(COLOR) "\033[0;" COLOR "m"
| ^~~~~~~~~
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:269:27: note: in expansion of macro 'LOG_COLOR'
269 | #define LOG_COLOR_W LOG_COLOR(LOG_COLOR_BROWN)
| ^~~~~~~~~
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:282:37: note: in expansion of macro 'LOG_COLOR_W'
282 | #define LOG_FORMAT(letter, format) LOG_COLOR
## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n"
| ^~~~~~~~~~
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:411:86: note: in expansion of macro 'LOG_FORMAT'
411 | else if (level==ESP_LOG_WARN ) { esp_log_write(ESP_LOG_WARN, tag, LOG_FORMAT(W, format), esp_log_timestamp(), tag, ##VA_ARGS); }
| ^~~~~~~~~~
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:432:41: note: in expansion of macro 'ESP_LOG_LEVEL'
432 | if ( LOG_LOCAL_LEVEL >= level ) ESP_LOG_LEVEL(level, tag, format, ##VA_ARGS);
| ^~~~~~~~~~~~~
/users/philippe/dev/espressif/esp32/esp-idf_v5.0/components/log/include/esp_log.h:341:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL'
341 | #define ESP_LOGW( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, tag, format, ##VA_ARGS)
| ^~~~~~~~~~~~~~~~~~~
../main/rotation.c:429:9: note: in expansion of macro 'ESP_LOGW'
429 | ESP_LOGW(TAG, "Configured OTA boot partition at offset 0x%08x, but running from offset 0x%08x",
| ^~~~~~~~
../main/rotation.c:430:1: error: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
430 | configured->address, running->address);
| ^

Steps to reproduce.

source $esp32/esp-idf_v5.0/export.sh

idf.py fullclean # In order to fully compile again with the new version
idf.py build

Build or installation Logs.

No response

More Information.

No response

@eiffel31 eiffel31 added the Type: Bug bugs in IDF label Dec 15, 2022
@espressif-bot espressif-bot added the Status: Opened Issue is new label Dec 15, 2022
@github-actions github-actions bot changed the title Regression on compilation error in 5.0 vs. 5.0-beta1, Regression on compilation error in 5.0 vs. 5.0-beta1, (IDFGH-8967) Dec 15, 2022
@igrr
Copy link
Member

igrr commented Dec 15, 2022

This is one of the breaking changes in v5.0 described here: https://docs.espressif.com/projects/esp-idf/en/v5.0/esp32/migration-guides/release-5.x/gcc.html#int32-t-and-uint32-t-for-xtensa-compiler. You will need to adjust the format strings to use format specifiers from inttypes.h, for example PRIu32 for uint32_t.
Example commit with such fixes: 55879e3

@eiffel31
Copy link
Author

In native_ota_example.c, this line has not changed :
ESP_LOGI(TAG, "Writing to partition subtype %d at offset 0x%x",
update_partition->subtype, update_partition->address);

I do not understand why it is working fine in the example without applying the "fix" and it is not working in my project with the same line of code.

I suspect it depends on the includes.

It is strange to observe such a high impact change between beta1 and final release.

@igrr
Copy link
Member

igrr commented Dec 15, 2022

I do not understand why it is working fine in the example without applying the "fix" and it is not working in my project with the same line of code.

It is because the example CMakeLists.txt file had target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format"), which silenced this warning. It was our mistake to leave these warnings silenced (but not fixed) in v5.0 release. We are fixing them now (e.g. in the commit I have linked to) and backporting the fixes to release/v5.0 branch.

It is strange to observe such a high impact change between beta1 and final release.

Indeed, it's a rather large change which would have been better to merge before v5.0-beta1. Unfortunately this was done as part of the upgrade to the new toolchain release, which required a lot of changes in IDF. We haven't managed to merge it in time before v5.0-beta1. For the future toolchain upgrades, we will try to merge them earlier time before the beta release.

@eiffel31
Copy link
Author

OK, I missed the "-Wno-format" option because I checked the CMakeLists.txt from the project directory, not in the "main" directory.

Thanks for the support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Won't Do This will not be worked on Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

3 participants