-
Notifications
You must be signed in to change notification settings - Fork 754
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
binaryen has started to require CMAKE_OSX_DEPLOYMENT_TARGET of 10.14 #4299
Comments
I add to temporarily disable the test_binaryen_from_source test under macOS to work around: WebAssembly/binaryen#4299
One option is to temporarily revert the use of std::variant in binaryen? @tlively would that be reasonable? |
This version represents that current reality although we would like to lower this for increased compatibility. See: #4299
I think this should be "those who want to build using emsdk". Those who just install are using the Chromium builds and are unaffected. |
Thanks, clarified. |
A variation (edit: no pun intended) on that could be to replace the current |
We also might be able to work around it: https://stackoverflow.com/questions/52521388/stdvariantget-does-not-compile-with-apple-llvm-10-0 |
Nice! That looks like it could work. |
I add to temporarily disable the test_binaryen_from_source test under macOS to work around: WebAssembly/binaryen#4299
I add to temporarily disable the test_binaryen_from_source test under macOS to work around: WebAssembly/binaryen#4299
Yikes! It looks like Using |
This should enforce it: #4300 |
Once we set it to something lower.. |
If we land #4300 then part of the fix for this issue will be to lower CMAKE_OSX_DEPLOYMENT_TARGET back to 10.11 (which is what emsdk currently needs/wants). |
This version represents that current reality although we would like to lower this for increased compatibility. See: #4299
Currently Unity 2021.2 requires macOS 10.13 or newer: https://docs.unity3d.com/2021.2/Documentation/Manual/system-requirements.html . (With new Emscripten releases, we are targeting Unity 2021.2 and higher) Asked the question internally about when Unity would be bumping the minimum requirement up to macOS 10.14, and it looks like the now upcoming LTS version "2021.3" will still have macOS 10.13 support, and LTSes are supported for two years minimum, so that means that we'll be seeing macOS 10.13 based support phase out at the end of 2023 the earliest. As a sidenote, the current CMAKE_OSX_DEPLOYMENT_TARGET of 10.11 in emsdk was set to that just because that was the lowest observed number that we knew that LLVM would successfully build with. We do not actually care about macOS < 10.13, so we are comfortable with hoisting that 10.11 to 10.13 as the minimum required version if that helps any. |
I don't think that is how E.g. in LLVM case, I recall if LLVM was built with CMAKE_OSX_DEPLOYMENT_TARGET = 10.14, then on macOS 10.13 it will fail to start |
The emscripten-releases builder that builds the emsdk binaries sets CMAKE_OSX_DEPLOYMENT_TARGET=10.12. It is able to do so because it bundles its own copy of libc++ so it does suffer from the problem discussed in this issue. Thus the official binaries are not effect by this issue, only those using emsdk (or other build scripts) to build from source. |
@sbc100 Sorry, I'm not sure what you're asking here. I saw various PRs related to this land - is there more work we need to do after those, and if so, what is it? |
We need to reduce this back to 10.11 (or 10.13 I guess). To do this we will probably need to implement the workaround suggest by @dschuff in #4299 (comment) or use Setting |
I just wanted to reiterate this. It's not actually that hard to build your own libc++ and link it into your own program such as Binaryen, especially if you do it statically. |
Yes, we basically run |
I don't suppose just using our binaries directly would be an option for you? |
I think we need to keep the build-from-source option around, not least to support folks who can't use our pre-built binaries (e.g. non-glibc-based distros, or architectures we don't pre-build for). |
Maybe the way forward here would be to bundle the same libstdc++ into emsdk that is required by binaryen? Currently it looks like |
That would work, yeah. In theory I think it ought to be sufficient to just statically link libc++ into Binaryen (since the problem comes from the fact that the libc++ on the old systems is missing stuff). But the error happens at compile time and can't take that into account. I wonder if there's a way to work around that, that would be easier than working from a local build or install of libc++ with its own headers... |
* Improve emscripten-releases-tags.txt to support mutliple aliases (#837) Also, improve reporting of version resolution. e.g.: ``` $ ./emsdk install sdk-latest Resolving SDK alias 'latest' to '2.0.23' Resolving SDK version '2.0.23' to 'sdk-releases-upstream-77b065ace39e6ab21446e13f92897f956c80476a-64bit' Installing SDK 'sdk-releases-upstream-77b065ace39e6ab21446e13f92897f956c80476a-64bit'.. ... ``` * bugfix: allow to install SDK binaries alone (#834) * 2.0.24 (#839) * Error out on attempt to activate a missing tools (#838) Previously if a tool (any part of an SDK) was not installed we would issue a warning and continue to active without returning non-zero. This meant doing `emsdk install 2.0.0 && emsdk activate latest` would appear to be work aside from the warning messages about latest not being installed. This is especially annoying since we dropped support for side by side SDK installations. The following sequence is no longer valid and we want to make that clear by erroring out: ``` $ emsdk install 2.0.1 $ emsdk install 2.0.2 $ emsdk activate 2.0.1 ``` Since 2.0.2 replaces 2.0.1 on the filesystem the active here could fail hard rather than just warning. * Consistent error messages (#840) * Point zsh and csh users to the correct startup script (#843) Fixes: emscripten-core/emscripten#14446 * Print sys.argv when link_wrapper.py is invoked incorrectly (#847) This should help debug cases when the link_wrapper is not invoked correctly. * Support linking with `-o filename` (#849) When linking with `-o filename` (such as in various CMake build checks), the parameter passed to the linker is a temporary file, and it is passed as a bare filename (i.e. relative path without a `'/'`). In such cases, `outdir` would have been the empty string, and the final `tar` command would fail (actually the call to `subprocess.check_call(…)` is what fails). * 2.0.25 (#850) * 2.0.26 (#858) * 2.0.26-lto (#861) * 2.0.27 (#868) Includes LTO and non-LTO, with non-LTO as the default * 2.0.28 (#871) * Use `.json` extension for emscripten-releases-tags.json. NFC (#870) * Add LTO build for 2.0.28 (#873) * Small fix for Bazel instructions. (#875) In the past the instructions were to copy `emscripten_toolchain` into the project dir, now it downloads emsdk as a package so the `bazelrc` part has to refer to `@emsdk`. * Version 2.0.29 (#878) * 2.0.29-lto (#881) * Fix release name for 2.0.29-lto (#885) Fixes #884 * [Bazel] fix llvm bin path (#888) * Add arm64 fastcomp releases to emsdk_manifest.json (#891) This was missing from emsdk_manifest.json and should alow older fastcomp SDKs to be install on M1 apple hardware (in emulation mode). Fixes: #889 * 2.0.30 (#893) * Fix error handling: untargz() in emsdk.py (#895) Make untargz() in emsdk.py return False if tar command failed. * Fix passing -DLLVM_ENABLE_PROJECTS directive to CMake - it does not want to see double quotes in the field passed to it. (#898) * Fix emscripten-version parsing (#902) See emscripten-core/emscripten#15144 * 2.0.31 (#906) * bazel: pass -g instead of -g4 for wasm_asan feature (#904) * Add embind example to Bazel docs (#910) * Add embind example to Bazel docs * address feedback * Run buildifier on bazel/ (#913) * Update build_bazel_rules_nodejs to fix closure compiles (#912) * Update build_bazel_rules_nodejs to fix closure compiles * Fix spacing in update_bazel_workspace.sh script * space * 2.0.32 (#915) * Improve flags in bazel example (#917) * Add back node.js 12.18.1 packages for Windows 7 support. (#877) * Update CMAKE_OSX_DEPLOYMENT_TARGET from 10.11 to 10.14 (#924) Apparently 10.11 is no longer good enough to run the latest version of binaryen. Specifically since binaryen switched to using std::variant it now fails to build with this set to 10.11. This is also the version used on the emscripten-releases CI which builds the emsdk binaries: https://chromium.googlesource.com/emscripten-releases/+/refs/heads/main/src/build.py#673 * Revert "Update CMAKE_OSX_DEPLOYMENT_TARGET from 10.11 to 10.14 (#924)" This reverts commit 99e5e02. * 2.0.33 (#922) I add to temporarily disable the test_binaryen_from_source test under macOS to work around: WebAssembly/binaryen#4299 * 2.0.34 (#925) * Bump EmscriptenVersion to 2.0.34 * Fix bad edit Co-authored-by: Sam Clegg <sbc@chromium.org> Co-authored-by: Yulong Wang <yulong.fs@gmail.com> Co-authored-by: Attila Oláh <attilaolah@gmail.com> Co-authored-by: Attila Oláh <atl@google.com> Co-authored-by: Derek Schuff <dschuff@chromium.org> Co-authored-by: Danny B <danila.bespalov@gmail.com> Co-authored-by: Brad Kotsopoulos <bkotsopoulos@snapchat.com> Co-authored-by: Matt Gucci <matt9ucci@gmail.com> Co-authored-by: juj <jujjyl@gmail.com> Co-authored-by: walkingeyerobot <mitch@thefoley.net> Co-authored-by: Kevin Lubick <kjlubick@users.noreply.github.com> Co-authored-by: Larry Ewing <lewing@microsoft.com>
This is no longer a relevant issue to Unity, as Unity 2022.2 will target macOS 10.14 as minimum. Though next time that minimum macOS is due to get bumped, I hope that it won't happen as "accidentally" as this bump from 10.11 to 10.14 occurred, but instead it will be caught on the CIs. It would be good to have the waterfall builds be the same as the end user builds, so that when the waterfall builds, it will produce the same output as end users do. |
Thanks for the update, and sorry I haven't gotten to this. I don't think it's possible to run the bots on such an old version of MacOS, but I agree that we shouldn't update deployment targets without agreement (and one thing that went wrong here was that I didn't realize the emsdk build couldn't match the waterfall build). |
Now that we don't need to support 10.11.. can we revert back to using system libc++ (like the emsdk does). Seems like it would make the waterfall build simpler and easier to replicate if we didn't need to build libc++ first! |
i.e. not building our own libc++ would actually bring the two builders back into parity which would address @juj's concern (the emscripten-releases waterfall would not be able to feature creep). |
We could. Right now emscripten-releases actually targets 10.12, which goes back to the first time the build was checked in, so I don't really know exactly why we had that version in particular. If we want to require 10.14, according to https://gs.statcounter.com/macos-version-market-share/desktop/worldwide that would cover just about 90% of all installs. So if you figure developers are a bit more likely to be up-to-date than the average user, that probably gets about everyone? |
Lets go for 10.14 to stay in sync with unity and emsdk and binaryen itself (when building without custom libc++) |
There is no need to install an old macOS to target old OS versions. That is what
That would be great! |
* Fix macOS build. See WebAssembly/binaryen#4299 * Update comment
Sorry, I meant I don't know of a good way to test on the bots (i.e. make a test that fails when we build with the wrong deployment target). |
When we started using std::variant we inadvertently started requiring a 10.14 macOS deployment target.
This went unnoticed on the emscripten-releases builder because there we use out own version of libc++.
However for other users, such as those who want to build from source using emsdk, this is a new requirement and emsdk
currently pins CMAKE_OSX_DEPLOYMENT_TARGET to 10.11:
https://github.com/emscripten-core/emsdk/blob/2b3e0b91761ed8962a7c4eb84d8a288819e106d7/emsdk.py#L1061-L1063
I guess we either need to remove the requirements of binaryen or relax the requirements of emsdk.
The text was updated successfully, but these errors were encountered: