Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fails to build on Raspbian #31

Closed
CDKnightNASA opened this issue Jan 29, 2020 · 1 comment · Fixed by #33 or #36
Closed

fails to build on Raspbian #31

CDKnightNASA opened this issue Jan 29, 2020 · 1 comment · Fixed by #33 or #36
Assignees
Labels
bug Something isn't working
Milestone

Comments

@CDKnightNASA
Copy link
Contributor

Describe the bug
Building sch_lab under Raspbian (a Debian variant for Raspberry Pi SBC's) fails due to alignment issues.

/home/pi/cFS/apps/sch_lab/fsw/src/sch_lab_app.c: In function ‘SCH_Lab_AppMain’:
/home/pi/cFS/apps/sch_lab/fsw/src/sch_lab_app.c:115:42: error: cast increases required alignment of target type [-Werror=cast-align]
                           CFE_SB_SendMsg((CFE_SB_MsgPtr_t)&SCH_CmdHeaderTable[i]);
                                          ^

To Reproduce
Build on Raspbian.

Expected behavior
Error-free compile.

Code snips
If applicable, add references to the software.

System observed on:
Raspberry Pi Zero W.

Additional context
Add any other context about the problem here.

Reporter Info
Christopher.D.Knight@nasa.gov

@CDKnightNASA CDKnightNASA self-assigned this Jan 29, 2020
@jphickey
Copy link
Contributor

As in the other apps, I have some fixes which are related to nasa/cFE#313 and feel free to assign this to me and just turn off -Wcast-align in your RPi build for now.

jphickey added a commit to jphickey/sch_lab that referenced this issue Feb 10, 2020
Use a union type to allocate the message buffers to ensure
it is aligned properly for a CFE_SB_Msg_t type.
jphickey added a commit to jphickey/sch_lab that referenced this issue Feb 11, 2020
This reflects general issues/patches to the upstream repository that
need to be resolved for EDS support
jphickey added a commit to jphickey/sch_lab that referenced this issue Mar 2, 2020
Use a union type to allocate the message buffers to ensure
it is aligned properly for a CFE_SB_Msg_t type.
astrogeco pushed a commit that referenced this issue Mar 9, 2020
Use a union type to allocate the message buffers to ensure
it is aligned properly for a CFE_SB_Msg_t type.
@astrogeco astrogeco mentioned this issue Mar 10, 2020
@astrogeco astrogeco linked a pull request Mar 10, 2020 that will close this issue
@astrogeco astrogeco added the bug Something isn't working label Oct 1, 2020
@astrogeco astrogeco added this to the 2.4.0 milestone Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants