fix(cbor): Fix build with picolibc (IEC-512)#718
fix(cbor): Fix build with picolibc (IEC-512)#718abobija wants to merge 1 commit intoespressif:masterfrom
Conversation
Build of project that uses `espressif/cbor^0.6.1~4` component fails with esp-idf v6.0+ using picolibc since picolibc does not have implementation of fopencookie function. By defining `__APPLE__` we are switching to picolibc supported `funopen` alternative.
|
|
|
@Lapshin PTAL |
|
@abobija , thanks for the PR.
Could you please elaborate on why it still needs to be enabled? |
|
@abobija , I thought that commit espressif/esp-idf@51f1861 exists for v6.0, but for some reason is present only in master branch. Will make a backport |
|
espressif/esp-idf@ae8d484 in release/v6.0 branch. It just did not add in time for v6.0 release. Should be released with bugfix version v6.0.1 |
Checklist
urlfield definedChange description
Build of project that uses
espressif/cbor^0.6.1~4component and picolibc (with idf v6+) fails since picolibc does not have implementation offopencookiefunction andcookie_io_functions_ttypedef.By defining
__APPLE__we are switching to picolibc supportedfunopenalternative that makes project successfully compiled on idf v6+ using picolibc. Note thatCONFIG_LIBC_PICOLIBC_NEWLIB_COMPATIBILITYstill needs to be enabled to compile with picolibc, even if we switch to__APPLE__.It would be nice if cbor component could work without defining
CONFIG_LIBC_PICOLIBC_NEWLIB_COMPATIBILITYand rely completely on picolibc without any hacks.I've opened a PR in origin tinycbor's repo as well to support picolibc, so maybe we will accomplish something:
intel/tinycbor#319
Maybe to wait if intel's tinycbor is going to support picolibc...