Xpra: Ticket #100: pra/x264/x264lib.c:154: error: ‘AVPacket’ undeclared (first use in this function)

building xpra from svn fails today:

skipping 'xpra/wait_for_x_server.c' Cython extension (up-to-date)
building 'xpra.wait_for_x_server' extension
creating build/temp.linux-x86_64-2.6/xpra
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -O0 -fPIC -I/usr/include/python2.6 -c xpra/wait_for_x_server.c -o build/temp.linux-x86_64-2.6/xpra/wait_for_x_server.o
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -O0 build/temp.linux-x86_64-2.6/xpra/wait_for_x_server.o -lX11 -o build/lib.linux-x86_64-2.6/xpra/wait_for_x_server.so
cythoning xpra/x264/codec.pyx to xpra/x264/codec.c
building 'xpra.x264.codec' extension
creating build/temp.linux-x86_64-2.6/xpra/x264
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -O0 -fPIC -I/usr/include/python2.6 -c xpra/x264/codec.c -o build/temp.linux-x86_64-2.6/xpra/x264/codec.o
xpra/x264/codec.c: In function ‘__pyx_pf_4xpra_4x264_5codec_7Decoder_2decompress_image’:
xpra/x264/codec.c:1074: warning: passing argument 2 of ‘PyObject_AsReadBuffer’ from incompatible pointer type
/usr/include/python2.6/abstract.h:501: note: expected ‘const void **’ but argument is of type ‘void **’
xpra/x264/codec.c: In function ‘__pyx_pf_4xpra_4x264_5codec_7Encoder_2compress_image’:
xpra/x264/codec.c:1498: warning: passing argument 2 of ‘PyObject_AsReadBuffer’ from incompatible pointer type
/usr/include/python2.6/abstract.h:501: note: expected ‘const void **’ but argument is of type ‘void **’
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -O0 -fPIC -I/usr/include/python2.6 -c xpra/x264/x264lib.c -o build/temp.linux-x86_64-2.6/xpra/x264/x264lib.o
xpra/x264/x264lib.c: In function ‘init_decoder’:
xpra/x264/x264lib.c:91: warning: implicit declaration of function ‘avcodec_alloc_context3’
xpra/x264/x264lib.c:91: warning: assignment makes pointer from integer without a cast
xpra/x264/x264lib.c: In function ‘compress_image’:
xpra/x264/x264lib.c:121: warning: passing argument 2 of ‘sws_scale’ from incompatible pointer type
/usr/include/libswscale/swscale.h:155: note: expected ‘uint8_t **’ but argument is of type ‘const uint8_t **’
xpra/x264/x264lib.c: In function ‘decompress_image’:
xpra/x264/x264lib.c:154: error: ‘AVPacket’ undeclared (first use in this function)
xpra/x264/x264lib.c:154: error: (Each undeclared identifier is reported only once
xpra/x264/x264lib.c:154: error: for each function it appears in.)
xpra/x264/x264lib.c:154: error: expected ‘;’ before ‘avpkt’
xpra/x264/x264lib.c:160: warning: implicit declaration of function ‘av_init_packet’
xpra/x264/x264lib.c:160: error: ‘avpkt’ undeclared (first use in this function)
xpra/x264/x264lib.c:170: warning: implicit declaration of function ‘avcodec_decode_video2’
error: command 'gcc' failed with exit status 1

This is svn 693.

debian squeeze with libvpx-dev and libx264-dev from squeeze-backports.

amd64.



Tue, 03 Apr 2012 11:07:22 GMT - Timo Juhani Lindfors: attachment set

list of installed packages and their versions


Tue, 03 Apr 2012 11:11:41 GMT - ahuillet:

You need libavcodec-dev libswscale-dev libavutil-dev, all part of ffmpeg.


Tue, 03 Apr 2012 11:40:59 GMT - Timo Juhani Lindfors:

the packages.list file that I attached lists all those files. Which versions are required? Shouldn't the build system tell pkg-config about minimum version?


Tue, 03 Apr 2012 12:44:48 GMT - Antoine Martin: status changed; resolution set

This is something for Debian to fix. I already have a long list of hacks I have to do for each Debian / Ubuntu release I make packages for. Squeeze, like many others, needs to have x264 disabled, more info here.

Specifying a minimum version will not fix this, it will only fail with a slightly better error message - a patch would be welcome.


Fri, 04 May 2012 10:00:58 GMT - Antoine Martin: milestone deleted

Milestone current deleted


Sat, 23 Jan 2021 04:45:32 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/100