flipperzero-firmware
flipperzero-firmware copied to clipboard
`compilesort.hpp` missing from 0.80.1 SDK archive
Describe the bug.
When attempting to generate Rust bindings for the 0.80.1 release using flipper-z-f7-sdk-0.80.1.zip, I get an error because lib/flipper_application/api_hashtable/compilesort.hpp is not found in the SDK archive.
The current way bindings are generated is by pulling in all public (+) headers listed in api_symbols.csv. Thus if a file is missing from flipper-z-f7-sdk-x.x.x.zip, it won't be possible to generate bindings.
This can be worked around by manually copying the file from the git tree.
Reproduction
- Download
flipper-z-f7-sdk-0.80.1.zipfrom update.flipperzero.one - Run
generate-bindingsscript as specified in theflipperzero-rsdocumentation - Observe the script fails due to being unable to find
lib/flipper_application/api_hashtable/compilesort.hpp
Target
f7
Logs
PS> target\debug\generate-bindings.exe ..\..\flipperzero-firmware\build\f7-firmware-D\sdk
Generating bindings for SDK 00140000
warning: optimization flag '-fsingle-precision-constant' is not supported [-Wignored-optimization-argument]
C:\Users\dcoles\workspace\flipperzero-rs\tools\header.h:114:10: fatal error: 'lib/flipper_application/api_hashtable/compilesort.hpp' file not found
clang diag: warning: optimization flag '-fsingle-precision-constant' is not supported [-Wignored-optimization-argument]
clang diagnosed error: C:\Users\dcoles\workspace\flipperzero-rs\tools\header.h:114:10: fatal error: 'lib/flipper_application/api_hashtable/compilesort.hpp' file not found
thread 'main' panicked at 'failed to generate bindings', src\bin\generate-bindings.rs:217:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Anything else?
I could skip including any headers listed in api_symbols.csv if the matching header isn't found in the SDK directory, but this might result in bindings not being generated for all public symbols.
Let me know if that should be the correct behaviour.
Will be fixed in next release.
@dcoles should be fixed in dev & latest RC. SDK structure has changed too.
@hedger Thanks! I'll also take a look at whether the new SDK structure will be a problem (at worst, I might have to tweak the binding generation script).
Should be fixed a few releases ago.