Skip to content

binaryen has started to require CMAKE_OSX_DEPLOYMENT_TARGET of 10.14 #4299

Closed

Description

@sbc100

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.

Activity

  1. added a commit that references this issue on Nov 1, 2021
  2. sbc100 commented on Nov 1, 2021

    @sbc100
    MemberAuthor

    One option is to temporarily revert the use of std::variant in binaryen? @tlively would that be reasonable?

  3. added a commit that references this issue on Nov 1, 2021
  4. dschuff commented on Nov 1, 2021

    @dschuff
    Member

    However for other users, such as those who want to install using emsdk, this is a new requirement and emsdk
    currently pins CMAKE_OSX_DEPLOYMENT_TARGET to 10.11:

    I think this should be "those who want to build using emsdk". Those who just install are using the Chromium builds and are unaffected.

  5. sbc100 commented on Nov 1, 2021

    @sbc100
    MemberAuthor

    However for other users, such as those who want to install using emsdk, this is a new requirement and emsdk
    currently pins CMAKE_OSX_DEPLOYMENT_TARGET to 10.11:

    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.

  6. kripken commented on Nov 1, 2021

    @kripken
    Member

    One option is to temporarily revert the use of std::variant in binaryen?

    A variation (edit: no pun intended) on that could be to replace the current std::variant with a userspace replacement with similar syntax.

  7. sbc100 commented on Nov 1, 2021

    @sbc100
    MemberAuthor

    Nice! That looks like it could work.

  8. added 2 commits that reference this issue on Nov 1, 2021
  9. tlively commented on Nov 1, 2021

    @tlively
    Member

    Yikes! It looks like std::visit is also affected: https://stackoverflow.com/questions/52310835/xcode-10-call-to-unavailable-function-stdvisit/53868971.

    Using std::get_if exclusively should work ok technically, but do we have a way to automatically enforce that?

  10. sbc100 commented on Nov 1, 2021

    @sbc100
    MemberAuthor

    This should enforce it: #4300

  11. sbc100 commented on Nov 1, 2021

    @sbc100
    MemberAuthor

    This should enforce it: #4300

    Once we set it to something lower..

  12. sbc100 commented on Nov 1, 2021

    @sbc100
    MemberAuthor

    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).

  13. added a commit that references this issue on Nov 2, 2021
  14. 15 remaining items

  15. dschuff commented on Mar 22, 2022

    @dschuff
    Member

    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).

  16. sbc100 commented on Mar 22, 2022

    @sbc100
    MemberAuthor

    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!

  17. sbc100 commented on Mar 22, 2022

    @sbc100
    MemberAuthor

    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).

  18. dschuff commented on Mar 22, 2022

    @dschuff
    Member

    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?

  19. sbc100 commented on Mar 22, 2022

    @sbc100
    MemberAuthor

    Lets go for 10.14 to stay in sync with unity and emsdk and binaryen itself (when building without custom libc++)

  20. juj commented on Mar 22, 2022

    @juj
    Collaborator

    I don't think it's possible to run the bots on such an old version of MacOS

    There is no need to install an old macOS to target old OS versions. That is what CMAKE_OSX_DEPLOYMENT_TARGET is for. For example, we also use modern macOS 11 or 12 to build, but pass CMAKE_OSX_DEPLOYMENT_TARGET=10.14 to require that the build is targeting that version as minimum.

    i.e. not building our own libc++ would actually bring the two builders back into parity

    That would be great!

  21. added a commit that references this issue on Mar 23, 2022
  22. dschuff commented on Mar 24, 2022

    @dschuff
    Member

    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).
    But since we already explicitly specify the deployment target in the build script, and as of yesterday the Chromium emscripten-releases build is in sync with emsdk (and there's a comment to remind us that we should keep them in sync), we are at least in the position where a change to that would be caught by review. So I think we are in pretty good shape now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions