My system is macOS Sierra (10.12.3) built from the latest bootstrap-prefix.sh. I haven't looked into this but the precheck for mpv-0.24.0 fails: >>> Running pre-merge checks for media-video/mpv-0.24.0 * ERROR: media-video/mpv-0.24.0::gentoo_prefix failed (pretend phase): * Your compiler lacks C++11 TLS support. Use GCC>=4.8 or Clang>=3.3. * * Call stack: * ebuild.sh, line 115: Called __call-ebuildshell 'pkg_pretend' * ebuild.sh, line 529: Called pkg_pretend * mpv-0.24.0.ebuild, line 156: Called mpv_check_compiler * mpv-0.24.0.ebuild, line 147: Called die * The specific snippet of code: * die "Your compiler lacks C++11 TLS support. Use GCC>=4.8 or Clang>=3.3." Just commenting out the check seems to fix the issue, and mpv builds and works fine (but it does require a more recent version of ffmpeg than is in the tree). Reproducible: Always
Please use the supported compiler as told by the error message. Also provide your 'emerge --info' output. There is some generic code (see video/out/opengl/context.c) that benefits from TLS support and I am not interested in either tracking down every possible situation where it's used or creating a separate USE flag in this case.
Already using a supported compiler: clang version 3.9.1 (tags/RELEASE_391/final) Which thinks it has TLS support: Checking for C11 TLS support : yes I suspect it's an issue with tc-has-tls on macOS. Since this ebuild will fail for anyone compiling on macOS, hopefully they will find this ticket (or more likely, just override it as I did).
Reopening, pulling to Prefix area.
(In reply to * from comment #2) > Already using a supported compiler: > clang version 3.9.1 (tags/RELEASE_391/final) > > Which thinks it has TLS support: > Checking for C11 TLS support : yes > > I suspect it's an issue with tc-has-tls on macOS. Since this ebuild will > fail for anyone compiling on macOS, hopefully they will find this ticket (or > more likely, just override it as I did). Ok, I see. This bugreport should be against toolchain-funcs eclass as it has nothing to do with mpv specifically.
I've synced toolchain-funcs.eclass, but found no changes to the tc-has-tls function. running the function manually reveals this: clang -fPIC -shared -Wl,-z,defs y.c -o y ld: unknown option: -z clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation) IOW tc-has-tls uses GNU binutils specifics to establish whether or not tls works.
Darwin ld uses -undefined error by default (to match the -z defs) so, will add a conditional to the prefix version of the eclass there.
I've added the fix (seems to make the check work for me). I'll close this bug now, should you find new problems with mpv itself, please report a new bug. Thanks!
(In reply to Fabian Groffen from comment #7) > I've added the fix (seems to make the check work for me). > > I'll close this bug now, should you find new problems with mpv itself, > please report a new bug. > > Thanks! Nice, thank you.