FTBFS with libav9

Bug #1076928 reported by Reinhard Tartler on 2012-11-09
102
This bug affects 19 people
Affects Status Importance Assigned to Milestone
Audacity
Confirmed
Unknown
audacity (Debian)
Fix Released
Unknown
audacity (Gentoo Linux)
Won't Fix
Medium
audacity (Ubuntu)
High
Unassigned
Trusty
Undecided
Unassigned

Bug Description

Imported from Debian bug http://bugs.debian.org/692809:

Audacity currently FTBFS with libav 9:

[Impact]
Without libav support, you cannot import/export various audio file types (.ac3, .wma, .m4a, .opus, ...). Previous Ubuntu releases had libav support enabled.

[Testcase]
1) Create an .ac3 and/or .wma audio file.
2) Open Audacity
3) Select File -> Open -> Open the .ac3/.wma file.

Audacity should open the .ac3 and .wma file instead of showing an error that Audacity does not support this file type.

[Regression Potential]
The patch re-introduces libav support again. Major changes in the FFmpeg module were needed to support libav 9 and newer. There could be (new) bugs in the libav import/export due to these changes. Because no other files were touched, there shouldn't be regressions in other parts of the program.

Download full text (5.1 KiB)

When trying to compile audacity against =media-video/ffmpeg-0.11, it fails. See the attached logs.

Reproducible: Always

Steps to Reproduce:
1. Have =media-video/ffmpeg-0.11 installed.
2. # emerge -1v audacity

Actual Results:
Compilation fails.

Expected Results:
Compilation succeeds.

Portage 2.2.0_alpha108 (default/linux/amd64/10.0, gcc-4.6.3, glibc-2.15-r2, 3.3.0-64 x86_64)
=================================================================
System uname: Linux-3.3.0-64-x86_64-Intel-R-_Core-TM-_i7_CPU_X_980_@_3.33GHz-with-gentoo-2.1
Timestamp of tree: Sun, 27 May 2012 14:45:01 +0000
app-shells/bash: 4.2_p28
dev-java/java-config: 2.1.11-r3
dev-lang/python: 2.7.3-r2, 3.2.3-r1
dev-util/cmake: 2.8.8-r2
dev-util/pkgconfig: 0.26
sys-apps/baselayout: 2.1-r1
sys-apps/openrc: 0.10.1
sys-apps/sandbox: 2.5
sys-devel/autoconf: 2.13, 2.69
sys-devel/automake: 1.9.6-r3, 1.11.5
sys-devel/binutils: 2.22-r1
sys-devel/gcc: 4.6.3
sys-devel/gcc-config: 1.7.1
sys-devel/libtool: 2.4.2
sys-devel/make: 3.82-r3
sys-kernel/linux-headers: 3.4 (virtual/os-headers)
sys-libs/glibc: 2.15-r2
Repositories: gentoo local glc
Installed sets:
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1 skype-eula cadsoft ut2003 AdobeFlash-10.3 QUAKE4 Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS=""
GENTOO_MIRRORS="http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS=""
MAKEOPTS="-j13"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /var/lib/layman/glc"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl alsa amd64 bash-completion berkdb bluetooth bluray branding bzip2 cdr cjk cli consolekit cracklib crypt cups cursors cxx dbus dri dts dvd dvdr enca ffmpeg firefox flac fortran gdbm gif glut gpm gtk icons iconv id3 id3tag introspection ipv6 java jpeg jpeg2k kde libcaca libnotify libsamplerate lm_sensors lzo mad matroska mmx mmxext modules mp3 mp4 mpeg mudflap multilib mysql n...

Read more...

Created attachment 313321
bzip2'd build.log

In , J-ago (j-ago) wrote :

*** Bug 421585 has been marked as a duplicate of this bug. ***

In , Gale (gale) wrote :

Created an attachment (id=276)
make error compiling with FFmpeg 11 and FFmpeg SVN

We should put a check into configure that disables FFmpeg if the available
version is too new, or rather if it doesn't have the symbols we need available.
Could be a bit of a pain to write and maintain however.

