Build failure on Linux with gcc 4.7.2 and brotli 0.2.0 #55

Closed
opened 2026-01-29 20:30:19 +00:00 by claunia · 2 comments
Owner

Originally created by @GuillaumeRossolini on GitHub (Oct 12, 2015).

With Python 2.7.3:

python setup.py build
running build
running build_ext
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/dec
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c dec/bit_reader.c -o build/temp.linux-x86_64-2.7/dec/bit_reader.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c dec/decode.c -o build/temp.linux-x86_64-2.7/dec/decode.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c dec/huffman.c -o build/temp.linux-x86_64-2.7/dec/huffman.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c dec/streams.c -o build/temp.linux-x86_64-2.7/dec/streams.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c dec/state.c -o build/temp.linux-x86_64-2.7/dec/state.o
creating build/temp.linux-x86_64-2.7/python
creating build/temp.linux-x86_64-2.7/enc
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c python/brotlimodule.cc -o build/temp.linux-x86_64-2.7/python/brotlimodule.o -std=c++0x
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
python/brotlimodule.cc:2:20: fatal error: Python.h: Aucun fichier ou dossier de ce type
compilation terminated.
error: command 'gcc' failed with exit status 1

With Python 3.2.3:

python3 setup.py build
running build
running build_ext
creating build/temp.linux-x86_64-3.2
creating build/temp.linux-x86_64-3.2/dec
gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -I/usr/include/python3.2mu -c dec/bit_reader.c -o build/temp.linux-x86_64-3.2/dec/bit_reader.o
gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -I/usr/include/python3.2mu -c dec/decode.c -o build/temp.linux-x86_64-3.2/dec/decode.o
gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -I/usr/include/python3.2mu -c dec/huffman.c -o build/temp.linux-x86_64-3.2/dec/huffman.o
gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -I/usr/include/python3.2mu -c dec/streams.c -o build/temp.linux-x86_64-3.2/dec/streams.o
gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -I/usr/include/python3.2mu -c dec/state.c -o build/temp.linux-x86_64-3.2/dec/state.o
creating build/temp.linux-x86_64-3.2/python
creating build/temp.linux-x86_64-3.2/enc
gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -I/usr/include/python3.2mu -c python/brotlimodule.cc -o build/temp.linux-x86_64-3.2/python/brotlimodule.o -std=c++0x
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
python/brotlimodule.cc:2:20: fatal error: Python.h: Aucun fichier ou dossier de ce type
compilation terminated.
error: command 'gcc' failed with exit status 1

If you need any more details, please ask.
Thanks,

Originally created by @GuillaumeRossolini on GitHub (Oct 12, 2015). ## With Python 2.7.3: `python setup.py build` running build running build_ext creating build creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/dec gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c dec/bit_reader.c -o build/temp.linux-x86_64-2.7/dec/bit_reader.o gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c dec/decode.c -o build/temp.linux-x86_64-2.7/dec/decode.o gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c dec/huffman.c -o build/temp.linux-x86_64-2.7/dec/huffman.o gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c dec/streams.c -o build/temp.linux-x86_64-2.7/dec/streams.o gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c dec/state.c -o build/temp.linux-x86_64-2.7/dec/state.o creating build/temp.linux-x86_64-2.7/python creating build/temp.linux-x86_64-2.7/enc gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c python/brotlimodule.cc -o build/temp.linux-x86_64-2.7/python/brotlimodule.o -std=c++0x cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default] python/brotlimodule.cc:2:20: fatal error: Python.h: Aucun fichier ou dossier de ce type compilation terminated. error: command 'gcc' failed with exit status 1 ## With Python 3.2.3: `python3 setup.py build` running build running build_ext creating build/temp.linux-x86_64-3.2 creating build/temp.linux-x86_64-3.2/dec gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -I/usr/include/python3.2mu -c dec/bit_reader.c -o build/temp.linux-x86_64-3.2/dec/bit_reader.o gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -I/usr/include/python3.2mu -c dec/decode.c -o build/temp.linux-x86_64-3.2/dec/decode.o gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -I/usr/include/python3.2mu -c dec/huffman.c -o build/temp.linux-x86_64-3.2/dec/huffman.o gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -I/usr/include/python3.2mu -c dec/streams.c -o build/temp.linux-x86_64-3.2/dec/streams.o gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -I/usr/include/python3.2mu -c dec/state.c -o build/temp.linux-x86_64-3.2/dec/state.o creating build/temp.linux-x86_64-3.2/python creating build/temp.linux-x86_64-3.2/enc gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -I/usr/include/python3.2mu -c python/brotlimodule.cc -o build/temp.linux-x86_64-3.2/python/brotlimodule.o -std=c++0x cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default] python/brotlimodule.cc:2:20: fatal error: Python.h: Aucun fichier ou dossier de ce type compilation terminated. error: command 'gcc' failed with exit status 1 If you need any more details, please ask. Thanks,
Author
Owner

@eustas commented on GitHub (Oct 13, 2015):

Hello

You need to install python headers first:

  • sudo apt-get install python-dev
  • sudo apt-get install python3-dev

Best regards,
Eugene.

@eustas commented on GitHub (Oct 13, 2015): Hello You need to install python headers first: - sudo apt-get install python-dev - sudo apt-get install python3-dev Best regards, Eugene.
Author
Owner

@GuillaumeRossolini commented on GitHub (Oct 13, 2015):

Thanks!

@GuillaumeRossolini commented on GitHub (Oct 13, 2015): Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#55