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

Build error #10

Open
johnbritto1 opened this issue Nov 27, 2020 · 1 comment
Open

Build error #10

johnbritto1 opened this issue Nov 27, 2020 · 1 comment

Comments

@johnbritto1
Copy link

root@vm:~/jail-shell# make
make -C jail-cmd all
make[1]: Entering directory '/root/jail-shell/jail-cmd'
cc -g -O2 -Werror -Wall -Wstrict-prototypes -fno-omit-frame-pointer -Wstrict-aliasing -c -o jail-cmd.o jail-cmd.c
In file included from /usr/include/string.h:495,
from jail-cmd.h:10,
from jail-cmd.c:5:
In function ‘strncpy’,
inlined from ‘cmd_init’ at jail-cmd.c:92:3:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound 32 equals destination size [-Werror=stringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [: jail-cmd.o] Error 1
make[1]: Leaving directory '/root/jail-shell/jail-cmd'
make: *** [Makefile:14: JAIL_CMD] Error 2

root@vm:~/jail-shell# lsb_release -a
No LSB modules are available.
Distributor ID: Linuxmint
Description: Linux Mint 20
Release: 20
Codename: ulyana

@KHIT93
Copy link

KHIT93 commented Dec 8, 2020

I can confirm this also behaves the same on plain Ubuntu 20.04 LTS 64-bit
Switching the default gcc 9.3.0 to 8.4.0 og 10.2.0 gies a different error message
Ubuntu 18.04 does however compile it with no errors

ubuntu@gracious-loach:/usr/local/src/jail-shell$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.1 LTS
Release:	20.04
Codename:	focal

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

No branches or pull requests

2 participants