Ack as known upstream issue, and it's the same in 2.0.1.
http://bugzilla.audacityteam.org/show_bug.cgi?id=540

Needs a clever patch to allow configure to detect what symbols FFmpeg is exporting and select the right code to call them. This gets messy when added to 0.5 and 0.8 support already present in the code base.

Note: The fix does not seem trivial at all. Meanwhile this gets fixed upstream, we will have to mask ffmpeg support in audacity when we will unmask ffmpeg 1.0 to ~arch.

Changed in audacity (Ubuntu):
importance: Undecided → High
summary: - FTBFS with libav in experimental
+ FTBFS with libav9
tags: added: libav9-ftbfs
Changed in audacity (Debian):
importance: Undecided → Unknown
Changed in audacity (Gentoo Linux):
importance: Unknown → Medium
status: Unknown → New
Changed in audacity:
status: Unknown → Confirmed

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/profiles/ChangeLog,v
retrieving revision 1.7496
diff -u -B -r1.7496 ChangeLog
--- ChangeLog 14 Feb 2013 22:33:47 -0000 1.7496
+++ ChangeLog 15 Feb 2013 19:20:37 -0000
@@ -6,6 +6,10 @@
 # Only typo fixes which don't affect portage/repoman behaviour could be avoided
 # here. If in doubt put a record here!

+ 15 Feb 2013; Alexis Ballier <email address hidden> base/package.use.mask:
+ Mask media-sound/audacity[ffmpeg], it needs to be fixed upstream to cope with
+ new releases of FFmpeg/libav. bug #417869
+
   14 Feb 2013; Samuli Suominen <email address hidden> updates/1Q-2013:
   Move rt61-firmware from net-wireless/ to sys-firmware/ category.

Index: base/package.use.mask
===================================================================
RCS file: /var/cvsroot/gentoo-x86/profiles/base/package.use.mask,v
retrieving revision 1.436
diff -u -B -r1.436 package.use.mask
--- base/package.use.mask 11 Feb 2013 09:19:44 -0000 1.436
+++ base/package.use.mask 15 Feb 2013 19:20:37 -0000
@@ -6,6 +6,11 @@
 # New entries go on top.
 #

+# Alexis Ballier <email address hidden> (15 Feb 2013)
+# Needs a huge patch to build against recent releases of FFmpeg/libav.
+# Mask it until upstream fixes it. Bug #417869
+media-sound/audacity ffmpeg
+
 # Julian Ospald <email address hidden> (10 Feb 2013)
 # This flag is experimental and breaks googleearth
 # in numerous ways. Unsupportable.

Changed in audacity (Gentoo Linux):
status: New → Won't Fix
Changed in audacity (Debian):
status: New → Fix Released
Jackson Doak (noskcaj) wrote :

This is fixed in debian, sync it this week if you need it for saucy

Benjamin Drung (bdrung) wrote :

It's not really fixed in Debian. The libav support was disabled in Debian due to the libav API changes instead of updating Audacity to support the new API.

Chris J Arges (arges) on 2013-11-08
tags: added: ftbfs
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in audacity (Ubuntu):
status: New → Confirmed
tags: added: trusty

Is anything being done about this? This has a real effect on real work...

Changed in audacity (Debian):
status: Fix Released → New
Robert Hrovat (robi-hipnos) wrote :

With Ubuntu 14.04 Audacity just became unusable and for us, so did Ubuntu :/

Not a solution, which requires code changes by Audacity developers, but a workaround here:

Audacity under Trusty Tahr: Building it with FFmpeg
http://ubuntuforums.org/showthread.php?t=2219907

Probably something similar would work with libav...

On Mon, Apr 28, 2014 at 6:52 AM, andrew.46 <email address hidden> wrote:
> Not a solution, which requires code changes by Audacity developers, but
> a workaround here:
>
> Audacity under Trusty Tahr: Building it with FFmpeg
> http://ubuntuforums.org/showthread.php?t=2219907
>
> Probably something similar would work with libav...

