mixer / tachyon

FTL enabled branch of OBS
GNU General Public License v2.0
91 stars 13 forks source link

Unable to launch Tachyon v1.2.14 on macOS Sierra (PB 6, DB 7, 16A313a) #48

Open hjstn opened 8 years ago

hjstn commented 8 years ago

Error: http://pastebin.com/zD9WBSsv Tachyon v1.2.12 launches fine, however. This seems to be similar to #47, but different error messages.

mrpippy commented 7 years ago

I've run into this same problem with other Mac apps using FFmpeg. The problem is that FFmpeg is being compiled for the build machine's CPU, and may use instructions that are not present on older Macs. ff_me_cmp_init_static() in 1.2.14 is using AVX instructions which aren't present in pre-2011 Macs (added in Sandy Bridge), and will cause an illegal instruction crash like this.

Compiling ffmpeg through homebrew is easy, but generates binaries tailored for your exact CPU and OS. The CPU dependency is causing this issue, and the OS dependency is probably the cause of #47.

ffmpeg should be compiled manually, with CFLAGS -mmacosx-version-min to specify a minimum supported OS version, and -march to specify a minimum supported CPU (-march=core2 is a safe default for recent OS X)

hjstn commented 7 years ago

That's interesting, I'll definitely try that, however, my Mac is a 2012 Mac Mini on an 3rd gen i7-3615-QM, so I don't believe that is the problem. Also, the previous build had worked and still remains to work on the official release of Sierra.

mrpippy commented 7 years ago

I just checked Tachyon's libavcodec.57.dylib, and the instruction at ff_me_cmp_init_static + 38 is vpbroadcastq, which is an AVX2 instruction. AVX2 was introduced with Haswell, I would expect this to crash on any pre-2013 Mac.

sslivins commented 7 years ago

@mrpippy thanks, i'll try and recompile without avx2 and see if that fixes it