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
{{ message }}
Repository navigation
Mac M1 CMake build failure: "variable 'i' set but not used" error in third-party/flatbuffers/src/idl_gen_rust.cpp #37
It seems like we're running into a situation where -Wall meant something different back when our snapshot of flatbuffers was written, vs. now. In the past 2.5 years(!) since https://github.com/google/flatbuffers/tree/338393f854eb5ba24761a22cd9316ff5cee4eab0, it seems like the -Wunused-but-set-variable warning was added to -Wall for mac compilers. So, when the code was originally built, it was probably fine when built with -Wall -Werror. But now -Wall trips on this problem.
I dug into the flatbuffer cmake file, but couldn't find any way to override their compiler flags: everything I did in our CMakeLists.txt just added our flags to the beginning of the commandline, meaning that their flags override ours.
To unblock yourself, you can edit the offending code to remove the variable, but this is going to be a pain for people who build on mac.
Possible solutions:
Try using a later snapshot of flatbuffers that doesn't trigger this warning. This might cause the API to change in a way that's incompatible with the Meta-internal snapshot that we use, but it would be worth finding a way to work around that in order to use the latest flatbuffer version.
Create a fork of flatbuffers with this patch, and point to it instead.
Activity
dbort commentedon Aug 4, 2023
It seems like we're running into a situation where
-Wallmeant something different back when our snapshot offlatbufferswas written, vs. now. In the past 2.5 years(!) since https://github.com/google/flatbuffers/tree/338393f854eb5ba24761a22cd9316ff5cee4eab0, it seems like the-Wunused-but-set-variablewarning was added to-Wallfor mac compilers. So, when the code was originally built, it was probably fine when built with-Wall -Werror. But now-Walltrips on this problem.I dug into the flatbuffer cmake file, but couldn't find any way to override their compiler flags: everything I did in our CMakeLists.txt just added our flags to the beginning of the commandline, meaning that their flags override ours.
To unblock yourself, you can edit the offending code to remove the variable, but this is going to be a pain for people who build on mac.
Possible solutions:
dbort commentedon Aug 5, 2023
Tracking internally with T160292470
[flatbuffers] Update to flatbuffers v23.5.26
[flatbuffers] Update to flatbuffers v23.5.26
[flatbuffers] Update to flatbuffers v23.5.26
dbort commentedon Aug 17, 2023
Fixed by c351717
prefill model
prefill model (pytorch#5807)
prefill model (pytorch#5807)
Merge pull request pytorch#37 from cavusmustafa/fix_merge_conflicts
Refactor Android Example for Dynamic Image Segmentation (#37)
Fix multiple XNNPACK compiler security issues (#35, #36, #37, #39, #41,