#59246 closed defect (fixed)
ffmpeg @4.2.1_1 / x265 @3.2: compile fine but cannot be executed/crash immediately mac os 10.15 catalina / Xcode 11.1
Reported by: | jonasjonas (Frank Hellenkamp) | Owned by: | dbevans (David B. Evans) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.1 |
Keywords: | catalina | Cc: | jeremyhu (Jeremy Huddleston Sequoia), stromnov (Andrey Stromnov), rafaeldcsantos (Rafael Santos), breiter (Brian Reiter), thenickdude (Nicholas Sherlock) |
Port: | ffmpeg |
Description
I compiled all my installed port anew on Mac OS Catalina/Xcode 11.1.
2 of the ports don't work anymore/crash when run: ffmpeg and x265.
$ x265 fish: “x265” terminated by signal SIGSEGV (Address boundary error) $ ffmpeg fish: “ffmpeg” terminated by signal SIGSEGV (Address boundary error)
The old versions (installed on 10.14) still work fine.
Maybe it could be the problem, that the default compile options where changed.
See: https://forums.developer.apple.com/thread/121887
OpenZFS seemed to have worked around this by recompiling with -fno-stack-check: https://twitter.com/openzfsonosx/status/1181818389053882369
Unfortunately I have no idea how to try that in macports.
Change History (19)
comment:1 Changed 5 years ago by jonasjonas (Frank Hellenkamp)
Port: | ffmpeg added |
---|---|
Version: | → 2.6.1 |
comment:2 Changed 5 years ago by jonasjonas (Frank Hellenkamp)
Keywords: | catalina added |
---|
comment:3 Changed 5 years ago by jmroot (Joshua Root)
Cc: | jeremyhu added |
---|---|
Owner: | set to dbevans |
Status: | new → assigned |
comment:4 Changed 5 years ago by stromnov (Andrey Stromnov)
Cc: | stromnov added |
---|
comment:5 follow-up: 9 Changed 5 years ago by breiter (Brian Reiter)
comment:6 Changed 5 years ago by breiter (Brian Reiter)
Adding -fno-stack-check
to configure.cflags-append
in the ffmpeg port file seems to have built me a working ffmpeg.
comment:8 Changed 5 years ago by rafaeldcsantos (Rafael Santos)
Cc: | rafaeldcsantos added |
---|
comment:9 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to breiter:
Adding
os.major 14
to the x265 portfile allows macports to pull down an x265 binary that does not segfault immediately.
Doing that is not recommended.
comment:10 Changed 5 years ago by jonasjonas (Frank Hellenkamp)
The configure.cflags-append -fno-stack-check does seem to work with ffmpeg and with mpv. x256 still does crash with “x265” terminated by signal SIGSEGV (Address boundary error).
comment:11 Changed 5 years ago by breiter (Brian Reiter)
Cc: | breiter added |
---|
comment:12 Changed 5 years ago by kencu (Ken)
x256 probably needs the -f-no-stack-check fix too, then.
comment:13 Changed 5 years ago by jonasjonas (Frank Hellenkamp)
I tried that with x256, but with no success
comment:14 Changed 5 years ago by thenickdude (Nicholas Sherlock)
This bug is being tracked by ffmpeg too:
https://trac.ffmpeg.org/ticket/8073
Analysis by zwaldowski:
"It seems the 10.15 toolchain turns on "-fstack-check" by default for Clang, like some Linux distributions do. [...] Accordingly, adding "-fno-stack-check" to "CFLAGS" - f.ex., by '--extra-cflags="-fno-stack-check"' when configuring works around the problem and builds a functioning FFMPEG."
comment:15 Changed 5 years ago by thenickdude (Nicholas Sherlock)
Cc: | thenickdude added |
---|
comment:16 Changed 5 years ago by breiter (Brian Reiter)
I added compiler.whitelist macports-clang-8.0
to the Portfile for x265 and that fixes it.
comment:17 Changed 5 years ago by cjones051073 (Chris Jones)
Setting a compiler whitelist like that is not recommended. Instead please try just black listing the Xcode 11 clang version.
comment:18 Changed 5 years ago by Chris Jones <jonesc@…>
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:19 Changed 5 years ago by breiter (Brian Reiter)
The patch above only corrects x265. It does not fix ffmpeg which neads configure.cflags-append -fno-stack-check
to be fixed.
Adding
os.major 14
to the x265 portfile allows macports to pull down an x265 binary that does not segfault immediately.