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

Compile Error #485

Closed
dhje0ng opened this issue May 11, 2023 · 3 comments · Fixed by #499
Closed

Compile Error #485

dhje0ng opened this issue May 11, 2023 · 3 comments · Fixed by #499

Comments

@dhje0ng
Copy link

dhje0ng commented May 11, 2023

Hello,
I am trying to build the dlt-daemon project for version 2.18.9, but I am getting the following compilation error.

Is there any way to resolve this?

My build environment looks like this

NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"

In file included from /usr/include/string.h:495,
                 from /home/dhjeong/dlt-daemon-2.18.9/src/console/dlt-control-common.c:56:
In function ‘strncpy’,
    inlined from ‘set_ecuid’ at /home/dhjeong/dlt-daemon-2.18.9/src/console/dlt-control-common.c:126:17:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound 10 equals destination size [-Werror=stringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [src/console/logstorage/CMakeFiles/dlt-logstorage-ctrl.dir/build.make:102: src/console/logstorage/CMakeFiles/dlt-logstorage-ctrl.dir/__/dlt-control-common.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:599: src/console/logstorage/CMakeFiles/dlt-logstorage-ctrl.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
@dhje0ng dhje0ng closed this as completed May 11, 2023
@dhje0ng dhje0ng reopened this May 11, 2023
@dhje0ng dhje0ng closed this as completed May 11, 2023
@CloudyTwentyFour
Copy link

Any updates on this error. even i am stuck with same issue

@michael-methner
Copy link
Collaborator

Hello @CloudyTwentyFour ,
please try the changes in #499
It seems to be an issue with that compiler version. Newer GCC's seem not to complain about this..

@CloudyTwentyFour
Copy link

Thanks @michael-methner it worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants