Установка пакета pymedia для Python выдает ошибки
Я пытаюсь установить пакет pymedia
на моем компьютере Ubuntu 18.04, и я взял подсказки из этого поста. Но я получаю следующие ошибки:
skrowten_hermit@PC230989:~/Downloads/pymedia-1.3.7.3$ python setup.py build
Using UNIX configuration...
OGG : found
VORBIS : found
FAAD : found
MP3LAME : found
VORBISENC : found
ALSA : found
Continue building pymedia ? [Y,n]:y
running build
running build_py
running build_ext
building 'pymedia.audio.sound' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DBUILD_NUM=1866 -DPATH_DEV_DSP="/dev/dsp" -DPATH_DEV_MIXER="/dev/mixer" -D_FILE_OFFSET_BITS=64 -DACCEL_DETECT=1 -DHAVE_MMX=1 -DHAVE_LINUX_DVD_STRUCT=1 -DDVD_STRUCT_IN_LINUX_CDROM_H=1 -DCONFIG_VORBIS -DCONFIG_VORBIS -DCONFIG_FAAD -DCONFIG_MP3LAME -DCONFIG_VORBIS -DCONFIG_ALSA -DHAVE_AV_CONFIG_H -DUDF_CACHE=1 -INone -INone -INone -I/usr/include/lame -INone -INone -I/home/sreekanth/Downloads/pymedia-1.3.7.3 -Isound/ -I/usr/include/python2.7 -c sound/sound.cpp -o build/temp.linux-x86_64-2.7/sound/sound.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
sound/sound.cpp:183:4: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
"\t"RESAMPLE_NAME"()"
^
sound/sound.cpp:195:4: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
"The following methods available for "ANALYZER_NAME":\n" \
^
sound/sound.cpp:196:4: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
"\t"AS_FREQS_NAME"()"\
^
sound/sound.cpp:197:4: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
"\n\t"AS_BANDS_NAME"()"
^
sound/sound.cpp:202:3: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
"\t"PLAY_NAME"()"
^
sound/sound.cpp:203:3: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
"\n\t"PAUSE_NAME"()"
^
sound/sound.cpp:204:3: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
"\n\t"UNPAUSE_NAME"()"
^
sound/sound.cpp:205:3: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
"\n\t"STOP_NAME"()"
^
sound/sound.cpp:206:3: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
"\n\t"POSITION_NAME"()"
^
sound/sound.cpp:207:3: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
"\n\t"CHANNELS_NAME"()"
^
sound/sound.cpp:208:3: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
"\n\t"GETRATE_NAME"()"
^
sound/sound.cpp:209:3: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
"\n\t"GET_LEFT_NAME"()"
^
sound/sound.cpp:210:3: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
"\n\t"GET_SPACE_NAME"()"
^
sound/sound.cpp:211:3: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
"\n\t"IS_PLAYING_NAME"()";
^
sound/sound.cpp:216:3: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
"\t"START_NAME"()"
^
sound/sound.cpp:217:3: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
"\n\t"STOP_NAME"()"
^
sound/sound.cpp:218:3: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
"\n\t"POSITION_NAME"()"
^
sound/sound.cpp:219:3: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
"\n\t"CHANNELS_NAME"()"
^
sound/sound.cpp:220:3: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
"\n\t"GETRATE_NAME"()"
^
sound/sound.cpp:221:3: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
"\n\t"GET_SIZE_NAME"()"
^
sound/sound.cpp:222:3: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
"\n\t"GET_DATA_NAME"()";
^
sound/sound.cpp:401:30: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
if (!PyArg_ParseTuple(args, "iii|i:"INPUT_NAME, &iFreqRate, &iChannels, &iFormat, &iId ))
^
sound/sound.cpp:432:13: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
MODULE_NAME"."INPUT_NAME,
^
sound/sound.cpp:652:30: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
if (!PyArg_ParseTuple(args, "iii|i:"OUTPUT_NAME, &iFreqRate, &iChannels, &iFormat, &iId ))
^
sound/sound.cpp:681:13: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
MODULE_NAME"."OUTPUT_NAME,
^
sound/sound.cpp:918:30: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
if (!PyArg_ParseTuple(args, "|i:"MIXER_NAME, &iId ))
^
sound/sound.cpp:967:13: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
MODULE_NAME"."MIXER_NAME,
^
sound/sound.cpp:1013:30: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
if (!PyArg_ParseTuple(args, "s#:"RESAMPLE_NAME, &sData, &iLen ))
^
sound/sound.cpp:1087:13: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
MODULE_NAME"."RESAMPLER_NAME,
^
sound/sound.cpp:1132:30: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
if (!PyArg_ParseTuple(args, "s#:"AS_FREQS_NAME, &sData, &iLen ))
^
sound/sound.cpp:1169:30: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
if (!PyArg_ParseTuple(args, "is#:"AS_BANDS_NAME, &iBands, &sData, &iLen ))
^
sound/sound.cpp:1176:14: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
"bands( %d ). Use "AS_FREQS_NAME"() if you want support more bands.", iBands, MAX_BANDS );
^
sound/sound.cpp:1264:30: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
if (!PyArg_ParseTuple(args, "iii:"ANALYZER_NAME, &iChannels, &iSamplesIn, &iFreqsOut ))
^
sound/sound.cpp:1307:13: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
MODULE_NAME"."ANALYZER_NAME,
^
In file included from sound/sound.cpp:31:0:
sound/audio_alsa.h: In member function ‘int OSoundStream::Init(int, int, int, int)’:
sound/audio_alsa.h:322:19: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
char *cardname = "default";
^~~~~~~~~
sound/audio_alsa.h:324:15: warning: unused variable ‘val’ [-Wunused-variable]
unsigned int val;
^~~
sound/audio_alsa.h: In member function ‘int ISoundStream::Init(int, int, int)’:
sound/audio_alsa.h:666:19: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
char *cardname = "default";
^~~~~~~~~
In file included from sound/sound.cpp:31:0:
sound/audio_alsa.h: In member function ‘bool Mixer::SetMuteControlValue(int, int, int, int)’:
sound/audio_alsa.h:973:9: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else]
if (snd_mixer_selem_has_playback_channel(elem, (snd_mixer_selem_channel_id_t)channel))
^
sound/audio_alsa.h:1012:9: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else]
if (snd_mixer_selem_has_capture_channel(elem, (snd_mixer_selem_channel_id_t)channel))
^
sound/audio_alsa.h: In constructor ‘Mixer::Mixer(int)’:
sound/audio_alsa.h:1033:19: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
char *cardname = "default";
^~~~~~~~~
sound/audio_alsa.h: In member function ‘bool Mixer::SetControlValue(int, int, int, int, int)’:
sound/audio_alsa.h:1330:8: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else]
if (snd_mixer_selem_is_capture_mono(elem))
^
sound/sound.cpp: At global scope:
sound/sound.cpp:791:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
};
^
sound/sound.cpp:791:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
sound/sound.cpp:791:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
sound/sound.cpp:791:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
sound/sound.cpp:791:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
sound/sound.cpp:791:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
sound/sound.cpp:791:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
sound/sound.cpp:791:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
sound/sound.cpp:791:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
sound/sound.cpp:791:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
sound/sound.cpp:798:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
};
^
sound/sound.cpp:798:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
sound/sound.cpp: In function ‘void initsound()’:
sound/sound.cpp:1451:66: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
g_cErr = PyErr_NewException(MODULE_NAME".SoundError", NULL, NULL);
^
In file included from sound/sound.cpp:31:0:
sound/audio_alsa.h: At global scope:
sound/audio_alsa.h:112:26: warning: ‘snd_mixer_elem_t* alsamixer_find_elem(snd_mixer_t*, char*, int)’ defined but not used [-Wunused-function]
static snd_mixer_elem_t *alsamixer_find_elem(snd_mixer_t *handle, char *control, int id)
^~~~~~~~~~~~~~~~~~~
sound/audio_alsa.h: In member function ‘int OSoundStream::Init(int, int, int, int)’:
sound/audio_alsa.h:408:15: warning: ‘frames’ may be used uninitialized in this function [-Wmaybe-uninitialized]
this->bufsize=this->framesize * frames;
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DBUILD_NUM=1866 -DPATH_DEV_DSP="/dev/dsp" -DPATH_DEV_MIXER="/dev/mixer" -D_FILE_OFFSET_BITS=64 -DACCEL_DETECT=1 -DHAVE_MMX=1 -DHAVE_LINUX_DVD_STRUCT=1 -DDVD_STRUCT_IN_LINUX_CDROM_H=1 -DCONFIG_VORBIS -DCONFIG_VORBIS -DCONFIG_FAAD -DCONFIG_MP3LAME -DCONFIG_VORBIS -DCONFIG_ALSA -DHAVE_AV_CONFIG_H -DUDF_CACHE=1 -INone -INone -INone -I/usr/include/lame -INone -INone -I/home/sreekanth/Downloads/pymedia-1.3.7.3 -Isound/ -I/usr/include/python2.7 -c sound/resample.c -o build/temp.linux-x86_64-2.7/sound/resample.o
sound/resample.c: In function ‘fractional_resample’:
sound/resample.c:48:24: warning: variable ‘incr’ set but not used [-Wunused-but-set-variable]
unsigned int frac, incr;
^~~~
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DBUILD_NUM=1866 -DPATH_DEV_DSP="/dev/dsp" -DPATH_DEV_MIXER="/dev/mixer" -D_FILE_OFFSET_BITS=64 -DACCEL_DETECT=1 -DHAVE_MMX=1 -DHAVE_LINUX_DVD_STRUCT=1 -DDVD_STRUCT_IN_LINUX_CDROM_H=1 -DCONFIG_VORBIS -DCONFIG_VORBIS -DCONFIG_FAAD -DCONFIG_MP3LAME -DCONFIG_VORBIS -DCONFIG_ALSA -DHAVE_AV_CONFIG_H -DUDF_CACHE=1 -INone -INone -INone -I/usr/include/lame -INone -INone -I/home/sreekanth/Downloads/pymedia-1.3.7.3 -Isound/ -I/usr/include/python2.7 -c sound/fft.cpp -o build/temp.linux-x86_64-2.7/sound/fft.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/sound/sound.o build/temp.linux-x86_64-2.7/sound/resample.o build/temp.linux-x86_64-2.7/sound/fft.o -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -logg -lvorbis -lfaad -lmp3lame -lvorbisenc -lasound -o build/lib.linux-x86_64-2.7/pymedia/audio/sound.so
building 'pymedia.audio.acodec' extension
creating build/temp.linux-x86_64-2.7/audio
creating build/temp.linux-x86_64-2.7/audio/acodec
creating build/temp.linux-x86_64-2.7/audio/libavcodec
creating build/temp.linux-x86_64-2.7/audio/libavcodec/liba52
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DBUILD_NUM=1866 -DPATH_DEV_DSP="/dev/dsp" -DPATH_DEV_MIXER="/dev/mixer" -D_FILE_OFFSET_BITS=64 -DACCEL_DETECT=1 -DHAVE_MMX=1 -DHAVE_LINUX_DVD_STRUCT=1 -DDVD_STRUCT_IN_LINUX_CDROM_H=1 -DCONFIG_VORBIS -DCONFIG_VORBIS -DCONFIG_FAAD -DCONFIG_MP3LAME -DCONFIG_VORBIS -DCONFIG_ALSA -DHAVE_AV_CONFIG_H -DUDF_CACHE=1 -INone -INone -INone -I/usr/include/lame -INone -INone -I/home/sreekanth/Downloads/pymedia-1.3.7.3 -Iaudio/ -I/usr/include/python2.7 -c audio/acodec/acodec.c -o build/temp.linux-x86_64-2.7/audio/acodec/acodec.o
In file included from /usr/include/stdint.h:37:0,
from /usr/lib/gcc/x86_64-linux-gnu/7/include/stdint.h:9,
from /usr/include/python2.7/pyport.h:13,
from /usr/include/python2.7/Python.h:61,
from audio/acodec/acodec.c:27:
/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h:27:20: error: conflicting types for ‘uint64_t’
typedef __uint64_t uint64_t;
^~~~~~~~
In file included from /usr/include/python2.7/pyport.h:9:0,
from /usr/include/python2.7/Python.h:61,
from audio/acodec/acodec.c:27:
audio/inttypes.h:57:17: note: previous declaration of ‘uint64_t’ was here
typedef UINT64 uint64_t;
^~~~~~~~
In file included from audio/libavcodec/avcodec.h:14:0,
from audio/acodec/acodec.c:30:
audio/libavcodec/common.h: In function ‘skip_bits’:
audio/libavcodec/common.h:571:17: warning: variable ‘re_cache’ set but not used [-Wunused-but-set-variable]
OPEN_READER(re, s)
^
audio/libavcodec/common.h:393:13: note: in definition of macro ‘OPEN_READER’
int name##_cache= 0;\
^~~~
In file included from audio/acodec/acodec.c:31:0:
audio/libavcodec/dsputil.h: At top level:
audio/libavcodec/dsputil.h:484:24: error: static declaration of ‘lrintf’ follows non-static declaration
static inline long int lrintf(float x)
^~~~~~
In file included from /usr/include/python2.7/pyport.h:325:0,
from /usr/include/python2.7/Python.h:61,
from audio/acodec/acodec.c:27:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:314:1: note: previous declaration of ‘lrintf’ was here
__MATHDECL (long int,lrint,, (_Mdouble_ __x));
^
audio/acodec/acodec.c:205:2: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
(inquiry)acstring_length, /*sq_length*/
^
audio/acodec/acodec.c:205:2: note: (near initialization for ‘acstring_as_sequence.sq_length’)
audio/acodec/acodec.c:217:2: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
(getreadbufferproc)acstring_buffer_getbuf,
^
audio/acodec/acodec.c:217:2: note: (near initialization for ‘acstring_as_buffer.bf_getreadbuffer’)
audio/acodec/acodec.c:219:2: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
(getsegcountproc)acstring_buffer_getsegcount,
^
audio/acodec/acodec.c:219:2: note: (near initialization for ‘acstring_as_buffer.bf_getsegcount’)
audio/acodec/acodec.c:249:2: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
&acstring_str, /* tp_str */
^
audio/acodec/acodec.c:249:2: note: (near initialization for ‘ACStringType.tp_str’)
audio/acodec/acodec.c: In function ‘ACodec_Encode’:
audio/acodec/acodec.c:666:5: warning: pointer targets in passing argument 2 of ‘avcodec_encode_audio’ differ in signedness [-Wpointer-sign]
sOutbuf,
^~~~~~~
In file included from audio/acodec/acodec.c:30:0:
audio/libavcodec/avcodec.h:1597:5: note: expected ‘uint8_t * {aka unsigned char *}’ but argument is of type ‘char *’
int avcodec_encode_audio(AVCodecContext *avctx, uint8_t *buf, int buf_size,
^~~~~~~~~~~~~~~~~~~~
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Как я могу это исправить и заставить пакет работать?