You are not logged in.

#1 2012-08-01 20:20:12

themusicalduck
Member
Registered: 2011-07-04
Posts: 123

SOLVED Installing idjc from AUR, compiling fails. libavformat problem?

I'm having difficulty installing idjc from the AUR. I'm not sure what could be causing it, although it seems like it might be an issue with libavformat. Here is the relevant part of the output:

gcc -DHAVE_CONFIG_H -I. -I..    -Wall -std=gnu99 -O2    -I/usr/include/FLAC         -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -MT idjcmixer-avcodecdecode.o -MD -MP -MF .deps/idjcmixer-avcodecdecode.Tpo -c -o idjcmixer-avcodecdecode.o `test -f 'avcodecdecode.c' || echo './'`avcodecdecode.c
avcodecdecode.c: In function 'once_init':
avcodecdecode.c:43:4: warning: implicit declaration of function 'avcodec_init' [-Wimplicit-function-declaration]
avcodecdecode.c: In function 'avcodecdecode_eject':
avcodecdecode.c:64:4: warning: 'av_close_input_file' is deprecated (declared at /usr/include/libavformat/avformat.h:1533) [-Wdeprecated-declarations]
avcodecdecode.c: In function 'avcodecdecode_play':
avcodecdecode.c:161:7: warning: 'avcodec_decode_audio3' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3658) [-Wdeprecated-declarations]
avcodecdecode.c: In function 'avcodecdecode_reg':
avcodecdecode.c:243:7: warning: 'av_close_input_file' is deprecated (declared at /usr/include/libavformat/avformat.h:1533) [-Wdeprecated-declarations]
avcodecdecode.c:248:4: warning: 'av_find_stream_info' is deprecated (declared at /usr/include/libavformat/avformat.h:1357) [-Wdeprecated-declarations]
avcodecdecode.c:256:7: warning: 'av_close_input_file' is deprecated (declared at /usr/include/libavformat/avformat.h:1533) [-Wdeprecated-declarations]
avcodecdecode.c:262:4: warning: 'avcodec_open' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3380) [-Wdeprecated-declarations]
avcodecdecode.c:266:7: warning: 'av_close_input_file' is deprecated (declared at /usr/include/libavformat/avformat.h:1533) [-Wdeprecated-declarations]
avcodecdecode.c: In function 'avformatinfo':
avcodecdecode.c:295:22: error: 'AV_METADATA_DONT_STRDUP_KEY' undeclared (first use in this function)
avcodecdecode.c:295:22: note: each undeclared identifier is reported only once for each function it appears in
avcodecdecode.c:295:52: error: 'AV_METADATA_DONT_STRDUP_VAL' undeclared (first use in this function)
avcodecdecode.c:301:7: warning: 'av_find_stream_info' is deprecated (declared at /usr/include/libavformat/avformat.h:1357) [-Wdeprecated-declarations]
avcodecdecode.c:311:7: warning: 'av_close_input_file' is deprecated (declared at /usr/include/libavformat/avformat.h:1533) [-Wdeprecated-declarations]
make[2]: *** [idjcmixer-avcodecdecode.o] Error 1
make[2]: Leaving directory `/tmp/packerbuild-1000/idjc/idjc/src/idjc-0.8.7/c'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/packerbuild-1000/idjc/idjc/src/idjc-0.8.7'
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
The build failed.

Last edited by themusicalduck (2012-08-01 22:07:43)

Offline

#2 2012-08-01 20:57:45

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: SOLVED Installing idjc from AUR, compiling fails. libavformat problem?

Yes, ffmpeg libraries dropped support for many deprecated functions and macros.  Either this was fairly recent, or the documentation has been fairly slow to catch up.

This change, however, is documented.  AV_METADATA_... needs to be replaces with AV_DICT_... and dict.h needs to be included.

This is an upstream issue and should be reported there, but I'll see if I can get a PKGBUILD to "patch" the problem in the mean time.

edit:  I was able to fix this issue with a single sed line in the PKGBUILD, but then new issues sprang up.  I fixed those, then yet more arose.  The entire package is written against an outdated version of the ffmpeg libraries.  This either needs to be built against those old versions, or fixed (rewritten) upstream.

edit2: if you don't need mp4 support, you should be able to disable this option and compile everything else just fine.  To do so you can use this PKGBULD hack in the build function:

    ./configure \
        --prefix=/usr \
        --libexecdir=/usr/lib \
        --disable-static

   sed -i 's/\(#define HAVE_AVCODEC 1\)/\/*\1*\//g' config.h
   sed -i 's/\(#define HAVE_AVFORMAT 1\)/\/*\1*\//g' config.h
   sed -i 's/\(#define HAVE_AVUTIL 1\)/\/*\1*\//g' config.h

    make

adding the three sed lines.  This compiles fine, but again, you will not have mp4 support.

Last edited by Trilby (2012-08-01 21:35:57)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2012-08-01 21:50:34

themusicalduck
Member
Registered: 2011-07-04
Posts: 123

Re: SOLVED Installing idjc from AUR, compiling fails. libavformat problem?

Trilby wrote:

edit2: if you don't need mp4 support, you should be able to disable this option and compile everything else just fine.  To do so you can use this PKGBULD hack in the build function:

    ./configure \
        --prefix=/usr \
        --libexecdir=/usr/lib \
        --disable-static

   sed -i 's/\(#define HAVE_AVCODEC 1\)/\/*\1*\//g' config.h
   sed -i 's/\(#define HAVE_AVFORMAT 1\)/\/*\1*\//g' config.h
   sed -i 's/\(#define HAVE_AVUTIL 1\)/\/*\1*\//g' config.h

    make

adding the three sed lines.  This compiles fine, but again, you will not have mp4 support.

Yep, so far so good. That's fixed it.

Thanks very much.

Offline

Board footer

Powered by FluxBB