Aqualung won't compile with LAVC-support

News and discussion about development of the Debian OS itself

Aqualung won't compile with LAVC-support

Postby lilrc » 2012-08-01 19:07

Hi,

I have tried compiling Aqualung (the repository version, 0.9~beta11) with LAVC-support, but make warns me about deprecated functions, gives undefined references-errors. libavcodec-dev, libavformat-dev and libavutil-dev are version 6:0.8.3-4 (the latest version in the repository). I'm running Wheezy.

I'm attaching some information which might be useful.
Code: Select all
./configure --with-oss=no --with-alsa=no --with-pulse=no --with-podcast=no --with-ifp=no --with-cdda=no --with-cddb=no --with-jack=yes --with-ogg=yes --with-lame=no --with-vorbisenc=no --with-mpeg=yes --with-mpc=yes --with-lavc=yes --with-flac=yes

gives me this:
Code: Select all
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for type of build... release
checking for compilation platform... Linux
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for ranlib... ranlib
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking for unistd.h... (cached) yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether gcc needs -traditional... no
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking whether lstat dereferences a symlink specified with a trailing slash... yes
checking whether stat accepts an empty string... no
checking for floor... no
checking for memset... yes
checking for mkdir... yes
checking for strdup... yes
checking for strrchr... yes
checking for strstr... yes
checking for strndup... yes
checking for strcasestr... yes
checking for pkg-config... yes
checking for pthread_create in -lpthread... yes
checking for dlopen in -ldl... yes
checking for gzopen in -lz... yes
checking for BZ2_bzopen in -lbz2... no
checking whether GTK+ version >= 2.6... yes
checking for xml2-config... (cached) yes
checking for xmlNewDoc in -lxml2... yes
checking for sndio support... checking sndio.h usability... no
checking sndio.h presence... no
checking for sndio.h... no
checking for OSS support... no
checking for ALSA support... no
checking for JACK support... checking for jack_client_new in -ljack... yes
checking for PulseAudio support... no
checking for Sample Rate Converter support... checking for src_new in -lsamplerate... no
checking for sndfile support... checking for sf_open in -lsndfile... no
checking for FLAC support... checking for FLAC__stream_decoder_init_file in -lFLAC... yes
checking for FLAC__file_decoder_new in -lFLAC... no
checking for Ogg Vorbis support... checking for ov_open in -lvorbis... yes
checking for Ogg Vorbis encoding support... no
checking for Ogg Speex support... checking for oggz_open in -loggz... no
checking for speex_bits_init in -lspeex... no
checking for MPEG audio support... checking mad.h usability... yes
checking mad.h presence... yes
checking for mad.h... yes
checking for mad_decoder_init in -lmad... yes
checking for MOD audio support... checking for ModPlug_Load in -lmodplug... no
checking for Musepack support... checking for mpc_demux_init in -lmpcdec... yes
checking for Monkey's Audio Codec support... checking for CreateIAPEDecompress in -lmac... no
checking for LAVC support... checking avcodec.h usability... no
checking avcodec.h presence... no
checking for avcodec.h... no
checking ffmpeg/avcodec.h usability... no
checking ffmpeg/avcodec.h presence... no
checking for ffmpeg/avcodec.h... no
checking libavcodec/avcodec.h usability... yes
checking libavcodec/avcodec.h presence... yes
checking for libavcodec/avcodec.h... yes
checking avformat.h usability... no
checking avformat.h presence... no
checking for avformat.h... no
checking ffmpeg/avformat.h usability... no
checking ffmpeg/avformat.h presence... no
checking for ffmpeg/avformat.h... no
checking libavformat/avformat.h usability... yes
checking libavformat/avformat.h presence... yes
checking for libavformat/avformat.h... yes
checking for av_open_input_file in -lavformat... yes
checking for avcodec_open in -lavcodec... yes
checking for LAME (MP3 encoding) support... no
checking for WavPack support... checking for WavpackOpenFileInput in -lwavpack... no
checking for LADSPA plugin support... checking for lrdf_init in -llrdf... no
checking for CDDA support... no
checking for CDDB support... no
checking for iRiver iFP support... no
checking for Systray support... checking whether GTK+ version >= 2.10... yes
checking for loop playback support... checking whether GTK+ version >= 2.8... yes
checking for podcast support... no
checking for Lua support... checking for lua_load in -llua... no
checking for lua_load in -llua5.1... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating skin/Makefile
config.status: creating skin/dark/Makefile
config.status: creating skin/default/Makefile
config.status: creating skin/metal/Makefile
config.status: creating skin/ocean/Makefile
config.status: creating skin/plain/Makefile
config.status: creating skin/woody/Makefile
config.status: creating skin/no_skin/Makefile
config.status: creating src/Makefile
config.status: creating src/decoder/Makefile
config.status: creating src/encoder/Makefile
config.status: creating src/img/Makefile
config.status: creating src/po/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
----------------------------------------------------------------------
  Configuration summary
  =====================

  Build type / target platform            :  release / Linux

  Optional features:
      LADSPA plugin support               :  no
      CDDA (Audio CD) support             :  no
      CDDB support                        :  no
      Sample Rate Converter support       :  no
      iRiver iFP driver support           :  no
      Loop playback support               :  yes
      Systray support                     :  yes
      Podcast support                     :  no
      Lua (prog. title format) support    :  no

  Decoding support:
      sndfile (WAV, AIFF, AU, etc.)       :  no
      Free Lossless Audio Codec (FLAC)    :  yes
      Ogg Vorbis                          :  yes
      Ogg Speex                           :  no
      MPEG Audio (MPEG 1-2.5 Layer I-III) :  yes
      MOD Audio (MOD, S3M, XM, IT, etc.)  :  no
      Musepack                            :  yes
      Monkey's Audio Codec                :  no
      WavPack                             :  no
      LAVC (AC3, AAC, WavPack, WMA, etc.) :  yes

  Encoding support:
      sndfile (WAV)                       :  no
      Free Lossless Audio Codec (FLAC)    :  yes
      Ogg Vorbis                          :  no
      LAME (MP3)                          :  no

  Output driver support:
      sndio Audio                         :  no
      OSS Audio                           :  no
      ALSA Audio                          :  no
      JACK Audio Server                   :  yes
      PulseAudio                          :  no
      Win32 Sound API                     :  no

----------------------------------------------------------------------


First error:
Code: Select all
make > make.log

gives me this:
Code: Select all
dec_flac.c: In function 'flac_decoder_open':
dec_flac.c:534:6: warning: comparison between 'FLAC__StreamDecoderState' and 'enum <anonymous>' [-Wenum-compare]
dec_lavc.c: In function 'decode_lavc':
dec_lavc.c:56:3: warning: implicit declaration of function 'avcodec_decode_audio2' [-Wimplicit-function-declaration]
dec_lavc.c: In function 'lavc_decoder_open':
dec_lavc.c:114:2: warning: 'av_open_input_file' is deprecated (declared at /usr/include/libavformat/avformat.h:1368) [-Wdeprecated-declarations]
dec_lavc.c:117:2: warning: 'av_find_stream_info' is deprecated (declared at /usr/include/libavformat/avformat.h:1412) [-Wdeprecated-declarations]
dec_lavc.c:127:57: error: 'CODEC_TYPE_AUDIO' undeclared (first use in this function)
dec_lavc.c:127:57: note: each undeclared identifier is reported only once for each function it appears in
dec_lavc.c:143:2: warning: 'avcodec_open' is deprecated (declared at /usr/include/libavcodec/avcodec.h:4035) [-Wdeprecated-declarations]
dec_lavc.c: In function 'lavc_decoder_close':
dec_lavc.c:187:2: warning: 'av_close_input_file' is deprecated (declared at /usr/include/libavformat/avformat.h:1580) [-Wdeprecated-declarations]
make[3]: *** [libdecoder_a-dec_lavc.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I omit the make.log file, the warnings and errors are more important.
This error however is easily avoided by changing CODEC_TYPE_AUDIO to AVMEDIA_TYPE_AUDIO at line 127 in src/decoder/dec_lavc.c. Should this be reported to someone who can fix it in the source-package?
After this correction I run:
Code: Select all
make > make.2.log

which gives me:
Code: Select all
dec_lavc.c: In function 'decode_lavc':
dec_lavc.c:56:3: warning: implicit declaration of function 'avcodec_decode_audio2' [-Wimplicit-function-declaration]
dec_lavc.c: In function 'lavc_decoder_open':
dec_lavc.c:114:2: warning: 'av_open_input_file' is deprecated (declared at /usr/include/libavformat/avformat.h:1368) [-Wdeprecated-declarations]
dec_lavc.c:117:2: warning: 'av_find_stream_info' is deprecated (declared at /usr/include/libavformat/avformat.h:1412) [-Wdeprecated-declarations]
dec_lavc.c:143:2: warning: 'avcodec_open' is deprecated (declared at /usr/include/libavcodec/avcodec.h:4035) [-Wdeprecated-declarations]
dec_lavc.c: In function 'lavc_decoder_close':
dec_lavc.c:187:2: warning: 'av_close_input_file' is deprecated (declared at /usr/include/libavformat/avformat.h:1580) [-Wdeprecated-declarations]
dec_mpeg.c: In function 'get_mp3file_info':
dec_mpeg.c:450:6: warning: variable 'frames_per_entry' set but not used [-Wunused-but-set-variable]
dec_mpeg.c:441:6: warning: variable 'chmode_counters' set but not used [-Wunused-but-set-variable]
dec_mpeg.c:440:6: warning: variable 'freq_counters' set but not used [-Wunused-but-set-variable]
dec_mpeg.c:439:6: warning: variable 'layer_counters' set but not used [-Wunused-but-set-variable]
dec_mpeg.c:438:6: warning: variable 'vsn_counters' set but not used [-Wunused-but-set-variable]
build_store.c: In function 'write_track_to_store':
build_store.c:2806:6: warning: variable 'result' set but not used [-Wunused-but-set-variable]
core.c: In function 'jack_init':
core.c:1753:2: warning: 'jack_client_new' is deprecated (declared at /usr/include/jack/jack.h:127) [-Wdeprecated-declarations]
core.c: In function 'main':
core.c:2630:6: warning: variable 'priority' set but not used [-Wunused-but-set-variable]
core.c:2629:6: warning: variable 'try_realtime' set but not used [-Wunused-but-set-variable]
metadata_id3v2.c: In function 'meta_parse_id3v2_txxx':
metadata_id3v2.c:228:6: warning: variable 'type' set but not used [-Wunused-but-set-variable]
metadata_id3v2.c: In function 'meta_parse_id3v2_t___':
metadata_id3v2.c:256:6: warning: variable 'type' set but not used [-Wunused-but-set-variable]
metadata_id3v2.c: In function 'meta_parse_id3v2_wxxx':
metadata_id3v2.c:285:6: warning: variable 'type' set but not used [-Wunused-but-set-variable]
metadata_id3v2.c: In function 'meta_parse_id3v2_w___':
metadata_id3v2.c:313:6: warning: variable 'type' set but not used [-Wunused-but-set-variable]
music_browser.c: In function 'create_music_browser':
music_browser.c:521:18: warning: variable 'buffer' set but not used [-Wunused-but-set-variable]
playlist.c: In function 'playlist_load_m3u_thread':
playlist.c:5056:10: warning: variable 'str_duration' set but not used [-Wunused-but-set-variable]
playlist.c:5044:8: warning: array subscript is above array bounds [-Warray-bounds]
playlist.c: In function 'playlist_load_pls_thread':
playlist.c:5204:8: warning: array subscript is above array bounds [-Warray-bounds]
ports.c: In function 'ports_timeout_callback':
ports.c:82:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
ports.c: In function 'tree_out_nb_selection_changed':
ports.c:202:30: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
ports.c: In function 'setup_tree_out':
ports.c:345:2: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
store_file.c: In function 'parse_record':
store_file.c:3853:7: warning: variable 'comment' set but not used [-Wunused-but-set-variable]
store_file.c: In function 'parse_artist':
store_file.c:3927:7: warning: variable 'comment' set but not used [-Wunused-but-set-variable]
store_file.c: In function 'store_file_load':
store_file.c:3989:7: warning: variable 'comment' set but not used [-Wunused-but-set-variable]
core.c:520: error: undefined reference to 'floor'
gui_main.c:4051: error: undefined reference to 'powf'
gui_main.c:4054: error: undefined reference to 'powf'
gui_main.c:4058: error: undefined reference to 'powf'
volume.c:507: error: undefined reference to 'log10f'
volume.c:146: error: undefined reference to 'sqrtf'
volume.c:616: error: undefined reference to 'powf'
volume.c:624: error: undefined reference to 'log10'
volume.c:645: error: undefined reference to 'log10'
volume.c:670: error: undefined reference to 'log10'
volume.c:633: error: undefined reference to 'sqrt'
dec_lavc.c:56: error: undefined reference to 'avcodec_decode_audio2'
collect2: error: ld returned 1 exit status
make[3]: *** [aqualung] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

As with the previous make, I omit the .log-file
The last error seems to be due to missed library-links. How could I fix theese errors? Howcome theese links aren't included? And besides shouldn't the code be rewritten without using deprecated functions? Should theese warnings be "fixed"?
lilrc
 
Posts: 9
Joined: 2012-08-01 17:56

Re: Aqualung won't compile with LAVC-support

Postby stevepusser » 2012-08-02 05:49

It would probably compile against some particular version of libavcodec, but it's a guess as to which one. I just found out that Miro 5.0.2 won't build against the 0.11.1 "true" ffmpeg version from upstream debian-multimedia, but reverting to an 0.8.X libav-sourced version like the one in Wheezy will let it build. Sigh, welcome to the wonderful land of ffmpeg and random API changes.

I have a couple of folders of self-built debs for each version, and I modified the 0.8 dependencies to allow libavcodec53 to coexist with the newer versions of libavutil and so on, so I can switch between versions by installing all the debs with "dpkg -i -B *.deb", but that's not so easy with the repository builds.

Looking at the Wheezy package, the dependencies sure indicate that it was built against libav 0.8.3.1. Very odd. You don't have any debian-multimedia packages mixed up in there, do you? (I'm kind of stumped, otherwise)
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Flightgear 2018.2.2, 4.19.5 kernel, wine-staging 4.0~rc1, Pale Moon 28.2.2, Mesa 18.2.6, Midori 7.0
User avatar
stevepusser
 
Posts: 10276
Joined: 2009-10-06 05:53

Re: Aqualung won't compile with LAVC-support

Postby lilrc » 2012-08-02 06:41

I have no debian-multimedia packages, only packages from the ordinary debian-servers.

Should I try building it against the "true" ffmpeg-library? Even though I feel like that shouldn't be necessary...

The only critical error which is related to libav is the last one. (The others are "just" deprecated-warnings.) Has avcodec_decode_audio2 been deleted since 0.8.3.1?

Another strange thing is: Even if i turn off the the LAVC-support I fail due to the other undefined references. Why doesn't make include the -lm flag which is needed for pow, powf, sqrt, etc.?
lilrc
 
Posts: 9
Joined: 2012-08-01 17:56

Re: Aqualung won't compile with LAVC-support

Postby stevepusser » 2012-08-02 07:38

OK, I pulled the Debian source, and it includes patches to build against libav 0.7, which I am guessing also make it build with 0.8.

The patches are in the /debian/patches directory after extracting the three source files with

dpkg-source -x *.dsc

Let me know if you need to know how to rebuild .deb packages from the source files, the patches are auto-applied, it's very simple.

Though the debian rules file does not explicitly configure with -LAVC, maybe that's the default if the header (-dev) packages are detected. Maybe

./configure -h

