Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffmpeg 4.2.1 #42827

Closed
wants to merge 1 commit into from
Closed

ffmpeg 4.2.1 #42827

wants to merge 1 commit into from

Conversation

@chenrui333
Copy link
Member

@chenrui333 chenrui333 commented Aug 5, 2019

Created with brew bump-formula-pr.

@lembacon
Copy link
Member

@lembacon lembacon commented Aug 5, 2019

Error: 1 problem in 1 formula detected
ffmpeg:
  * Non-executables were installed to "/usr/local/opt/ffmpeg/bin"
    The offending files are:
      /usr/local/opt/ffmpeg/bin/python

Loading

@robertleeblairjr
Copy link
Contributor

@robertleeblairjr robertleeblairjr commented Aug 6, 2019

I believe the failure is the python binding to mpv when it's built/compiled. You could submit a bug report to mpv on GH.
https://github.com/mpv-player/mpv/issues

Loading

@retokromer
Copy link
Contributor

@retokromer retokromer commented Aug 7, 2019

According to @lachs0r (mpv):

Not our fault.

Loading

@robertleeblairjr
Copy link
Contributor

@robertleeblairjr robertleeblairjr commented Aug 8, 2019

According to @lachs0r (mpv):

Not our fault.

According to mpv compile page, they don't support linking against any version of FFmpeg other than the one they're currently using in the project, which is 4.1.x. So, this won't be resolved until mpv updates the project with using FFmpeg 4.2. However, I believe there is going to be a problem with having the commit because FFmpeg 4.2 won't be in the repo but the new version of mpv which requires it will want to build against it.

Copy/paste from mpv project page.

FFmpeg ABI compatibility
mpv does not support linking against FFmpeg versions it was not built with, even if the linked version is supposedly ABI-compatible with the version it was compiled against. Expect malfunctions, crashes, and security issues if you do it anyway.
The reason for not supporting this is because it creates far too much complexity with little to no benefit, coupled with absurd and unusable FFmpeg API artifacts.
Newer mpv versions will refuse to start if runtime and compile time FFmpeg library versions mismatch.

Loading

@robertleeblairjr
Copy link
Contributor

@robertleeblairjr robertleeblairjr commented Aug 8, 2019

The homebrew formula for 'mpv' is pulling an archive of source that's not been updated since October 2018. If homebrew is going to build 'mpv' formula, then it would be better to do a build against mpv project's master branch which has updates to 'waf' whereby it has patches from the version included in the *.tar.gz source file this formula is downloading. I believe the problem would be resolved if this homebrew formula pulled the branch, which may not be possible, instead of an outdated archive on the mpv GitHub page.

Loading

@robertleeblairjr
Copy link
Contributor

@robertleeblairjr robertleeblairjr commented Aug 8, 2019

If homebrew is going to use outdated project compiled source files, then they need to have something in place which will not keep requirement/dependency formula from not being updated by those formula which depend on it. In this situation, mpv project is claiming not their fault because master branch builds just fine with FFmpeg 4.2, along with python and other build requirements. The project doesn't provide source archived releases very often and there have been close to 400 commits/fixes since the 0.29.1 package on master. I would submit a PR for updating the mpv formula to git pull master for the mpv project but this goes against their Acceptable Formula stipulation. Although, they've made an exception for certain formula such as 'pip'. I believe they could make an exception for mpv so that FFmpeg, which should take precedence, can not conflict with it.
@SMillerDev Can you take a look at if mpv formula can be an exception for pulling master branch since the mpv project rarely updates their releases for source? It's conflicting with FFmpeg formula being updated. Thanks.

Loading

@SMillerDev
Copy link
Member

@SMillerDev SMillerDev commented Aug 8, 2019

I would be very hesitant to make exceptions here. Can you at least request that they tag a release?

Loading

@robertleeblairjr
Copy link
Contributor

@robertleeblairjr robertleeblairjr commented Aug 8, 2019

I would be very hesitant to make exceptions here. Can you at least request that they tag a release?

Went to mpv project to file an issue to see if they would update. @retokromer was on it. Thanks for the reply.

Loading

@SMillerDev
Copy link
Member

@SMillerDev SMillerDev commented Aug 8, 2019

Got a link?

EDIT: And what does ffmpeg suggest their packages link to? Just mpv master?

Loading

@robertleeblairjr
Copy link
Contributor

@robertleeblairjr robertleeblairjr commented Aug 8, 2019

@SMillerDev Can you look at making an exception or just having mpv removed as formula and available only as a cask? I believe the mpv project, at the moment, is not going to update their snapshot releases which this formula relies on. So, who knows if another minor revision will be released, not likely, or when the major version will be released. A maintainer at the project stated 0.30 release is unknown. From the conversation, it's most likely not any time soon. I would think that either mpv would need to be removed or something changed so as not to conflict with FFmpeg which is used in other formula, as well. Perhaps, moving to just pulling from Master, which I realize is not optimal to the project's policy. However, those interested in mpv could get it from another tap, if they're wanting to build it, as well. Thoughts?

Loading

@robertleeblairjr
Copy link
Contributor

@robertleeblairjr robertleeblairjr commented Aug 8, 2019

Loading

@robertleeblairjr
Copy link
Contributor

@robertleeblairjr robertleeblairjr commented Aug 8, 2019

EDIT: And what does ffmpeg suggest their packages link to? Just mpv master?

I would have to do a little research to determine if the FFmpeg project has recommendations for mpv specifically. However, I wouldn't think there's a preference since mpv is dependent upon FFmpeg and not vice versa. Here's a list of projects which compile with needing FFmpeg.
https://trac.ffmpeg.org/wiki/Projects
The mpv formula doesn't take precedence over the FFmpeg formula though which is used and a requirement in other Homebrew-Core formula.

Loading

@robertleeblairjr
Copy link
Contributor

@robertleeblairjr robertleeblairjr commented Aug 8, 2019

Got a link?

EDIT: And what does ffmpeg suggest their packages link to? Just mpv master?

Maintainers in this issue suggested using the cask if mpv will not build against FFmpeg 4.2. Unless, homebrew can make an exception to allow pulling master, instead of the much older source tarball, then this will stay broken for some time. As of right now, the two major choices to allow the new version of FFmpeg formula is to make the exception for mpv formula or remove it since there is a cask. Any other ideas?
https://github.com/mpv-player/mpv/issues/6850

Loading

@pigoz
Copy link
Contributor

@pigoz pigoz commented Aug 8, 2019

mpv builds fine with FFmpeg 4.2, but in general if you build mpv with any version of FFmpeg, it is ABI compatible only with that version (which can cause crashes if you try to use dylibs from another FFmpeg version).

I suggest you use a revision to force a rebuild of the formula against the new FFmpeg. That's what other package maintainers do.

Loading

@robertleeblairjr
Copy link
Contributor

@robertleeblairjr robertleeblairjr commented Aug 8, 2019

mpv builds fine with FFmpeg 4.2, but in general if you build mpv with any version of FFmpeg, it is ABI compatible only with that version (which can cause crashes if you try to use dylibs from another FFmpeg version).

I suggest you use a revision to force a rebuild of the formula against the new FFmpeg. That's what other package maintainers do.

Sounds good and I've learned something new. However it sounds like a catch-22 to me. How do you have FFmpeg with it's linked libraries committed to the repo in order to revise mpv so that it will build against the newly committed FFmpeg if it can't be committed because of failing a link test with mpv? Or, how do you have mpv rebuild whenever an FFmpeg PR needs checked/tested for commit?

Loading

@pigoz
Copy link
Contributor

@pigoz pigoz commented Aug 8, 2019

You could add a separate commit in the same PR that bumps the revision. I'm not familiar that much with homebrew, but I would imagine whatever tests run, they do on the changeset and not the single commits.

Loading

@robertleeblairjr
Copy link
Contributor

@robertleeblairjr robertleeblairjr commented Aug 8, 2019

You could add a separate commit in the same PR that bumps the revision. I'm not familiar that much with homebrew, but I would imagine whatever tests run, they do on the changeset and not the single commits.

Neither am I. But, that's a great suggestion if it's feasible. I'll see what I come across as to if this is either implemented in other formula and is doable.

Loading

@robertleeblairjr
Copy link
Contributor

@robertleeblairjr robertleeblairjr commented Aug 8, 2019

Created with brew bump-formula-pr.

Can you close/reopen to initiate again or comment to @BrewTestBot ? I've submitted a PR for mpv to bump the revision from 3 > 4. Unsure if that's all which was needed in order to get this PR to pass mpv link test. But, giving it a shot.

Loading

@jonchang
Copy link
Member

@jonchang jonchang commented Aug 8, 2019

A separate pull request to bump the revision of mpv is not needed, since it will still be building against ffmpeg 4.1.x. The revision bump should instead happen in this pull request so that ffmpeg 4.2 + mpv revision are built and tested at the same time.

Furthermore ffmpeg 4.2 is failing brew audit so none of that will happen until the audit is fixed.

Loading

@chenrui333
Copy link
Member Author

@chenrui333 chenrui333 commented Aug 8, 2019

Sure, restart a build now.

Loading

@chenrui333
Copy link
Member Author

@chenrui333 chenrui333 commented Aug 8, 2019

@BrewTestBot test this please

Loading

@robertleeblairjr
Copy link
Contributor

@robertleeblairjr robertleeblairjr commented Aug 9, 2019

A separate pull request to bump the revision of mpv is not needed, since it will still be building against ffmpeg 4.1.x. The revision bump should instead happen in this pull request so that ffmpeg 4.2 + mpv revision are built and tested at the same time.

Furthermore ffmpeg 4.2 is failing brew audit so none of that will happen until the audit is fixed.

Thanks. Yep, I can't do that in this PR. Also, didn't know it was failing because of audit. Thought it was just a link test fail with mpv and caused by python.
FFmpeg Dependencies from brew deps --installed --tree

ffmpeg
|── aom
|── fontconfig
│ └── freetype
│ └── libpng
|── freetype
│ └── libpng
|── frei0r
|── gnutls
│ |── gmp
│ |── libidn2
│ │ |── gettext
│ │ └── libunistring
│ |── libtasn1
│ |── libunistring
│ |── nettle
│ │ └── gmp
│ |── p11-kit
│ │ └── libffi
│ └── unbound
│ |── libevent
│ │ └── openssl
│ └── openssl
|── lame
|── libass
│ |── freetype
│ │ └── libpng
│ |── fribidi
│ └── harfbuzz
│ |── cairo
│ │ |── fontconfig
│ │ │ └── freetype
│ │ │ └── libpng
│ │ |── freetype
│ │ │ └── libpng
│ │ |── glib
│ │ │ |── gettext
│ │ │ |── libffi
│ │ │ |── pcre
│ │ │ └── python
│ │ │ |── gdbm
│ │ │ |── openssl
│ │ │ |── readline
│ │ │ |── sqlite
│ │ │ │ └── readline
│ │ │ └── xz
│ │ |── libpng
│ │ |── lzo
│ │ └── pixman
│ |── freetype
│ │ └── libpng
│ |── glib
│ │ |── gettext
│ │ |── libffi
│ │ |── pcre
│ │ └── python
│ │ |── gdbm
│ │ |── openssl
│ │ |── readline
│ │ |── sqlite
│ │ │ └── readline
│ │ └── xz
│ |── graphite2
│ └── icu4c
|── libbluray
│ |── fontconfig
│ │ └── freetype
│ │ └── libpng
│ └── freetype
│ └── libpng
|── libsoxr
|── libvorbis
│ └── libogg
|── libvpx
|── opencore-amr
|── openjpeg
│ |── libpng
│ |── libtiff
│ │ └── jpeg
│ └── little-cms2
│ |── jpeg
│ └── libtiff
│ └── jpeg
|── opus
|── rtmpdump
│ └── openssl
|── rubberband
│ |── libsamplerate
│ │ └── libsndfile
│ │ |── flac
│ │ │ └── libogg
│ │ |── libogg
│ │ └── libvorbis
│ │ └── libogg
│ └── libsndfile
│ |── flac
│ │ └── libogg
│ |── libogg
│ └── libvorbis
│ └── libogg
|── sdl2
|── snappy
|── speex
│ └── libogg
|── tesseract
│ |── leptonica
│ │ |── giflib
│ │ |── jpeg
│ │ |── libpng
│ │ |── libtiff
│ │ │ └── jpeg
│ │ |── openjpeg
│ │ │ |── libpng
│ │ │ |── libtiff
│ │ │ │ └── jpeg
│ │ │ └── little-cms2
│ │ │ |── jpeg
│ │ │ └── libtiff
│ │ │ └── jpeg
│ │ └── webp
│ │ |── jpeg
│ │ |── libpng
│ │ └── libtiff
│ │ └── jpeg
│ └── libtiff
│ └── jpeg
|── theora
│ |── libogg
│ └── libvorbis
│ └── libogg
|── x264
|── x265
|── xvid
└── xz

