Closed jphickey closed 2 years ago
I wouldn't mind tackling this, however I am having trouble replicating the issue. I'm using the same version of GCC on Pop!_OS, but building OSAL standalone doesn't seem to output any errors. My method of building is the one listed in the OSAL Configuration Guide:
$ mkdir build
$ cd build
$ cmake \
-DCMAKE_BUILD_TYPE=debug \
-DENABLE_UNIT_TESTS=true \
-DOSAL_SYSTEM_BSPTYPE=generic-linux \
-DOSAL_CONFIG_DEBUG_PERMISSIVE_MODE=true \
/path/to/osal/source
$ make
I also tried adding -DOSAL_USER_C_FLAGS=-Werror
but this didn't seem to provide any error output either.
My guess is these warnings were observed when compiling OSAL from within the bundle context (https://github.com/nasa/cFS). There's additional warnings enabled here (if/when you copy in the sample_defs to the bundle context): https://github.com/nasa/cFE/blob/c161cf04fe7c5fd2f2a533ac1d7522b31191eab6/cmake/sample_defs/arch_build_custom.cmake#L28-L37
It requires a very recent version of GCC (11+). IIRC Pop OS is based on 20.04 so that's too old.
I actually have fix already, I patched it up so I could build on this system (Ubuntu 21.10), but haven't made a PR yet.
Oh ok, yeah I have the latest version of GCC but I wasn't building as part of the bundle. Thanks for the clarification!
Describe the bug The newer versions of GCC report new warnings. These appear to be mostly false alarms, but easy to fix nonetheless.
To Reproduce Build OSAL using recent GCC
Expected behavior Should compile without warnings or errors
Code snips
System observed on: Ubuntu 21.10, gcc 11.2.0
Reporter Info Joseph Hickey, Vantage Systems, Inc.