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

libfaketime compilation fails with gcc 8.1.0 #44

Closed
azmeuk opened this issue May 14, 2018 · 1 comment
Closed

libfaketime compilation fails with gcc 8.1.0 #44

azmeuk opened this issue May 14, 2018 · 1 comment

Comments

@azmeuk
Copy link
Contributor

azmeuk commented May 14, 2018

It seems compilation does not work with gcc 8.1.0.

$ gcc --version
gcc (GCC) 8.1.0

$ make -C libfaketime/vendor/libfaketime                                                                                                                                                                                                                                                                             
make: Entering directory '/home/eloi/dev/python-libfaketime/libfaketime/vendor/libfaketime'
make  -C src all
make[1]: Entering directory '/home/eloi/dev/python-libfaketime/libfaketime/vendor/libfaketime/src'
cc -o faketime -std=gnu99 -Wall -Wextra -Werror -Wno-nonnull-compare -fPIC -DPREFIX='"'/usr/local'"' -DLIBDIRNAME='"'/lib/faketime'"'  faketime.c -lpthread -Wl,--version-script=libfaketime.map -lrt
faketime.c: In function 'main':
faketime.c:289:45: error: '%s' directive output may be truncated writing up to 4095 bytes into a region of size between 0 and 4095 [-Werror=format-truncation=]
     snprintf(shared_objs, PATH_BUFSIZE, "%s %s", sem_name, shm_name);
                                             ^~             ~~~~~~~~
faketime.c:289:5: note: 'snprintf' output between 2 and 8192 bytes into a destination of size 4096
     snprintf(shared_objs, PATH_BUFSIZE, "%s %s", sem_name, shm_name);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:98: faketime] Error 1
make[1]: Leaving directory '/home/eloi/dev/python-libfaketime/libfaketime/vendor/libfaketime/src'
make: *** [Makefile:7: all] Error 2
make: Leaving directory '/home/eloi/dev/python-libfaketime/libfaketime/vendor/libfaketime'
@simon-weber
Copy link
Owner

I've pulled in wolfcw/libfaketime#161 to my fork to fix this.

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