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

Fails to compile with (MEGH-5599) #315

Open
3 tasks done
ricardoquesada opened this issue Jun 6, 2024 · 1 comment
Open
3 tasks done

Fails to compile with (MEGH-5599) #315

ricardoquesada opened this issue Jun 6, 2024 · 1 comment

Comments

@ricardoquesada
Copy link

ricardoquesada commented Jun 6, 2024

Answers checklist.

  • I have read the Rainmaker documentation and the issue is not addressed there.
  • I have updated my IDF branch (release/vX.Y) to the latest version and checked that the issue is present there. This is not applicable if you are using Rainmaker with Arduino.
  • I have searched the Rainmaker forum and issue tracker for a similar issue and not found a similar issue.

IDF / ESP32-Arduino version.

Using Arduino Core 3.0.1 + ESP-IDF 5.1.4

Operating System used.

Linux

How did you build your project?

Command line with idf.py

Development Kit.

esp32

What is the expected behavior?

I expect it to compile without errors.
Used to work with Arduino Core 2.0.17 + ESP-IDF 4.4.7

Using Arduino Core as an ESP-IDF component

What is the actual behavior?

Compilation error:

In function 'esp_rmaker_schedule_parse_info_and_flags',
    inlined from 'esp_rmaker_schedule_parse_json' at /home/riq/progs/esp-idf-arduino-bluepad32-template/managed_components/espressif__esp_rainmaker/src/core/esp_rmaker_schedule.c:813:13,
    inlined from 'write_cb' at /home/riq/progs/esp-idf-arduino-bluepad32-template/managed_components/espressif__esp_rainmaker/src/core/esp_rmaker_schedule.c:951:5:
/home/riq/progs/esp-idf-arduino-bluepad32-template/managed_components/espressif__esp_rainmaker/src/core/esp_rmaker_schedule.c:635:17: error: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
  635 |                 strncpy(*info, _info, strlen(_info));
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

Steps to reproduce.

Compile Arduino Core 3.0.1 as ESP-IDF component.

Build Logs.

n function 'esp_rmaker_schedule_parse_info_and_flags',
    inlined from 'esp_rmaker_schedule_parse_json' at /home/riq/progs/esp-idf-arduino-bluepad32-template/managed_components/espressif__esp_rainmaker/src/core/esp_rmaker_schedule.c:813:13,
    inlined from 'write_cb' at /home/riq/progs/esp-idf-arduino-bluepad32-template/managed_components/espressif__esp_rainmaker/src/core/esp_rmaker_schedule.c:951:5:
/home/riq/progs/esp-idf-arduino-bluepad32-template/managed_components/espressif__esp_rainmaker/src/core/esp_rmaker_schedule.c:635:17: error: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
  635 |                 strncpy(*info, _info, strlen(_info));
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

More Information.

There are already two pull-request that fixes this issue:

Would be great if you can apply one of those.

@ricardoquesada
Copy link
Author

forgot to mention that this happens when using:

CONFIG_COMPILER_OPTIMIZATION_PERF=y

in sdkconfig.defaults

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant