robertostling/eflomal

Build error on Ubuntu 14.04

Closed this issue · 1 comments

Dear Robert,
after installed the required dependencies, then build Elomal, I have run the Python install script:

$ sudo python3 setup.py install
running install
Checking .pth file support in /usr/local/lib/python3.4/dist-packages/
/usr/bin/python3 -E -c pass
TEST PASSED: /usr/local/lib/python3.4/dist-packages/ appears to support .pth files
running bdist_egg
running egg_info
creating eflomal.egg-info
writing requirements to eflomal.egg-info/requires.txt
writing eflomal.egg-info/PKG-INFO
writing dependency_links to eflomal.egg-info/dependency_links.txt
writing top-level names to eflomal.egg-info/top_level.txt
writing manifest file 'eflomal.egg-info/SOURCES.txt'
reading manifest file 'eflomal.egg-info/SOURCES.txt'
writing manifest file 'eflomal.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_ext
building 'eflomal' extension
creating build
creating build/temp.linux-x86_64-3.4
creating build/temp.linux-x86_64-3.4/python
creating build/temp.linux-x86_64-3.4/python/eflomal
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/lib/python3/dist-packages/numpy/core/include -I/usr/include/python3.4m -c python/eflomal/eflomal.c -o build/temp.linux-x86_64-3.4/python/eflomal/eflomal.o
In file included from /usr/lib/python3/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1761:0,
from /usr/lib/python3/dist-packages/numpy/core/include/numpy/ndarrayobject.h:17,
from /usr/lib/python3/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
from python/eflomal/eflomal.c:353:
/usr/lib/python3/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by "
^
python/eflomal/eflomal.c: In function ‘__pyx_f_7eflomal_write_text’:
python/eflomal/eflomal.c:2328:7: error: format not a string literal and no format arguments [-Werror=format-security]
fprintf(__pyx_v_f, __pyx_k_0);
^
...
At the end, the script failed with exit status 1

gcc version 4.8.4
Thank you for help, best, Philippe

I'm not sure if this is due to a difference in your gcc version or in Cython, but I can't reproduce it. The fix I just commited should replace the fprintf call with a safer fputc, but please re-open in case the same problem appears elsewhere.