Closed deus0ww closed 1 year ago
cc @kasper93
I will add code path without using concepts to resolve this issue. But we need to define the line somwhere, because if we start going back to Ubuntu 18.04 era compilers, it may not be worth my effort to fix that target...
I totally understand ending support for old systems/compilers and I would really appreciate it if you could document new requirements somewhere. This way users will know if a change is intentional or an oversight.
It is be GCC 10 and Clang 10 currently. GCC actually supports concepts since 6, but as TS, so need to use different namespace.
I don't know what versions it is in Apple Clang world.
In general I think we do not define hard requirement, because our support is opportunistic. If a user comes with an issue and it is not a pain to fix/add support we can do that.
macOS 10.14:
$ clang --version
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin17.7.0
macOS 10.13:
$ clang --version
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin18.7.0
Unfortunately for me, this is equivalent to Clang 9... source
We should, at the very least, add a check to meson.build and warn the user with a more readable error message (where the minimum requirements are also printed).
Though, if we're adding a meson check, why not just directly check to see if from_chars
compiles, and not require the concept
?
Compilation errors are compilation errors, not generation ones.
We should, at the very least, add a check to meson.build and warn the user with a more readable error message (where the minimum requirements are also printed).
It's pretty clear message, "concepts failed to compile" and we use concepts. It is completely unrelated to conversion code in fact.
How do you imagine checking all that in meson and inferring "better" message? Do you plan to maintain supported compiler list in meson and somehow keep it updated? Or compile convert.cc also during generation and parse compiler output? Or unit test all 14 conversion function individually in meson?
It's pretty clear message, "concepts failed to compile" and we use concepts.
Pretty clear if you ignore the clutter/flood of irrelevant messages surrounding it.
How do you imagine checking all that in meson and inferring "better" message?
has_concepts = cc.compiles('template<typename T> concept Test = true;')
Or unit test all 14 conversion function individually in meson?
Afaict, it's only two cases we care about: parsing float, and printing float. So only two checks needed, no?
Pretty clear if you ignore the clutter/flood of irrelevant messages surrounding it.
Don't @ me. It is compiler issue. Incidentally newer compilers produce better diagnostics, but we are talking about older ones here.
has_concepts = cc.compiles('template
concept Test = true;')
Just don't use concepts. No need to really check it.
Probably fixed by https://code.videolan.org/videolan/libplacebo/-/merge_requests/584
@deus0ww: Could you give it a try?
On macOS 10.14, it's failing during linking:
Undefined symbols for architecture x86_64:
"std::__1::__itoa::__u32toa(unsigned int, char*)", referenced from:
_pl_str_print_int in convert.cc.o
_pl_str_print_uint in convert.cc.o
"std::__1::__itoa::__u64toa(unsigned long long, char*)", referenced from:
_pl_str_print_int64 in convert.cc.o
_pl_str_print_uint64 in convert.cc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
So this was likely fixed by https://reviews.llvm.org/D74626
libc++ incorrectly make them available, while to looks like appropriate symbols are available starting with 10.15.
I don't know if you can build on newer macos and link statically libc++?
@haasn: What do we do about it? This would essentially mean to revert all convert.cc
to support <= 10.14 as it looks like even basic conversion don't work.
@kasper93 macOS 10.14 is from 2018, right? Then actually, why do we care? Arguably even Ubuntu 20.04 is stretching it, because 22.04 is current LTS.
Maybe we should just revert this patch.
macOS 10.14 is from 2018, right? Then actually, why do we care?
I don't know about macOS. I don't use their ecosystem, don't even know if 10.14 is relevant still or not.
Arguably even Ubuntu 20.04 is stretching it, because 22.04 is current LTS.
We can wait for next LTS, I think 20.04 is still common.
Maybe we should just revert this patch.
Nah, let's keep it, it is not that terrible. I'm just surprised it fails during linking now. Apparently Apple is not that good w.r.t. C++ or even POSIX support...
Thank you, both, for looking into this. I'll stick with v6.292.1 on older Macs.
Thank you, both, for looking into this. I'll stick with v6.292.1 on older Macs.
v6.292.1 doesn't work on mac by the way. Check this https://github.com/haasn/libplacebo/issues/195 You need this patch https://code.videolan.org/videolan/libplacebo/-/merge_requests/564
Thank, @eko5624. That pr was annoyingly merged after the problematic changes. I'll just build mpv/ffmpeg without libplacebo on older macs as they don't need it anyway.
The recent changes to src/convert.cc is causing build to fail on macOS 10.13 and 10.14 (building fine on macOS 13.5.1) with the errors below.