Updating ffmpeg ...

Michael keybounce at gmail.com
Tue Oct 30 03:03:05 UTC 2018


On 2018-10-29, at 7:47 PM, Ryan Schmidt <ryandesign at macports.org> wrote:

> On Oct 29, 2018, at 21:26, Michael wrote:
> 
>> So two things when I attempted to update macports and ffmpeg.
>> 
>> Number 1: There was a HUGE chain of things to update first. Surprising to me was what looked like all of Xwindows.
>> 
>> XWindows? Why?
>> 
>> After X, it updated openssl, then sqlite3, then python select, then python, then more of X ... followed ultimately by graphite2.
>> 
>> But when all was done, ffmpeg fails. Again.
>> 
>> So, I went to the trac page, to try to find that bug report for ffmpeg that I saw in the past, that I thought I did a "me too" CC on.
>> 
>> ...
>> 
>> I could not find it. Anywhere. This is the new trac bug system, as far as I can tell.
>> 
>> Ffmpeg's success rate for about 2 years has been zero. I will get some variation on:
>> 
>> bash-3.2# port activate ffmpeg @4.0.1_0+gpl2
>> --->  Computing dependencies for ffmpeg
>> --->  Deactivating ffmpeg @3.1.4_0+gpl2
>> --->  Cleaning ffmpeg
>> --->  Activating ffmpeg @4.0.1_0+gpl2
>> --->  Cleaning ffmpeg
>> --->  Some of the ports you installed have notes:
>> ffmpeg has the following notes:
>>   *******
>>   ******* This build of ffmpeg includes GPLed code and
>>   ******* is therefore licensed under GPL v2 or later.
>>   *******
>>   ******* The following modules are GPLed:
>>   *******
>>   *******      postproc
>>   *******      libx264
>>   *******      libx265
>>   *******      libxvid
>>   *******
>>   ******* To include all nonfree, GPLed and LGPL code use variant +nonfree.
>>   ******* To remove nonfree and GPLed code leaving only LGPL code remove the
>>   ******* +gpl2 variant.
>>   *******
>> bash-3.2# ffmpeg
>> dyld: Library not loaded: /opt/local/lib/libx264.152.dylib
>> Referenced from: /opt/local/bin/ffmpeg
>> Reason: image not found
>> Trace/BPT trap: 5
>> bash-3.2# 
>> 
>> I was attempting to restore older versions to try to find the old one that used to work, but none of them did.
>> 
>> And I know I've reported this issue before.
> 
> Sorry to hear you're having problems with ffmpeg. I don't think others are experiencing problems.
> 
> You should not see "dyld: Library not loaded: /opt/local/lib/libx264.152.dylib" since that library is provided by the x264 port, on which ffmpeg does declare a dependency. If you are seeing that error, make sure that x264 is updated to the latest version, currently 20171225. You can check using "port installed x264".

To clarify: I was attempting to go back to older versions that "just worked". But installing older versions no longer makes them work.

Fwiw:

bash-3.2# port installed ffmpeg
The following ports are currently installed:
  ffmpeg @3.0.2_0+gpl2
  ffmpeg @3.1.1_0+gpl2
  ffmpeg @3.1.3_0+gpl2
  ffmpeg @3.1.4_0+gpl2
  ffmpeg @3.2_0+gpl2
  ffmpeg @3.2.2_1+gpl2
  ffmpeg @3.2.2_3+gpl2
  ffmpeg @3.2.2_4+gpl2
  ffmpeg @3.2.4_1+gpl2
  ffmpeg @3.2.4_2+gpl2
  ffmpeg @3.2.4_3+gpl2
  ffmpeg @3.2.4_4+gpl2
  ffmpeg @3.3.2_1+gpl2
  ffmpeg @3.3.3_0+gpl2
  ffmpeg @3.3.3_1+gpl2
  ffmpeg @3.3.4_0+gpl2
  ffmpeg @4.0_1+gpl2
  ffmpeg @4.0.1_0+gpl2 (active)
bash-3.2# port installed x264
The following ports are currently installed:
  x264 @20160119_0
  x264 @20161201_0 (active)
  x264 @20170522_0
  x264 @20171225_0
bash-3.2# 

In general: While compiling, mac ports will ensure that everything is updated to the newest version, even if deactivating a library port results in removing library version that other older ports might want. But when re-activating older versions, macports will make no attempt to figure out what else needs to be reactivated, and not only is there no way to recover a previously working set of activations, there's no way to deal with "program X wants older library x, while program Y wants newer library y."

They might be in different files, but since they are installed by different versions of the same port, they won't live at the same time.

Macports has the dependency diamond problem in spades.

As for that x264 issue, trying to fix that gives this next problem:

bash-3.2# ffmpeg
dyld: Library not loaded: /opt/local/lib/libx265.160.dylib
  Referenced from: /opt/local/bin/ffmpeg
  Reason: image not found
Trace/BPT trap: 5
bash-3.2# port contents x265
Port x265 contains:
  /opt/local/bin/x265
  /opt/local/include/x265.h
  /opt/local/include/x265_config.h
  /opt/local/lib/libx265.165.dylib
  /opt/local/lib/libx265.a
  /opt/local/lib/libx265.dylib
  /opt/local/lib/pkgconfig/x265.pc
bash-3.2# port installed x265
The following ports are currently installed:
  x265 @2.1_0
  x265 @2.2_0
  x265 @2.3_0
  x265 @2.4_0
  x265 @2.5_0
  x265 @2.6_0
  x265 @2.8_1
  x265 @2.9_0 (active)
bash-3.2# 

As I said, I can't keep multiple version of libx265.xxx around from different versions; no matter what I do, finding a working combo for ffmpeg will break things that don't like that version of libraries.

> And yes, the ffmpeg dependency chain does include some X11 ports. ffmpeg has an x11 variant which is not enabled by default, but some of ffmpeg's dependencies have x11 variants that are enabled by default. If you don't want to use X11, often you can ask MacPorts to use Quartz instead. If you want to do that, it's best to uninstall all ports first, then add "+quartz -x11" to variants.conf and reinstall the ports you want.

Which is odd, because I do have those options on most things I've installed.

The real problem: How in the bleep do I even determine where in the dependency chain the X11 dependency is declared? As I wrote that previous line (I've got +quartz on a lot of things), it occurred to me that there might be a mixed quartz/X11 on some of my ports that is confusing the build system.

---
Entertaining minecraft videos
http://YouTube.com/keybounce



More information about the macports-users mailing list