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

strncpy triggers a build failure in Ubuntu Focal release builds #1016

Closed
astrogeco opened this issue Nov 16, 2020 · 0 comments · Fixed by #1018 or #1027
Closed

strncpy triggers a build failure in Ubuntu Focal release builds #1016

astrogeco opened this issue Nov 16, 2020 · 0 comments · Fixed by #1018 or #1027
Assignees
Labels
Milestone

Comments

@astrogeco
Copy link
Contributor

astrogeco commented Nov 16, 2020

Describe the issue

make install fails on Focal RELEASE builds

https://travis-ci.com/github/astrogeco/cFS/builds/201379042

In file included from /usr/include/string.h:495,

                 from /home/travis/build/astrogeco/cFS/cfe/fsw/cfe-core/src/es/cfe_es_apps.c:49:

In function ‘strncpy’,

    inlined from ‘CFE_ES_StartAppTask’ at /home/travis/build/astrogeco/cFS/cfe/fsw/cfe-core/src/es/cfe_es_apps.c:554:9:

/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ output may be truncated copying 19 bytes from a string of length 19 [-Werror=stringop-truncation]

  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));

      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

cc1: all warnings being treated as errors

Originally posted by @astrogeco in nasa/cFS#156 (comment)

Alternative Solution

Use Ubuntu Bionic for builds instead

@astrogeco astrogeco added the bug label Nov 16, 2020
@skliper skliper added this to the 7.0.0 milestone Nov 16, 2020
jphickey added a commit to jphickey/cFE that referenced this issue Nov 16, 2020
Add an extra write of a null char which squelches a warning.
astrogeco added a commit that referenced this issue Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants