Opened 5 years ago

Closed 5 years ago

#483 closed defect (fixed)

Compilation fails for --disable-everything --enable-outdev=alsa

Reported by: skierpage Owned by:
Priority: normal Component: build system
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

(I'm building from git to debug some QCELP audio playback problems.)
From "Get FFmpeg" I downloaded git snapshot. I don't need all of ffmpeg so I tried

% ./configure --prefix=/home/skierpage/src/ffmpeg --disable-network --disable-indevs
% make

This errors with

LD      ffmpeg_g
libavdevice/libavdevice.a(alsa-audio-common.o): In function `ff_alsa_close':
/home/skierpage/src/ffmpeg-HEAD-9a9ceb8/libavdevice/alsa-audio-common.c:322: undefined reference to `ff_timefilter_destroy'
collect2: ld returned 1 exit status
Reaping losing child 0x01d24890 PID 11332 
make: *** [ffmpeg_g] Error 1

It's building alsa because configure detects HAVE_ALSA_ASOUNDLIB_H on my system, so config.mak sets CONFIG_ALSA_OUTDEV=yes. At first I thought the problem was, like like libavdevice/jack-audio.c , libavdevice/alsa-audio-common.c needs to add

#include "libavformat/timefilter.h"

but that doesn't help.

It seems the problem is libavformat's Makefile only compiles in timefilter.c if CONFIG_ALSA_INDEV is set. But you still need timefilter if you have no input device named alsa (e.g. because you configure with --disable-indevs) but you have an alsa outdev. A dumb patch that allows make to complete and results in working avconv is

--- libavformat/Makefile.org    2011-09-17 13:36:43.000000000 -0700
+++ libavformat/Makefile        2011-09-17 18:00:02.698529430 -0700
@@ -347,6 +347,7 @@
 
 # libavdevice dependencies
 OBJS-$(CONFIG_ALSA_INDEV)                += timefilter.o
+OBJS-$(CONFIG_ALSA_OUTDEV)               += timefilter.o
 OBJS-$(CONFIG_JACK_INDEV)                += timefilter.o

I suspect if configure detects Jack audio and you've disabled input devices, the Makefile will need a similar line for CONFIG_JACK_OUTDEV.

I hope this helps. Thank you for ffmpeg's massive AV format support.

Change History (2)

comment:1 Changed 5 years ago by cehoyos

  • Reproduced by developer set
  • Status changed from new to open
  • Summary changed from libavformat needs timefilter for OUTDEV as well as INDEV to Compilation fails for --disable-everything --enable-outdev=alsa

comment:2 Changed 5 years ago by cehoyos

  • Resolution set to fixed
  • Status changed from open to closed

Should be fixed, thank you for the analysis!

Note: See TracTickets for help on using tickets.