Closed Eroc33 closed 2 years ago
Thanks for the report @Eroc33, it's much appreciated! Sorry for the delay in getting to this.
The lstat
fix is simple, as will be fixed in esp-idf in future releases, for now I have also patched it into esp-idf-sys
, see https://github.com/esp-rs/esp-idf-sys/pull/75.
ftruncate
is a bit more intricate, and will take a bit more time to get a patch prepared.
Hi @Eroc33, ftruncate
is now implemented in esp-idf (backport to v4.4 will be available soon) which should solve the issues you've encountered. Thanks for your patience!
std::fs::File.set_len
/ftruncate
When using
std::fs::File.set_len
anywhere in the project a link error occurs referencingftruncate
:Relevant excerpt
Full build output
Repro project https://github.com/Eroc33/esp-idf-ftruncate-link-bug-repro
std::fs::symlink_metadata
/lstat
When using
std::fs::symlink_metadata
anywhere in the project a link error occurs referencinglstat
:Relevant excerpt
Full build output
Repro project: https://github.com/Eroc33/esp-idf-lstat-link-bug-repro
As far as I can tell
ftruncate
andlstat
simply don't exist in the esp-idf, so would need to be implemented there, or the libstd code that calls them would have to be implemented in terms of some other idf functions(I saw these results when building using the pio option of embuild on WSL2/Ubuntu-20.04, but I think it should be the same on any configuration)