cfs-tools / cfs-basecamp

Provides a framework and tools for developing, downloading, and integrating core Flight System (cFS) applications into an operational system.
Other
24 stars 3 forks source link

Error when attempting to build #9

Open CPompey1 opened 1 year ago

CPompey1 commented 1 year ago
In file included from /home/user/workspace/cfs-basecamp/apps/osk_c_fw/fsw/app_inc/osk_c_fw.h:61,
                 from /home/user/workspace/cfs-basecamp/apps/osk_c_fw/fsw/app_inc/initbl.h:34,
                 from /home/user/workspace/cfs-basecamp/apps/osk_c_fw/fsw/app_inc/osk_c_fw.h:59,
                 from /home/user/workspace/cfs-basecamp/apps/file_mgr/fsw/src/app_cfg.h:45,
                 from /home/user/workspace/cfs-basecamp/apps/file_mgr/fsw/src/file.c:38:
/home/user/workspace/cfs-basecamp/apps/file_mgr/fsw/src/file.c: In function ‘FILE_SetPermissionsCmd’:
/home/user/workspace/cfs-basecamp/apps/osk_c_fw/fsw/app_inc/cmdmgr.h:56:49: error: cast increases required alignment of target type [-Werror=cast-align]
   56 | #define CMDMGR_PAYLOAD_PTR(buf_ptr, cmd_type) &((const cmd_type*)buf_ptr)->Payload
      |                                                 ^
/home/user/workspace/cfs-basecamp/apps/file_mgr/fsw/src/file.c:692:109: note: in expansion of macro ‘CMDMGR_PAYLOAD_PTR’
  692 | SetPermissionsCmd = (FILE_MGR_SetFilePermissions_Payload_t*)CMDMGR_PAYLOAD_PTR(MsgPtr, FILE_MGR_SetFilePermissions_t);
      |                                                             ^~~~~~~~~~~~~~~~~~

cc1: all warnings being treated as errors
make[7]: *** [apps/file_mgr/CMakeFiles/file_mgr.dir/build.make:95: apps/file_mgr/CMakeFiles/file_mgr.dir/fsw/src/file.c.o] Error 1
make[6]: *** [CMakeFiles/Makefile2:2270: apps/file_mgr/CMakeFiles/file_mgr.dir/all] Error 2
make[5]: *** [Makefile:160: all] Error 2
make[4]: *** [CMakeFiles/native_default_cpu1-install.dir/build.make:76: CMakeFiles/native_default_cpu1-install] Error 2
make[3]: *** [CMakeFiles/Makefile2:488: CMakeFiles/native_default_cpu1-install.dir/all] Error 2
make[2]: *** [CMakeFiles/Makefile2:549: CMakeFiles/mission-install.dir/rule] Error 2
make[1]: *** [Makefile:220: mission-install] Error 2
make: *** [Makefile:135: topicids] Error 2

Got this error when trying to build running make topicids. It seems like it has to do with misalignment of types. Any clues on how to fix this? I would really like to get this working

dmccomas commented 1 year ago

This comment is obsolete. Please see the 2/5/2024 comment below.

I assume you are on a Raspberry Pi and yes there is a work around. The pi-gpio-demo tutorial lesson 2 describes the workarounds needed to build on a Pi. The tutorial slides are png files so you don't need to view them from the Basecamp GUI. Unfortunately there's a catch-22 here because the GUI can't launch without a successful cFS build and in the case of the Pi the cFS doesn't currently build!

I'll add a note to Basecamp's home page. I've already written an issue on the cfe-eds-framework repo. A fix will need to be coordinated with the EDS toolchain.

hchesser commented 7 months ago

Hello, sorry for the zombie post here - I am having the same problem as CPompey1 - I am also looking around for this pi-gpio-demo tutorial lesson 2 and am having trouble finding that. I am working on a RPi 3B+, 32-bit Raspbian Bullseye.

Any updates on this?

dmccomas commented 7 months ago

My apologies on the earlier "pi-gpio-demo tutorial lesson 2" reference. The cFS Raspberry Pi LED Control Project replaced the built-in tutorial. I decided to restrict the built in tutorials to cover topics with the default Basecamp installation and use projects for everything else.