Loading

@jonchang
Copy link
Member

@jonchang jonchang commented Aug 9, 2019

Feel free to open a separate pull request if you can fix the audit and reverse dependency issues.

Loading

@robertleeblairjr
Copy link
Contributor

@robertleeblairjr robertleeblairjr commented Aug 9, 2019

Feel free to open a separate pull request if you can fix the audit and reverse dependency issues.

Merely a novice hobbyist trying to help solve problems. So, my input is limited but I may be able to find more simple fixes. Looks like there are two libraries which build using python in ffmpeg; libass and glib. So, I wouldn't know what has changed to cause this issue from the last 4.1.4 > 4.2. Obviously, if these same dependencies which are used by the ffmpeg project had failed, then they would not have released this version. What does audit explicitly do which isn't allowed but is fine with building from source?

Loading

@jonchang
Copy link
Member

@jonchang jonchang commented Aug 9, 2019

Audit performs automated checks to ensure that submitted formula comply with various Homebrew policies. If you applied this pull request to your local install and ran brew install -s ffmpeg && brew audit ffmpeg you would likely get the same result as our CI infrastructure.

Loading

@robertleeblairjr
Copy link
Contributor

@robertleeblairjr robertleeblairjr commented Aug 9, 2019

The audit installs gem bundler for dependencies. So, if python being installed by a library wasn't a problem before, then why would it be now? Would a dependency of the library being built need to be stated for the formula as just an option using :build?

Loading

@robertleeblairjr
Copy link
Contributor

@robertleeblairjr robertleeblairjr commented Aug 9, 2019

Audit performs automated checks to ensure that submitted formula comply with various Homebrew policies. If you applied this pull request to your local install and ran brew install -s ffmpeg && brew audit ffmpeg you would likely get the same result as our CI infrastructure.

Alright, I'll look at if anything has changed/added by ffmpeg project for building. Is it possible that something that was changed from 4.1.4 > 4.2 is fine for building from source but now has caused audit to fail?

Loading

@jonchang
Copy link
Member

@jonchang jonchang commented Aug 9, 2019

The audit installs gem bundler for dependencies. So, if python being installed by a library wasn't a problem before, then why would it be now? Would a dependency of the library being built need to be stated for the formula as just an option using :build?

I don't understand what this means, or how bundler is related to this audit message at all.

Error: 1 problem in 1 formula detected
ffmpeg:
  * Non-executables were installed to "/usr/local/opt/ffmpeg/bin"
    The offending files are:
      /usr/local/opt/ffmpeg/bin/python

This formula is installing a non-executable file called python into the bin folder. Therefore, the solution should involve not placing non-executables into the bin folder.

Loading

@chenrui333
Copy link
Member Author

@chenrui333 chenrui333 commented Sep 8, 2019

looks like the build still failing.

Loading

@retokromer
Copy link
Contributor

@retokromer retokromer commented Sep 8, 2019

I guess this is still the mpv issue mentioned in #42827 (comment).

Loading

@chenrui333
Copy link
Member Author

@chenrui333 chenrui333 commented Sep 8, 2019

yeah, exact that swift issue.

Loading

Copy link
Contributor

@danielbair danielbair left a comment

If the revision change to the mpv.rb formula were removed from this pull request, the ffmpeg.rb formula might just pass the checks now.

Loading

Copy link
Contributor

@danielbair danielbair left a comment

This is an advantage to include and it is not causing the build to fail.

Loading

Copy link
Contributor

@danielbair danielbair left a comment

This passes the brew audit tests on my system

Loading

Copy link
Contributor

@danielbair danielbair left a comment

If the revision change to the mpv.rb formula were removed from this pull request, the ffmpeg.rb formula might just pass the checks now.

Loading

@danielbair
Copy link
Contributor

@danielbair danielbair commented Sep 9, 2019

Ok,

This is my proposed fix for the mpv.rb formula. It does build fine on the latest xcode and with the latest ffmpeg 4.2.1 and passes "brew audit --strict' on my system.

class Mpv < Formula
  desc "Media player based on MPlayer and mplayer2"
  homepage "https://mpv.io"
