-
Notifications
You must be signed in to change notification settings - Fork 74
Description
Describe the bug
2.1.11 fails to build on RHEL 7.8, due to endianness macros, as part of cFS build, with or without devtoolset-9:
[ 14%] Building C object tools/cFS-GroundSystem/Subsystems/cmdUtil/CMakeFiles/cmdUtil.dir/cmdUtil.c.o
cd /tmp/cFS/build/tools/cFS-GroundSystem/Subsystems/cmdUtil && /opt/rh/devtoolset-9/root/usr/bin/cc -D_XOPEN_SOURCE=600 -g -std=c99 -pedantic -Wall -Wstrict-prototypes -Wwrite-strings -Wpointer-arith -Wcast-align -Werror -o CMakeFiles/cmdUtil.dir/cmdUtil.c.o -c /tmp/cFS/tools/cFS-GroundSystem/Subsystems/cmdUtil/cmdUtil.c
/tmp/cFS/tools/cFS-GroundSystem/Subsystems/cmdUtil/cmdUtil.c: In function ‘ProcessField’:
/tmp/cFS/tools/cFS-GroundSystem/Subsystems/cmdUtil/cmdUtil.c:370:13: error: implicit declaration of function ‘htobe16’ [-Werror=implicit-function-declaration]
370 | *orig = htobe16((be16toh(*orig) & ~mask) | (templong & mask));
| ^~~~~~~
/tmp/cFS/tools/cFS-GroundSystem/Subsystems/cmdUtil/cmdUtil.c:370:22: error: implicit declaration of function ‘be16toh’ [-Werror=implicit-function-declaration]
370 | *orig = htobe16((be16toh(*orig) & ~mask) | (templong & mask));
| ^~~~~~~
/tmp/cFS/tools/cFS-GroundSystem/Subsystems/cmdUtil/cmdUtil.c: In function ‘main’:
/tmp/cFS/tools/cFS-GroundSystem/Subsystems/cmdUtil/cmdUtil.c:666:33: error: implicit declaration of function ‘htole16’ [-Werror=implicit-function-declaration]
666 | tempint16 = htole16(tempint16);
| ^~~~~~~
/tmp/cFS/tools/cFS-GroundSystem/Subsystems/cmdUtil/cmdUtil.c:708:33: error: implicit declaration of function ‘htobe32’ [-Werror=implicit-function-declaration]
708 | tempint32 = htobe32(tempint32);
| ^~~~~~~
/tmp/cFS/tools/cFS-GroundSystem/Subsystems/cmdUtil/cmdUtil.c:710:33: error: implicit declaration of function ‘htole32’ [-Werror=implicit-function-declaration]
710 | tempint32 = htole32(tempint32);
| ^~~~~~~
/tmp/cFS/tools/cFS-GroundSystem/Subsystems/cmdUtil/cmdUtil.c:752:33: error: implicit declaration of function ‘htobe64’ [-Werror=implicit-function-declaration]
752 | tempint64 = htobe64(tempint64);
| ^~~~~~~
/tmp/cFS/tools/cFS-GroundSystem/Subsystems/cmdUtil/cmdUtil.c:754:33: error: implicit declaration of function ‘htole64’ [-Werror=implicit-function-declaration]
754 | tempint64 = htole64(tempint64);
| ^~~~~~~
cc1: all warnings being treated as errors
To Reproduce
Build CFS GroundSystem on RHEL 7.8 as part of the cFS build. However, using the cmdUtil makefile works fine.
Expected behavior
Build completes correctly as part of cFS makefile build
System observed on:
- OS: RHEL 7.8
- Versions : cFS-GroundSystem 2.1.11
Additional context
This is apparently fixed by changing the macro defined at the top of cmdUtil.c from #define _BSD_SOURCE_ to #define _BSD_SOURCE
Reporter Info
John N Pham, Northrop Grumman
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working