would tell us....

Code: Select all
 --with-lavc=yes,no      compile with lavc (FFmpeg) support (default: yes)


Yes, the Debian build does include that option automatically.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Flightgear 2018.2.2, 4.19.5 kernel, wine-staging 4.0~rc1, Pale Moon 28.2.2, Mesa 18.2.6, Midori 7.0
User avatar
stevepusser
 
Posts: 10276
Joined: 2009-10-06 05:53

Re: Aqualung won't compile with LAVC-support

Postby lilrc » 2012-08-02 17:10

I used dpkg-source -x *.dsc but it didn't solve the problem. I get identic output. Is .dpatch-files automatically applied?

But I don't need to create a debian-package, do I? Is it good if I do?
lilrc
 
Posts: 9
Joined: 2012-08-01 17:56

Re: Aqualung won't compile with LAVC-support

Postby lilrc » 2012-08-02 18:25

I tried grabbing the "offical" source from sourceforge (svn co https://aqualung.svn.sourceforge.net/svnroot/aqualung aqualung) and compiling the 0.9beta11 ends up with the same result. However, the trunk-version compiles and runs great! :D

The question is: "Shouldn't the repository version of the source normally compile with the repository libraries?"
Who can make the fixes needed?
lilrc
 
Posts: 9
Joined: 2012-08-01 17:56

Re: Aqualung won't compile with LAVC-support

Postby stevepusser » 2012-08-03 04:33

As far as Debian is concerned, the issue has been fixed in the patches. Debian policy is not to change the original source code tarball, but only patch the source at build time. You can read this guide to building deb files here: viewtopic.php?f=16&t=38976

Deb packages let you take advantage of the Debian package management system (APT) and also use the patches. I use a somewhat different method of rebuilding packages myself

https://sites.google.com/site/stevosfil ... ects=0&d=1

But again, the stock Wheezy aqualung was built with lavc support, so I have to question why you're reinventing the wheel.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Flightgear 2018.2.2, 4.19.5 kernel, wine-staging 4.0~rc1, Pale Moon 28.2.2, Mesa 18.2.6, Midori 7.0
User avatar
stevepusser
 
Posts: 10276
Joined: 2009-10-06 05:53

Re: Aqualung won't compile with LAVC-support

Postby lilrc » 2012-08-03 14:53

Alright I didn't know that. I didn't know it was so easy building a package. Thank you! :D

I recompile it to get rid of functions I don't use and for the pleasure of learning. :)
lilrc
 
Posts: 9
Joined: 2012-08-01 17:56

Re: Aqualung won't compile with LAVC-support

Postby stevepusser » 2012-08-03 15:46

Ahh, very good reasons. Running "configure -h" will show what options are enabled by default without adding them to the configure section in /debian/rules, as long as the configure script can find the files.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Flightgear 2018.2.2, 4.19.5 kernel, wine-staging 4.0~rc1, Pale Moon 28.2.2, Mesa 18.2.6, Midori 7.0
User avatar
stevepusser
 
Posts: 10276
Joined: 2009-10-06 05:53

Re: Aqualung won't compile with LAVC-support

Postby lilrc » 2012-08-04 06:35

I guess the thread is solved now, the problem doesn't exist anymore. Thank you for your help! :)
lilrc
 
Posts: 9
Joined: 2012-08-01 17:56


Return to Debian Development

Who is online

Users browsing this forum: No registered users and 1 guest

fashionable