Building audacity against an ancient version of FFmpeg (nor Libav for
that matter) is not an option for Ubuntu nor Debian. Audacity really
needs to be updated to use modern versions of libavformat.so

--
regards,
    Reinhard

Benjamin Drung (bdrung) wrote :

Michael Niedermayer did the major porting work and I did some simple tweaking to make Audacity work with libav 9 and 10. Attached the uploaded debdiff for Ubuntu 14.04 (trusty):

audacity (2.0.5-1ubuntu3.1) trusty-proposed; urgency=medium

  * Add support for recent FFmpeg/libav versions. Thanks to Michael Niedermayer
    for the porting work. (Closes: #740755, LP: #1076928)
  * Fix default LADSPA search paths on Linux. (Closes: #724836, LP: #1261654)

 -- Benjamin Drung <email address hidden> Sat, 31 May 2014 22:18:25 +0200

tags: added: patch
Changed in audacity (Debian):
status: New → Fix Released
Benjamin Drung (bdrung) on 2014-06-03
description: updated
Benjamin Drung (bdrung) on 2014-06-03
description: updated

Hello Reinhard, or anyone else affected,

Accepted audacity into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/audacity/2.0.5-1ubuntu3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in audacity (Ubuntu Trusty):
status: New → Fix Committed
tags: added: verification-needed
Doug McMahon (mc3man) on 2014-06-05
tags: added: verification-failed
removed: verification-needed
Doug McMahon (mc3man) wrote :

Would have to say failed as the package is built without ffmpeg support

Doug McMahon (mc3man) wrote :

And -
if it is built with ffmpeg support (libav9), then while the FTBFS is fixed via the current patch, when actually trying to use audacity with ffmpeg it will segfault
(SIGABRT in_libc_message()
However patch/audacity works fine with libav10

Benjamin Drung (bdrung) wrote :

Good catch. The changes to the debian/ directory (containing the re-enablement of FFmpeg) got lost while preparing the SRU. I fixed that and located the import crash. The import crash fix is pushed in svn revision 13181 and I have prepared another upload (patch for audacity 2.0.5-1ubuntu3.2 attached).

In , Gale (gale) wrote :

Fixes have recently been committed to support libav 0.8 to 0.10 and FFmpeg 1.2
to 2.2. There are still known issues, see Steps to Reproduce.

In , Gale (gale) wrote :

Created an attachment (id=492)
make log Ubuntu 13.10 with --disable-dynamic-loading

(In reply to comment #2)
@Benjamin, Audacity compiles for me at r13196 against self-compiled FFmpeg
2.2.2 on Ubuntu 14.04 with --disable-dynamic-loading. --disable-dynamic-loading
still fails to compile on Ubuntu 13.10 against self-compiled FFmpeg 2.2.2 (even
on fresh Audacity checkout). I attach the make log, but it shows similar
"undefined reference to `av_codec_is_encoder'" errors as before.

However there is a problem running my self-compiled FFmpeg standalone at the
command-line on 13.10 (I can use FFmpeg in Audacity GUI if I perform default
./configure of Audacity). Running ffmpeg shows this terminal error:

relocation error: /usr/local/lib/libavfilter.so.4: symbol
sws_isSupportedEndiannessConversion, version LIBSWSCALE_2 not defined in file
libswcale.so.2 with link time preference.

Please advise if you think this error is causing Audacity not to compile with
--disable-dynamic-loading.

Hello Reinhard, or anyone else affected,

Accepted audacity into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/audacity/2.0.5-1ubuntu3.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: removed: verification-failed
tags: added: verification-needed
Doug McMahon (mc3man) wrote :

import & export now work with libav9 in 14.04

tags: added: verification-done
removed: verification-needed
Steffen Müller (technik-w) wrote :

import, export and everything else work in 14.04.
Please move it as soon as possible to the universe repository. I need it on our audio workstations :-)

Steffen Müller (technik-w) wrote :

oh, just forgot:

I have testet it by not enabling the -proposed repository rather then downloading and installing the packages by hand:

dpkg -i audacity_2.0.5-1ubuntu3.2_amd64.deb
dpkg -i audacity-data_2.0.5-1ubuntu3.2_all.deb

tags: verification-done

Jackson Doak (noskcaj) on 2014-06-22
Changed in audacity (Ubuntu):
status: Confirmed → Fix Released
Changed in audacity (Ubuntu Trusty):
status: Fix Committed → Fix Released
status: Fix Released → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package audacity - 2.0.5-1ubuntu3.2

---------------
audacity (2.0.5-1ubuntu3.2) trusty-proposed; urgency=medium

  * Really enable FFmpeg and fix crash on FFmpeg import (LP: #1076928)
 -- Benjamin Drung <email address hidden> Thu, 05 Jun 2014 23:16:16 +0200

Changed in audacity (Ubuntu Trusty):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for audacity has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

In , Gale (gale) wrote :

(In reply to comment #3)
Gale wrote:
> --disable-dynamic-loading still fails to compile on Ubuntu 13.10 against
> self-compiled FFmpeg 2.2.2 (even on fresh Audacity checkout).
That is, it fails with --disable-dynamic-loading the only argument, so using
FFMPEG="system".

Configuring with --disable-dynamic-loading and --with-lib-preference="local"
(i.e. with "FFMPEG=local") does build, but the Libraries Preferences are not
disabled.

The relevant part of the build log is:

audacity-FFmpeg.o: In function `import_ffmpeg_decode_frame(_streamContext*,
bool)':
/home/gale/audacity/src/FFmpeg.cpp:364: undefined reference to `av_frame_alloc'
/home/gale/audacity/src/FFmpeg.cpp:414: undefined reference to `av_frame_free'
export/audacity-ExportFFmpeg.o: In function `encode_audio':
/home/gale/audacity/src/export/ExportFFmpeg.cpp:520: undefined reference to
`av_frame_alloc'
/home/gale/audacity/src/export/ExportFFmpeg.cpp:592: undefined reference to
`av_frame_free'
export/audacity-ExportFFmpegDialogs.o: In function
`ExportFFmpegOptions::FetchCodecList()':
/home/gale/audacity/src/export/ExportFFmpegDialogs.cpp:1281: undefined
reference to `av_codec_is_encoder'

I failed to reproduce the build failure. My guess is that the header files used
mismatch with the avcodec library that should be linked against. What FFmpeg
libraries do you have installed and where? Can you run these commands to shed
some light on it?

find /usr/ -name avcodec.h
find /usr/ /lib -name 'libavcodec*.so*'
grep -H av_codec_is_encoder $(find /usr/ -name avcodec.h)

In , Gale (gale) wrote :

(In reply to comment #5)
> What FFmpeg libraries do you have installed and where?
2.2.2 installed in /usr/local/lib.

> Can you run these commands to shed some light on it?
> find /usr/ -name avcodec.h

/usr/include/libavcodec/avcodec.h
/usr/local/include/libavfilter/avcodec.h
/usr/local/include/libavcodec/avcodec.h

> find /usr/ /lib -name 'libavcodec*.so*'

/usr/lib/vlc/plugins/codec/libavcodec_plugin.so
/usr/lib/i386-linux-gnu/libavcodec.so
/usr/lib/i386-linux-gnu/libavcodec.so.53
/usr/lib/i386-linux-gnu/libavcodec.so.53.35.0
/usr/lib/i386-linux-gnu/i686/cmov/libavcodec.so
/usr/lib/i386-linux-gnu/i686/cmov/libavcodec.so.53
/usr/lib/i386-linux-gnu/i686/cmov/libavcodec.so.53.35.0
/usr/local/lib/libavcodec.so
/usr/local/lib/libavcodec.so.55
/usr/local/lib/libavcodec.so.55.52.102

> grep -H av_codec_is_encoder $(find /usr/ -name avcodec.h)

/usr/local/include/libavcodec/avcodec.h:int av_codec_is_encoder(const AVCodec
*codec);

Thanks!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.