- url "https://github.com/mpv-player/mpv/archive/v0.29.1.tar.gz"
- sha256 "f9f9d461d1990f9728660b4ccb0e8cb5dce29ccaa6af567bec481b79291ca623"
- revision 4
+ url "https://github.com/mpv-player/mpv/archive/6e6ec331685c78584a818f524286670911e8b4af.tar.gz"
+ version "0.29.1~6e6ec33"
+ sha256 "fbb5ebc72c55af6e62cb3835b87b0fd26160533350f17e73712791870bdbe017"
  head "https://github.com/mpv-player/mpv.git"

  bottle do

Loading

@slhck
Copy link
Contributor

@slhck slhck commented Sep 9, 2019

I don't believe that it is acceptable to “invent” a release just to make a Homebrew formula build. There is simply no 0.29.2 version of mpv yet, so we can't put that in a Homebrew formula and cut from master whenever we feel like.

Note that I am absolutely not against finding a solution here, but I strongly believe that this is not a good one. Having an exception for the formula to pull from master while keeping its old version (and providing a caveat) seems more meaningful to me.

Loading

@danielbair
Copy link
Contributor

@danielbair danielbair commented Sep 9, 2019

I don't believe that it is acceptable to “invent” a release just to make a Homebrew formula build. There is simply no 0.29.2 version of mpv yet, so we can't put that in a Homebrew formula and cut from master whenever we feel like.

Note that I am absolutely not against finding a solution here, but I strongly believe that this is not a good one. Having an exception for the formula to pull from master while keeping its old version (and providing a caveat) seems more meaningful to me.

I tried keeping the version the same as before, but brew audit --strict failed complaining that the source and sha had changed for the same version...

I do understand about not inventing a version, because if the next tag comes out with that same version number then there is a conflict.

Anyone else know what to do here?

Loading

@SMillerDev
Copy link
Member

@SMillerDev SMillerDev commented Sep 9, 2019

@Homebrew/core opinions?

Loading

@SMillerDev
Copy link
Member

@SMillerDev SMillerDev commented Sep 9, 2019

Could you rebase on master?

Loading

@danielbair
Copy link
Contributor

@danielbair danielbair commented Sep 9, 2019

Could you rebase on master?

Do you mean https://github.com/mpv-player/mpv/archive/master.tar.gz ?
But the sha will always be changing won't it?

Loading

@slhck
Copy link
Contributor

@slhck slhck commented Sep 9, 2019

No, Sean meant rebasing the PR against homebrew-core's master branch.

Loading

@SMillerDev
Copy link
Member

@SMillerDev SMillerDev commented Sep 9, 2019

No, Sean meant rebasing the PR against homebrew-core's master branch.

Yeah, this

Loading

@danielbair
Copy link
Contributor

@danielbair danielbair commented Sep 10, 2019

@chenrui333 you will have to rebase this PR against the current master, because of its age.

Loading

maki-chan added a commit to maki-chan/homebrew-moreoptionals that referenced this issue Sep 10, 2019
@chenrui333
Copy link
Member Author

@chenrui333 chenrui333 commented Sep 13, 2019

yeah, I am doing that now.

Loading

@danielbair danielbair mentioned this pull request Sep 13, 2019
5 tasks
@danielbair danielbair mentioned this pull request Sep 15, 2019
5 tasks
danielbair added a commit to danielbair/homebrew-core that referenced this issue Sep 19, 2019
Considering that the tagged release 0.29.1 of mpv cannot be built on macos 10.14.x (see Homebrew#42827 (comment)), and that there exists a 'brew cask install mpv', and that the mpv developers do not support tagged releases anymore but only operate from master, and that homebrew maintainer policy regarding tagged releases and the mpv developer policy are in conflict, it only seems reasonable to completely delete this formula.
jonchang added a commit that referenced this issue Sep 25, 2019
Considering that the tagged release 0.29.1 of mpv cannot be built on macos 10.14.x (see #42827 (comment)), and that there exists a 'brew cask install mpv', and that the mpv developers do not support tagged releases anymore but only operate from master, and that homebrew maintainer policy regarding tagged releases and the mpv developer policy are in conflict, it only seems reasonable to completely delete this formula.
@jonchang
Copy link
Member

@jonchang jonchang commented Sep 25, 2019

Fixed by #44282

Loading

@jonchang jonchang closed this Sep 25, 2019
@lock lock bot added the outdated label Jan 8, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

10 participants