Bug 201589 - [patch] audio/audacity: issues building with ffmpeg
Summary: [patch] audio/audacity: issues building with ffmpeg
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Ruslan Makhmatkhanov
URL:
Keywords: patch
: 201656 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-07-15 15:05 UTC by Christian Heckendorf
Modified: 2015-07-27 14:19 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (xxjack12xx)


Attachments
Adding libavformat.so FFMPEG_LIB_DEPENDS (531 bytes, patch)
2015-07-15 15:05 UTC, Christian Heckendorf
no flags Details | Diff
Fixing FFmpeg.h extern for 2.7 branch (861 bytes, patch)
2015-07-15 15:06 UTC, Christian Heckendorf
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Heckendorf 2015-07-15 15:05:34 UTC
Created attachment 158801 [details]
Adding libavformat.so FFMPEG_LIB_DEPENDS

If building with poudriere, ffmpeg won't be extracted during the build so it won't notice the new .so bump. It will build but won't dynamically load the ffmpeg library at runtime.

When building with ffmpeg installed, the build will fail because of what seems like errors upstream. Some of the API changed and wasn't updated in audacity in the src/FFmpeg.h extern entries.

Here are a couple of patches that fix the issues for me. I also submitted the source patch upstream.
Comment 1 Christian Heckendorf 2015-07-15 15:06:42 UTC
Created attachment 158802 [details]
Fixing FFmpeg.h extern for 2.7 branch
Comment 2 Jack 2015-07-16 01:42:26 UTC
audacity requires a specific version of ffmpeg that FreeBSD doesn't have. FreeBSD either has the version that is too old or too new. Will need to talk with audacity to see if they can support a newer ffmpeg or if FreeBSD can make a ffmpeg23 port for ffmpeg 2.3
Comment 3 Christian Heckendorf 2015-07-16 14:02:24 UTC
Our Audacity build seems to use our FFmpeg version rather than the one they bundle with their source. The only issue that I can see with using 2.7 is their extern calls in the C -> C++ wrapper are out of date. They are similar enough that adding the needed const keywords to some function parameters shouldn't change the Audacity behaviour. Indeed, after some quick tests using the patch, Audacity picks up the 2.7 FFmpeg library and seems to work with it as expected.
Comment 4 Jack 2015-07-20 04:47:03 UTC
Ok, let's go ahead and add that so the current version will compile. I'm working on getting the new version to work as well.
Comment 5 commit-hook freebsd_committer freebsd_triage 2015-07-27 13:44:56 UTC
A commit references this bug:

Author: rm
Date: Mon Jul 27 13:44:46 UTC 2015
New revision: 392979
URL: https://svnweb.freebsd.org/changeset/ports/392979

Log:
  audio/audacity: fix build with new ffmpeg

  - add patch to fix build with ffmpeg 2.7
  - add ffmpeg to LIB_DEPENDS to fix build in rare cases

  PR:		201589
  Submitted by:	Christian Heckendorf <heckendorfc@gmail.com>
  Approved by:	xxjack12xx@gmail.com

Changes:
  head/audio/audacity/Makefile
  head/audio/audacity/files/patch-src_FFmpeg.h
Comment 6 Ruslan Makhmatkhanov freebsd_committer freebsd_triage 2015-07-27 13:46:08 UTC
Committed, thanks!
Comment 7 Ruslan Makhmatkhanov freebsd_committer freebsd_triage 2015-07-27 14:19:55 UTC
*** Bug 201656 has been marked as a duplicate of this bug. ***