wasi-sdk icon indicating copy to clipboard operation
wasi-sdk copied to clipboard

Add release binary for MacOS 10.13

Open jfizz opened this issue 4 years ago • 1 comments

When running [WASI_SDK]/bin/clang I get:

dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
  Referenced from: /Users/foo/Web/wasi-sdk-10.0/bin/clang (which was built for Mac OS X 10.15)
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ____chkstk_darwin
  Referenced from: /Users/foo/Web/wasi-sdk-10.0/bin/clang (which was built for Mac OS X 10.15)
  Expected in: /usr/lib/libSystem.B.dylib

Abort trap: 6

Which appears to be because the binaries are built on MacOS 10.15. I found a similar issue here: https://github.com/nodegui/nodegui/issues/391

jfizz avatar Apr 19 '20 21:04 jfizz

I think the way to fix this is to pass the CMAKE_OSX_DEPLOYMENT_TARGET to cmake.

On the WebAssembly/waterfall build we use -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12. We should probably do that same here.

sbc100 avatar Apr 19 '20 22:04 sbc100

@jfizz, @sbc100: should we keep this open? Or is there an easy fix that can be made to the CMake files?

abrown avatar Mar 13 '23 17:03 abrown

Adding -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 to the Makefile would be an easy fix yes. We should do that.

sbc100 avatar Mar 13 '23 18:03 sbc100

I looked into this: https://github.com/WebAssembly/wasi-sdk/pull/285 added -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0. Is 11.0 good enough? If we need the older version then we might be outside of Apple's support window. From @yamt in that PR:

The version 11.0 is chosen because Apple seems providing support for two previous releases. (As of writing this, the latest is 13.)

abrown avatar Mar 13 '23 20:03 abrown

I don't see any downside using -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12. As long as llvm itself can be built with no issue).

@jfizz do you want to send a PR?

sbc100 avatar Mar 13 '23 21:03 sbc100