aiortc / aiortc

WebRTC and ORTC implementation for Python using asyncio
BSD 3-Clause "New" or "Revised" License
4.27k stars 764 forks source link

Error while installing aiortc with pip3 #355

Closed riccardobrue closed 4 years ago

riccardobrue commented 4 years ago

Hi, I am facing an error while installing aiortc on a Debian distribution (i.MX6 processor) with Python 3.7.3. This is the complete log. (I have installed this libraty on another similar PC without any issue).

Installation command: pip3 install aiortc

ERROR: Command errored out with exit status 1: command: /usr/local/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-l_mhu32x/av/setup.py'"'"'; file='"'"'/tmp/pip-install-l_mhu32x/av/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-dmo4yr_e/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7m/av cwd: /tmp/pip-install-l_mhu32x/av/ Complete output (153 lines): running install running build running build_py creating build creating build/lib.linux-armv7l-3.7 creating build/lib.linux-armv7l-3.7/av copying av/datasets.py -> build/lib.linux-armv7l-3.7/av copying av/main.py -> build/lib.linux-armv7l-3.7/av copying av/deprecation.py -> build/lib.linux-armv7l-3.7/av copying av/init.py -> build/lib.linux-armv7l-3.7/av creating build/lib.linux-armv7l-3.7/av/sidedata copying av/sidedata/init.py -> build/lib.linux-armv7l-3.7/av/sidedata creating build/lib.linux-armv7l-3.7/av/codec copying av/codec/init.py -> build/lib.linux-armv7l-3.7/av/codec creating build/lib.linux-armv7l-3.7/av/container copying av/container/init.py -> build/lib.linux-armv7l-3.7/av/container creating build/lib.linux-armv7l-3.7/av/data copying av/data/init.py -> build/lib.linux-armv7l-3.7/av/data creating build/lib.linux-armv7l-3.7/av/filter copying av/filter/init.py -> build/lib.linux-armv7l-3.7/av/filter creating build/lib.linux-armv7l-3.7/av/audio copying av/audio/init.py -> build/lib.linux-armv7l-3.7/av/audio creating build/lib.linux-armv7l-3.7/av/video copying av/video/init.py -> build/lib.linux-armv7l-3.7/av/video creating build/lib.linux-armv7l-3.7/av/subtitles copying av/subtitles/init.py -> build/lib.linux-armv7l-3.7/av/subtitles running build_ext running config PyAV: 8.0.1 (unknown commit) Python: 3.7.3 (default, May 7 2020, 10:38:29) \n[GCC 6.3.0 20170516] platform: Linux-4.9.11-02298-g46a5cab-dirty-armv7l-with-debian-9.4 extension_extra: include_dirs: [b'include', b'/usr/include/arm-linux-gnueabihf'] libraries: [b'avformat', b'avcodec', b'avdevice', b'avutil', b'avfilter', b'swscale', b'swresample'] library_dirs: [] define_macros: [] runtime_library_dirs: [] config_macros: PYAV_COMMIT_STR="unknown-commit" PYAV_VERSION=8.0.1 PYAV_VERSION_STR="8.0.1" writing build/temp.linux-armv7l-3.7/include/pyav/config.h running cythonize building 'av.dictionary' extension creating build/temp.linux-armv7l-3.7/src creating build/temp.linux-armv7l-3.7/src/av gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.7m -I/usr/include/arm-linux-gnueabihf -Iinclude -Ibuild/temp.linux-armv7l-3.7/include -I/usr/local/include/python3.7m -Ibuild/temp.linux-armv7l-3.7/include -c src/av/dictionary.c -o build/temp.linux-armv7l-3.7/src/av/dictionary.o gcc -pthread -shared build/temp.linux-armv7l-3.7/src/av/dictionary.o -lavutil -lavdevice -lavfilter -lswscale -lswresample -lavformat -lavcodec -o build/lib.linux-armv7l-3.7/av/dictionary.cpython-37m-arm-linux-gnueabihf.so building 'av.format' extension gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.7m -I/usr/include/arm-linux-gnueabihf -Iinclude -Ibuild/temp.linux-armv7l-3.7/include -I/usr/local/include/python3.7m -Ibuild/temp.linux-armv7l-3.7/include -c src/av/format.c -o build/temp.linux-armv7l-3.7/src/av/format.o src/av/format.c: In function ‘pyx_f_2av_6format_find_output_format’: src/av/format.c:3103:19: warning: implicit declaration of function ‘av_muxer_iterate’ [-Wimplicit-function-declaration] pyx_v_ptr = av_muxer_iterate((&pyx_v_opaque)); ^~~~ src/av/format.c:3103:17: warning: assignment makes pointer from integer without a cast [-Wint-conversion] pyx_v_ptr = av_muxer_iterate((&pyx_v_opaque)); ^ src/av/format.c: In function ‘pyx_f_2av_6format_get_output_format_names’: src/av/format.c:3251:17: warning: assignment makes pointer from integer without a cast [-Wint-conversion] pyx_v_ptr = av_muxer_iterate((&pyx_v_opaque)); ^ src/av/format.c: In function ‘pyx_f_2av_6format_get_input_format_names’: src/av/format.c:3387:19: warning: implicit declaration of function ‘av_demuxer_iterate’ [-Wimplicit-function-declaration] pyx_v_ptr = av_demuxer_iterate((&pyx_v_opaque)); ^~~~~~ src/av/format.c:3387:17: warning: assignment makes pointer from integer without a cast [-Wint-conversion] pyx_v_ptr = av_demuxer_iterate((&pyx_v_opaque)); ^ gcc -pthread -shared build/temp.linux-armv7l-3.7/src/av/format.o -lavutil -lavdevice -lavfilter -lswscale -lswresample -lavformat -lavcodec -o build/lib.linux-armv7l-3.7/av/format.cpython-37m-arm-linux-gnueabihf.so building 'av.error' extension gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.7m -I/usr/include/arm-linux-gnueabihf -Iinclude -Ibuild/temp.linux-armv7l-3.7/include -I/usr/local/include/python3.7m -Ibuild/temp.linux-armv7l-3.7/include -c src/av/error.c -o build/temp.linux-armv7l-3.7/src/av/error.o gcc -pthread -shared build/temp.linux-armv7l-3.7/src/av/error.o -lavutil -lavdevice -lavfilter -lswscale -lswresample -lavformat -lavcodec -o build/lib.linux-armv7l-3.7/av/error.cpython-37m-arm-linux-gnueabihf.so building 'av.enum' extension gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.7m -I/usr/include/arm-linux-gnueabihf -Iinclude -Ibuild/temp.linux-armv7l-3.7/include -I/usr/local/include/python3.7m -Ibuild/temp.linux-armv7l-3.7/include -c src/av/enum.c -o build/temp.linux-armv7l-3.7/src/av/enum.o gcc -pthread -shared build/temp.linux-armv7l-3.7/src/av/enum.o -lavutil -lavdevice -lavfilter -lswscale -lswresample -lavformat -lavcodec -o build/lib.linux-armv7l-3.7/av/enum.cpython-37m-arm-linux-gnueabihf.so building 'av.bytesource' extension gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.7m -I/usr/include/arm-linux-gnueabihf -Iinclude -Ibuild/temp.linux-armv7l-3.7/include -I/usr/local/include/python3.7m -Ibuild/temp.linux-armv7l-3.7/include -c src/av/bytesource.c -o build/temp.linux-armv7l-3.7/src/av/bytesource.o gcc -pthread -shared build/temp.linux-armv7l-3.7/src/av/bytesource.o -lavutil -lavdevice -lavfilter -lswscale -lswresample -lavformat -lavcodec -o build/lib.linux-armv7l-3.7/av/bytesource.cpython-37m-arm-linux-gnueabihf.so building 'av.option' extension gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.7m -I/usr/include/arm-linux-gnueabihf -Iinclude -Ibuild/temp.linux-armv7l-3.7/include -I/usr/local/include/python3.7m -Ibuild/temp.linux-armv7l-3.7/include -c src/av/option.c -o build/temp.linux-armv7l-3.7/src/av/option.o gcc -pthread -shared build/temp.linux-armv7l-3.7/src/av/option.o -lavutil -lavdevice -lavfilter -lswscale -lswresample -lavformat -lavcodec -o build/lib.linux-armv7l-3.7/av/option.cpython-37m-arm-linux-gnueabihf.so building 'av.frame' extension gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.7m -I/usr/include/arm-linux-gnueabihf -Iinclude -Ibuild/temp.linux-armv7l-3.7/include -I/usr/local/include/python3.7m -Ibuild/temp.linux-armv7l-3.7/include -c src/av/frame.c -o build/temp.linux-armv7l-3.7/src/av/frame.o gcc -pthread -shared build/temp.linux-armv7l-3.7/src/av/frame.o -lavutil -lavdevice -lavfilter -lswscale -lswresample -lavformat -lavcodec -o build/lib.linux-armv7l-3.7/av/frame.cpython-37m-arm-linux-gnueabihf.so building 'av.utils' extension gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.7m -I/usr/include/arm-linux-gnueabihf -Iinclude -Ibuild/temp.linux-armv7l-3.7/include -I/usr/local/include/python3.7m -Ibuild/temp.linux-armv7l-3.7/include -c src/av/utils.c -o build/temp.linux-armv7l-3.7/src/av/utils.o gcc -pthread -shared build/temp.linux-armv7l-3.7/src/av/utils.o -lavutil -lavdevice -lavfilter -lswscale -lswresample -lavformat -lavcodec -o build/lib.linux-armv7l-3.7/av/utils.cpython-37m-arm-linux-gnueabihf.so building 'av.packet' extension gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.7m -I/usr/include/arm-linux-gnueabihf -Iinclude -Ibuild/temp.linux-armv7l-3.7/include -I/usr/local/include/python3.7m -Ibuild/temp.linux-armv7l-3.7/include -c src/av/packet.c -o build/temp.linux-armv7l-3.7/src/av/packet.o gcc -pthread -shared build/temp.linux-armv7l-3.7/src/av/packet.o -lavutil -lavdevice -lavfilter -lswscale -lswresample -lavformat -lavcodec -o build/lib.linux-armv7l-3.7/av/packet.cpython-37m-arm-linux-gnueabihf.so building 'av._core' extension gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.7m -I/usr/include/arm-linux-gnueabihf -Iinclude -Ibuild/temp.linux-armv7l-3.7/include -I/usr/local/include/python3.7m -Ibuild/temp.linux-armv7l-3.7/include -c src/av/_core.c -o build/temp.linux-armv7l-3.7/src/av/_core.o gcc -pthread -shared build/temp.linux-armv7l-3.7/src/av/_core.o -lavutil -lavdevice -lavfilter -lswscale -lswresample -lavformat -lavcodec -o build/lib.linux-armv7l-3.7/av/_core.cpython-37m-arm-linux-gnueabihf.so building 'av.descriptor' extension gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.7m -I/usr/include/arm-linux-gnueabihf -Iinclude -Ibuild/temp.linux-armv7l-3.7/include -I/usr/local/include/python3.7m -Ibuild/temp.linux-armv7l-3.7/include -c src/av/descriptor.c -o build/temp.linux-armv7l-3.7/src/av/descriptor.o gcc -pthread -shared build/temp.linux-armv7l-3.7/src/av/descriptor.o -lavutil -lavdevice -lavfilter -lswscale -lswresample -lavformat -lavcodec -o build/lib.linux-armv7l-3.7/av/descriptor.cpython-37m-arm-linux-gnueabihf.so building 'av.buffer' extension gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.7m -I/usr/include/arm-linux-gnueabihf -Iinclude -Ibuild/temp.linux-armv7l-3.7/include -I/usr/local/include/python3.7m -Ibuild/temp.linux-armv7l-3.7/include -c src/av/buffer.c -o build/temp.linux-armv7l-3.7/src/av/buffer.o gcc -pthread -shared build/temp.linux-armv7l-3.7/src/av/buffer.o -lavutil -lavdevice -lavfilter -lswscale -lswresample -lavformat -lavcodec -o build/lib.linux-armv7l-3.7/av/buffer.cpython-37m-arm-linux-gnueabihf.so building 'av.logging' extension gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.7m -I/usr/include/arm-linux-gnueabihf -Iinclude -Ibuild/temp.linux-armv7l-3.7/include -I/usr/local/include/python3.7m -Ibuild/temp.linux-armv7l-3.7/include -c src/av/logging.c -o build/temp.linux-armv7l-3.7/src/av/logging.o gcc -pthread -shared build/temp.linux-armv7l-3.7/src/av/logging.o -lavutil -lavdevice -lavfilter -lswscale -lswresample -lavformat -lavcodec -o build/lib.linux-armv7l-3.7/av/logging.cpython-37m-arm-linux-gnueabihf.so building 'av.plane' extension gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.7m -I/usr/include/arm-linux-gnueabihf -Iinclude -Ibuild/temp.linux-armv7l-3.7/include -I/usr/local/include/python3.7m -Ibuild/temp.linux-armv7l-3.7/include -c src/av/plane.c -o build/temp.linux-armv7l-3.7/src/av/plane.o gcc -pthread -shared build/temp.linux-armv7l-3.7/src/av/plane.o -lavutil -lavdevice -lavfilter -lswscale -lswresample -lavformat -lavcodec -o build/lib.linux-armv7l-3.7/av/plane.cpython-37m-arm-linux-gnueabihf.so building 'av.stream' extension gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.7m -I/usr/include/arm-linux-gnueabihf -Iinclude -Ibuild/temp.linux-armv7l-3.7/include -I/usr/local/include/python3.7m -Ibuild/temp.linux-armv7l-3.7/include -c src/av/stream.c -o build/temp.linux-armv7l-3.7/src/av/stream.o src/av/stream.c: In function ‘pyx_f_2av_6stream_wrap_stream’: src/av/stream.c:2256:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations] switch (pyx_v_c_stream->codec->codec_type) { ^~ In file included from /usr/include/arm-linux-gnueabihf/libavdevice/avdevice.h:51:0, from src/av/stream.c:674: /usr/include/arm-linux-gnueabihf/libavformat/avformat.h:893:21: note: declared here AVCodecContext *codec; ^~~~~ src/av/stream.c: In function ‘pyx_f_2av_6stream_6Streaminit’: src/av/stream.c:2865:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations] pyx_t_1 = pyx_v_stream->codec; ^~~~~ In file included from /usr/include/arm-linux-gnueabihf/libavdevice/avdevice.h:51:0, from src/av/stream.c:674: /usr/include/arm-linux-gnueabihf/libavformat/avformat.h:893:21: note: declared here AVCodecContext *codec; ^~~~~ src/av/stream.c:2985:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] pyx_t_6 = pyx_v_self->_codec_context->codec; ^ src/av/stream.c: In function ‘pyx_f_2av_6stream_6Streamfinalize_for_output’: src/av/stream.c:3666:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations] pyx_t_7 = pyx_f_2av_5error_err_check(avcodec_parameters_from_context(pyx_v_self->_stream->codecpar, pyx_v_self->_stream->codec), 0, NULL); if (unlikely(pyx_t_7 == ((int)-1))) PYX_ERR(0, 141, pyx_L1_error) ^~~~~ In file included from /usr/include/arm-linux-gnueabihf/libavdevice/avdevice.h:51:0, from src/av/stream.c:674: /usr/include/arm-linux-gnueabihf/libavformat/avformat.h:893:21: note: declared here AVCodecContext *codec; ^~~~~ gcc -pthread -shared build/temp.linux-armv7l-3.7/src/av/stream.o -lavutil -lavdevice -lavfilter -lswscale -lswresample -lavformat -lavcodec -o build/lib.linux-armv7l-3.7/av/stream.cpython-37m-arm-linux-gnueabihf.so building 'av.sidedata.sidedata' extension creating build/temp.linux-armv7l-3.7/src/av/sidedata gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.7m -I/usr/include/arm-linux-gnueabihf -Iinclude -Ibuild/temp.linux-armv7l-3.7/include -I/usr/local/include/python3.7m -Ibuild/temp.linux-armv7l-3.7/include -c src/av/sidedata/sidedata.c -o build/temp.linux-armv7l-3.7/src/av/sidedata/sidedata.o src/av/sidedata/sidedata.c: In function ‘pyx_pymod_exec_sidedata’: src/av/sidedata/sidedata.c:5493:58: error: ‘AV_FRAME_DATA_SPHERICAL’ undeclared (first use in this function) pyx_t_2 = Pyx_PyInt_From_enum__AVFrameSideDataType(AV_FRAME_DATA_SPHERICAL); if (unlikely(!pyx_t_2)) PYX_ERR(0, 28, __pyx_L1_error) ^~~~~~~ src/av/sidedata/sidedata.c:5493:58: note: each undeclared identifier is reported only once for each function it appears in src/av/sidedata/sidedata.c:5511:58: error: ‘AV_FRAME_DATA_CONTENT_LIGHT_LEVEL’ undeclared (first use in this function) pyx_t_2 = Pyx_PyInt_From_enum__AVFrameSideDataType(AV_FRAME_DATA_CONTENT_LIGHT_LEVEL); if (unlikely(!pyx_t_2)) PYX_ERR(0, 29, pyx_L1_error) ^~~~~~~~~ src/av/sidedata/sidedata.c:5529:58: error: ‘AV_FRAME_DATA_ICC_PROFILE’ undeclared (first use in this function) pyx_t_2 = __Pyx_PyInt_From_enumAVFrameSideDataType(AV_FRAME_DATA_ICC_PROFILE); if (unlikely(!pyx_t_2)) PYX_ERR(0, 30, __pyx_L1_error) ^~~~~~~~~ error: command 'gcc' failed with exit status 1

ERROR: Command errored out with exit status 1: /usr/local/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-l_mhu32x/av/setup.py'"'"'; file='"'"'/tmp/pip-install-l_mhu32x/av/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-dmo4yr_e/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7m/av Check the logs for full command output.

How can I resolve this problem?

jlaine commented 4 years ago

This is not an error installing aiortc but PyAV. The problem seems to be that your FFmpeg libraries are too old, you need at least version 4.0.