Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#61668 closed defect (fixed)

ffmpeg 4.3.1: fails to install on Apple Silicon

Reported by: jpanetta (Julian Panetta) Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: dbe5007 (Dan Elbich), jeremyhu (Jeremy Huddleston Sequoia), Dave-Allured (Dave Allured), ryandesign (Ryan Carsten Schmidt), fracai, A-Herold, mascguy (Christopher Nielsen)
Port: ffmpeg

Description (last modified by jpanetta (Julian Panetta))

ffmpeg currently does not install on Apple Silicon due to unsupported/broken dependencies on arm64: rsvg, x264, libvpx, and soxr. I have managed to fix all of these except rsvg with the following pull requests/commits:

https://github.com/jpanetta/macports-ports/commit/bd5c4becfb398ffd1b4555e38663448a2208d132 https://github.com/macports/macports-ports/pull/9252 https://github.com/macports/macports-ports/pull/9253

I did not create a pull request for my x264 fix since I'm not sure it is acceptable to use a commit on master instead of stable (which doesn't support Apple Silicon yet). Also, the old PPC assembly patch needs to be updated.

Unfortunately, rsvg looks more difficult because of its rust dependency, so I just disabled it in the commit here:

https://github.com/jpanetta/macports-ports/commit/d282ae91bfabf4dc97af3f592238c03cf6b69051

Would something like this (restricted to the arm64 build architecture) be acceptable as a temporary workaround?

Change History (20)

comment:1 Changed 4 years ago by jpanetta (Julian Panetta)

Description: modified (diff)

comment:2 Changed 4 years ago by kencu (Ken)

The thing to do for now is to use the non-rust fallback librsvg that we use on all the older systems by tweaking this test so that the arm64 macs are included:

<https://github.com/macports/macports-ports/blob/0f4f4f445f5784d69cbc0f9abe8c71cd7a5a5b47/graphics/librsvg/Portfile#L58>

comment:3 Changed 4 years ago by jmroot (Joshua Root)

Owner: set to dbevans
Port: ffmpeg added
Status: newassigned

comment:4 Changed 4 years ago by jpanetta (Julian Panetta)

Thanks--indeed the pre-rust librsvg builds perfectly and now the original ffmpeg Portfile works! I have created a pull request for librsvg making the change you suggested: https://github.com/macports/macports-ports/pull/9263

comment:5 Changed 4 years ago by jpanetta (Julian Panetta)

In 732a7cbe247e68ac6f14272c8ac556403fec5e03/macports-ports (master):

librsvg: revert to pre-cargo version on Apple Silicon

  • Add arm64/universal to the list of platforms under which the pre-cargo version of librsvg should be used.

References: #61668

comment:6 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

You can't vary the port version in a variant. The portindex does not accommodate that.

comment:7 Changed 4 years ago by kencu (Ken)

Then -- just use the fallback librsvg all the time, except on 10.14 that can't build anything universal?

Or just totally forget this rust nonsense, and just use the fallback librsvg all the time, everywhere. They were a bit adventuresome to default on a rust-requiring version anyway, if you ask me.

comment:8 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Yeah I don't like that they rewrote librsvg in rust either. It's been nothing but problems for us.

Since rust only supports x86_64, nothing that uses rust can have a working universal variant anyway. #60438, #60943.

comment:9 Changed 4 years ago by Dave-Allured (Dave Allured)

Cc: Dave-Allured added

comment:10 in reply to:  6 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign:

You can't vary the port version in a variant. The portindex does not accommodate that.

In addition, you've downgraded the version of librsvg for some users without increasing the epoch which would be necessary to deliver that change to those users.

So for these reasons the change should be reverted, please.

comment:11 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign added

comment:12 Changed 4 years ago by kencu (Ken)

well we have to leave the arm64 part in at least until rust comes out on arm..but we can take out the universal part and just let all those universal builds faiil again if you like.

Or .... ?

Version 0, edited 4 years ago by kencu (Ken) (next)

comment:13 Changed 4 years ago by kencu (Ken)

done.

comment:14 Changed 4 years ago by kencu (Ken)

In 183c332de9ee740d725f2032ca931f9d432dfed7/macports-ports (master):

librsvg: remove universal from fallback test

the universal build does not work with the rust
variant of librsvg, but falling back to the C
version has issues in that it would require another
epoch bump to accomplish this and this is not felt to be
a desirable approach

this commit will break universal builds on all systems

see: #61668#comment:10

comment:15 Changed 4 years ago by kencu (Ken)

all newer systems, I guess I should have said, that are not defaulting to the C version of librsvg now.

comment:16 Changed 4 years ago by kencu (Ken)

ffmpeg installs fine if you delete libvpx out of the ffmpeg portfile:

% port -v installed ffmpeg
The following ports are currently installed:
  ffmpeg @4.3.1_0+gpl2-x11 (active) platform='darwin 20' archs='arm64' date='2020-12-20T00:35:30-0500'

comment:17 Changed 4 years ago by fracai

Cc: fracai added

comment:18 Changed 4 years ago by A-Herold

Cc: A-Herold added

comment:19 Changed 3 years ago by mascguy (Christopher Nielsen)

Resolution: fixed
Status: assignedclosed

ARM build issues for ffmpeg were resolved on 2/5/2021. Closing as fixed.

https://ports.macports.org/port/ffmpeg/builds

comment:20 Changed 3 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added
Note: See TracTickets for help on using tickets.