konrads@talon:~/pymedia-1.3.7.3$ gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -DBUILD_NUM=1863 -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 -DHAVE_AV_CONFIG_H -DUDF_CACHE=1 -INone -INone -INone -I/usr/include/lame -INone -I/home/konrads/pymedia-1.3.7.3 -Iaudio/ -I/usr/include/python2.5 -c audio/acodec/acodec.c -o build/temp.linux-i686-2.5/audio/acodec/acodec.o
In file included from audio/acodec/acodec.c:31:
audio/libavcodec/dsputil.h:485: error: static declaration of ‘lrintf’ follows non-static declaration
audio/acodec/acodec.c:249: warning: initialization from incompatible pointer type
audio/acodec/acodec.c: In function ‘ACodec_Encode’:
audio/acodec/acodec.c:668: warning: pointer targets in passing argument 2 of ‘avcodec_encode_audio’ differ in signedness
It is fixed by adding a -DHAVE_LRINTF. I guess something is not detecting something properly.
I get approximately the same error, but on line 484.
Using Ubuntu 8.10.
$ python setup.py build
Using UNIX configuration...
OGG : found
VORBIS : found
FAAD : found
MP3LAME : found
VORBISENC : found
ALSA : found
Continue building pymedia ? [Y,n]:
running build
running build_py
running build_ext
building 'pymedia.audio.acodec' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -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/helge/hack/python/pymedia/pymedia-1.3.7.3 -Iaudio/ -I/usr/include/python2.5 -c audio/acodec/acodec.c -o build/temp.linux-i686-2.5/audio/acodec/acodec.o
In file included from audio/acodec/acodec.c:31:
audio/libavcodec/dsputil.h:484: error: static declaration of ‘lrintf’ follows non-static declaration
audio/acodec/acodec.c:249: warning: initialization from incompatible pointer type
audio/acodec/acodec.c: In function ‘ACodec_Encode’:
audio/acodec/acodec.c:668: warning: pointer targets in passing argument 2 of ‘avcodec_encode_audio’ differ in signedness
error: command 'gcc' failed with exit status 1
I also had to change setup.py from:
DEFINES= [( 'BUILD_NUM', buildNum ),]
to:
DEFINES= [( 'BUILD_NUM', buildNum ),('HAVE_LRINTF', 1)]
on Debian Squeeze.
I run into a problem earlier.
/usr/bin/ld: build/temp.linux-x86_64-2.4/sound/sound.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
build/temp.linux-x86_64-2.4/sound/sound.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
error: command 'c++' failed with exit status 1
I can get rid of this by commenting out the disable_fPIC() call in setup.py, although I'm not sure what other effects this might have. Once I add HAVE_LRINTF, the compile goes much further but still fails with the following.
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -DBUILD_NUM=1871 -DPATH_DEV_DSP="/dev/dsp" -DPATH_DEV_MIXER="/dev/mixer" -D_FILE_OFFSET_BITS=64 -DACCEL_DETECT=1 -DHAVE_MMX=1 -DHAVE_LRINTF=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/local/include/lame -INone -INone -I/home/scott/gnu/python/pymedia-1.3.7.3 -Ivideo/ -I/usr/include/python2.4 -c video/libavcodec/i386/cputest.c -o build/temp.linux-x86_64-2.4/video/libavcodec/i386/cputest.o
{standard input}: Assembler messages:
{standard input}:20: Error: suffix or operands invalid for `pop'
{standard input}:23: Error: suffix or operands invalid for `push'
{standard input}:26: Error: suffix or operands invalid for `pop'
error: command 'gcc' failed with exit status 1
What does this mean?