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
When attempting to compile using "scons -j$(nproc)" in Ubuntu 21.10 the warning "error: variable '...' set but not used [-Werror,-Wunused-but-set-variable]" is encountered in many places throughout the code (the first few are in cereal).
I am not familiar enough with the code to "fix" the underlying issue.
Applying the annotation __attribute__((__unused__)) to the instances does resolve the error, but requires changes across multiple repos (may be unavoidable...)
A "quick" workaround is to add the following to the root SConstruct file around line 192 (CCFLAGS list)
"-Wno-error=unused-but-set-variable",
This however leads to more errors - still diagnosing...
JMPZ11
changed the title
Compilation fails in Ubuntu 21.10 due to clang++ version behavior change (unused-but-set-variable)
Compilation fails in Ubuntu 21.10 presumably due to clang version behavior change
Nov 17, 2021
Describe the bug
When attempting to compile using "scons -j$(nproc)" in Ubuntu 21.10 the warning "error: variable '...' set but not used [-Werror,-Wunused-but-set-variable]" is encountered in many places throughout the code (the first few are in cereal).
Workarounds are described here: https://gcc.gnu.org/gcc-4.6/porting_to.html
I am not familiar enough with the code to "fix" the underlying issue.
Applying the annotation
__attribute__((__unused__))
to the instances does resolve the error, but requires changes across multiple repos (may be unavoidable...)A "quick" workaround is to add the following to the root SConstruct file around line 192 (CCFLAGS list)
"-Wno-error=unused-but-set-variable",
This however leads to more errors - still diagnosing...
OS Version
Ubuntu 21.10
openpilot version or commit
f1c77f9
Additional info
No response
The text was updated successfully, but these errors were encountered: