You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the latest platform release v10.30.0 in combination with Arduino Framework v1.6.0, building breaks due to (now) unsupported (but previously supported) use of --wrap=realloc with the following error message when building:
.pio\build\sensotronic2\libFrameworkArduino.a(WString.cpp.o): In function `String::String(char const*)':
WString.cpp:(.text._ZN6StringC2EPKc+0x1c): undefined reference to `__wrap_realloc'
collect2.exe: error: ld returned 1 exit status
Possibly cause:
The Adafruit_nrf52_Arduino Framework uses --wrap=realloc in the compiler's ldflags (see https://github.com/adafruit/Adafruit_nRF52_Arduino/releases/tag/1.6.0 /-> adafruit/Adafruit_nRF52_Arduino#744 -> https://github.com/adafruit/Adafruit_nRF52_Arduino/pull/744/files ) in the latest release. However, in the platform's latest release 10.3.0 and this commit 9d461cf , gcc version "1.70201.0" was (re-?)introduced as "optionalVersion". Apparently, this causes pio to download this version instead of a more-up-to-date one (although there is no exception made in platform.py? maybe the "optionalVersion" priority is index-based rather than "take the most recent version" ? ). In turn, the above issue is the result.
Workarounds:
I was able to quickfix this issue by reverting to platform version 10.2.0 on my platformio.ini via platform=nordicnrf52@10.2.0 but would love to avoid that in order to "keep up to date". Accordingly, I tried statically fixing the gcc toolchain in platform.py to the previously first "optionalVersion" (1.80201.0) which worked:
Since I am not too clear in how the build process works so I didn't dare to change/even find the "optionalVersions" priorization logic used, which probably is the actual reason for the seen issue.
Here is a PR to reduce the need for communication if you're fine with the quickfix / want to amke some changes directly to the code I suggest: #192
The text was updated successfully, but these errors were encountered:
CSC-Sendance
changed the title
Bug: Reintroduction of old GCC toolchain as optional version breaks arduino framework using ld's --wrap=realloc
Bug: Reintroduction of old GCC toolchain as optional version breaks adafruit arduino framework using ld's --wrap=realloc
Jan 17, 2024
Nevermind. The official releases work. The source of my issue apparently was that my custom framework fork was out of sync (still on 1.5.0 instead of 1.6.0) which caused the build system to download wrong dependencies plus some dependency caching issues due to that. Accordingly, I can close this as it can be ignored..
Experienced issue:
With the latest platform release v10.30.0 in combination with Arduino Framework v1.6.0, building breaks due to (now) unsupported (but previously supported) use of
--wrap=realloc
with the following error message when building:More details here: https://community.platformio.org/t/build-issue-with-wrap-realloc-after-latest-update-6-1-13
Possibly cause:
The Adafruit_nrf52_Arduino Framework uses --wrap=realloc in the compiler's ldflags (see https://github.com/adafruit/Adafruit_nRF52_Arduino/releases/tag/1.6.0 /-> adafruit/Adafruit_nRF52_Arduino#744 -> https://github.com/adafruit/Adafruit_nRF52_Arduino/pull/744/files ) in the latest release. However, in the platform's latest release 10.3.0 and this commit 9d461cf , gcc version "1.70201.0" was (re-?)introduced as "optionalVersion". Apparently, this causes pio to download this version instead of a more-up-to-date one (although there is no exception made in platform.py? maybe the "optionalVersion" priority is index-based rather than "take the most recent version" ? ). In turn, the above issue is the result.
Workarounds:
I was able to quickfix this issue by reverting to platform version 10.2.0 on my platformio.ini via
platform=nordicnrf52@10.2.0
but would love to avoid that in order to "keep up to date". Accordingly, I tried statically fixing the gcc toolchain inplatform.py
to the previously first "optionalVersion" (1.80201.0) which worked:(see CSC-Sendance@cd75bda )
Since I am not too clear in how the build process works so I didn't dare to change/even find the "optionalVersions" priorization logic used, which probably is the actual reason for the seen issue.
Here is a PR to reduce the need for communication if you're fine with the quickfix / want to amke some changes directly to the code I suggest: #192
The text was updated successfully, but these errors were encountered: